Skip to content

Commit

Permalink
Preparation for 0.1.0 (#33)
Browse files Browse the repository at this point in the history
* Preparation for 0.1.0 (changelog, version bump)
* Updated contribution
* oidc auth for pypi
* Fix comments and ruff violations
  • Loading branch information
ubmarco authored Jan 23, 2024
1 parent aa2999f commit 558a2b0
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 30 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
9 changes: 4 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ on:
jobs:
build-n-publish:
runs-on: ubuntu-latest
permissions:
id-token: write

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
- name: Set up Python 3.11
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: 3.11

- name: Install poetry
run: |
Expand All @@ -30,6 +32,3 @@ jobs:
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sphinx:
configuration: docs/conf.py

python:
version: 3.8
version: 3.11
install:
- method: pip
path: .
Expand Down
9 changes: 4 additions & 5 deletions docs/contents/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ All notable changes to this project will be documented in this file.
The format is based on `Keep a Changelog <https://keepachangelog.com/en/1.0.0/>`_,
and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0.html>`_.

__ https://github.com/useblocks/libpdf/compare/v0.0.1...HEAD
__ https://github.com/useblocks/libpdf/compare/v0.1.0...HEAD

`Unreleased`__
--------------

..
__ https://github.com/useblocks/libpdf/compare/v0.0.1...v0.0.2
__ https://github.com/useblocks/libpdf/compare/v0.0.1...v0.1.0

`0.0.2`__ - 2020-09-30
----------------------
`0.1.0`__ - 2024-01-23
----------------------

Added
~~~~~
Expand Down
13 changes: 4 additions & 9 deletions docs/contents/contribution.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,11 @@ Small changes like fixing a typo, contributing to the documentation commonly don
Here are some things worth noting before uploading commits:

* all code must follow the `black <https://black.readthedocs.io/en/stable/>`_ code style
* black is configured to

* a maximum line length of 120 chars and
* single quote string literals

* ruff is used for formatting according to the black style with all defaults
* pull requests are checked using tox
* tox executes (for various Python versions)

* pytest
* flake8 with various plugins (see pyproject.toml)
* pylint
* black
* test cases
* ruff formatter check
* ruff linter check
* the Sphinx documentation build
12 changes: 5 additions & 7 deletions libpdf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@
:copyright: © 2020 by team useblocks
:license: MIT, see LICENSE for more details
""" # needed for autodoc
try:
import importlib_metadata # Python 3.6 and 3.7
except ImportError:
import importlib.metadata as importlib_metadata # Python 3.8, 3.9
""" # noqa: D205, D400, D415 # needed for autodoc

import importlib.metadata as importlib_metadata

__version__: str = importlib_metadata.version("libpdf")
__summary__: str = importlib_metadata.metadata("libpdf")["Summary"]

# below imports from libpdf.core cannot be at the top avoid circular import errors in core.py when
# importing __version__ and __summary__
# below imports from libpdf.core cannot be at the top avoid circular import errors in
# core.py when importing __version__ and __summary__
import libpdf._import_forks # noqa: F401
from libpdf.core import main_api as load
from libpdf.core import main_cli
Expand Down
3 changes: 1 addition & 2 deletions libpdf/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,7 @@ def handle_parse_result(self, ctx, opts, args):
"--no-rects",
is_flag=True,
show_default=True,
help="Skip rects. rects will not be part of the output JSON/YAML structures and also not saved if"
" --save-rects is given.",
help="Skip rectangles. Rectangles will not be part of the output JSON/YAML structures.",
)
@click.option("-vd", "--visual-debug", is_flag=True, help="Visual debug libpdf.")
@click.option(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "libpdf"
version = "0.0.1"
version = "0.1.0"
description = "Extract structured data from PDFs."
authors = [
"Marco Heinemann <marco.heinemann@useblocks.com>",
Expand Down

0 comments on commit 558a2b0

Please sign in to comment.