-
Notifications
You must be signed in to change notification settings - Fork 1
🏗 Switch to hatchling as build tool & add PyPI release workflow #85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: "Packaging Test" | ||
|
|
||
| on: [ pull_request ] | ||
| jobs: | ||
| check_packaging: | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| python-version: [ "3.11" ] | ||
| os: [ ubuntu-latest ] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install tox | ||
| - name: Run Packaging Test | ||
| run: | | ||
| tox -e test_packaging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # This GitHub workflow is only needed for python package releases which are supposed to be published on pypi. | ||
|
|
||
| # This workflows will upload a Python Package using Twine when a release is created | ||
| # For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
|
|
||
| name: Upload Python Package | ||
| on: | ||
| release: | ||
| branches: main | ||
| types: [ created, edited ] | ||
|
|
||
| jobs: | ||
| tests: | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| python-version: [ "3.11" ] | ||
| os: [ ubuntu-latest ] | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python ${{ matrix.python-version }} | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install tox | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install tox | ||
| - name: Run tox | ||
| run: | | ||
| tox | ||
| build-n-publish: | ||
| name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI | ||
| runs-on: ubuntu-latest | ||
| needs: tests | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: ${{ matrix.python-version }} | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install setuptools setuptools-scm wheel twine | ||
| - name: Build a binary wheel and a source tarball | ||
| run: | | ||
| python setup.py sdist bdist_wheel | ||
| - name: Publish distribution 📦 to PyPI | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| user: __token__ | ||
| password: ${{ secrets.PYPI_API_TOKEN }} | ||
| # to update visit | ||
| # https://github.com/Hochfrequenz/ebddocx2table/settings/secrets/actions/PYPI_API_TOKEN | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -132,3 +132,5 @@ dmypy.json | |
|
|
||
| # vscode settings | ||
| .vscode/ | ||
|
|
||
| src/_ebddocx2table_version.py | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # requirements for the hatchling build system | ||
| build | ||
| twine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # | ||
| # This file is autogenerated by pip-compile with Python 3.11 | ||
| # by the following command: | ||
| # | ||
| # pip-compile requirements-packaging.in | ||
| # | ||
| bleach==6.0.0 | ||
| # via readme-renderer | ||
| build==0.10.0 | ||
| # via -r requirements-packaging.in | ||
| certifi==2023.5.7 | ||
| # via requests | ||
| charset-normalizer==3.1.0 | ||
| # via requests | ||
| colorama==0.4.6 | ||
| # via build | ||
| docutils==0.20.1 | ||
| # via readme-renderer | ||
| idna==3.4 | ||
| # via requests | ||
| importlib-metadata==6.7.0 | ||
| # via | ||
| # keyring | ||
| # twine | ||
| jaraco-classes==3.2.3 | ||
| # via keyring | ||
| keyring==24.2.0 | ||
| # via twine | ||
| markdown-it-py==3.0.0 | ||
| # via rich | ||
| mdurl==0.1.2 | ||
| # via markdown-it-py | ||
| more-itertools==9.1.0 | ||
| # via jaraco-classes | ||
| packaging==23.1 | ||
| # via build | ||
| pkginfo==1.9.6 | ||
| # via twine | ||
| pygments==2.15.1 | ||
| # via | ||
| # readme-renderer | ||
| # rich | ||
| pyproject-hooks==1.0.0 | ||
| # via build | ||
| pywin32-ctypes==0.2.2 | ||
| # via keyring | ||
| readme-renderer==40.0 | ||
| # via twine | ||
| requests==2.31.0 | ||
| # via | ||
| # requests-toolbelt | ||
| # twine | ||
| requests-toolbelt==1.0.0 | ||
| # via twine | ||
| rfc3986==2.0.0 | ||
| # via twine | ||
| rich==13.4.2 | ||
| # via twine | ||
| six==1.16.0 | ||
| # via bleach | ||
| twine==4.0.2 | ||
| # via -r requirements-packaging.in | ||
| urllib3==2.0.3 | ||
| # via | ||
| # requests | ||
| # twine | ||
| webencodings==0.5.1 | ||
| # via bleach | ||
| zipp==3.15.0 | ||
| # via importlib-metadata |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
den muss @hf-krechan bitte noch hinterlegen
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done :)