-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from anfema/f.hoffmann/update-project-setup
Update project setup & add django 4.2 support
- Loading branch information
Showing
35 changed files
with
1,318 additions
and
477 deletions.
There are no files selected for viewing
This file contains 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 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,24 @@ | ||
name: Code style checks | ||
on: | ||
pull_request: | ||
branches: [ main, master ] | ||
push: | ||
branches: [ main, master ] | ||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff==0.1.7 | ||
# Update output format to enable automatic inline annotations. | ||
- name: Run Ruff check | ||
run: ruff check --output-format=github . | ||
- name: Run Ruff format --check | ||
run: ruff format --check --diff . |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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,44 @@ | ||
on: | ||
release: | ||
types: [published] | ||
|
||
name: Upload packages to PyPI and GitHub release on release publish | ||
jobs: | ||
upload-packages: | ||
name: Create release-artifacts | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# IMPORTANT: this permission is mandatory for trusted publishing | ||
id-token: write | ||
# required by ncipollo/release-action@v1 | ||
contents: write | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
- name: Install build dependencies | ||
run: | | ||
pipx install poetry | ||
- name: Check package version (compare package version with tag) | ||
run: | | ||
if [[ ! "$(poetry version -s)" = "${{ github.event.release.tag_name}}" ]]; then | ||
echo "version mismatch: $(poetry version -s) (package) vs ${{ github.event.release.tag_name }} (tag)" | ||
exit 1 | ||
fi | ||
- name: Build sdist & wheel | ||
run: | | ||
poetry build | ||
- name: Update release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
allowUpdates: true | ||
omitBodyDuringUpdate: true | ||
omitNameDuringUpdate: true | ||
omitPrereleaseDuringUpdate: true | ||
artifacts: "dist/*" | ||
- name: Publish python distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
# uses trusted publishing (no username & password required) |
This file contains 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,13 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.1.7 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
# Run the formatter. | ||
- id: ruff-format | ||
- repo: https://github.com/python-poetry/poetry | ||
rev: 1.7.1 | ||
hooks: | ||
- id: poetry-check |
This file was deleted.
Oops, something went wrong.
This file contains 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 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
Oops, something went wrong.