-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* release/2.5: updates tox.ini updates CI updates CI add pytest.ini pep 621 Update code blocks in README
- Loading branch information
Showing
82 changed files
with
792 additions
and
1,426 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,30 @@ | ||
# This is used by the action https://github.com/dorny/paths-filter | ||
dependencies: &dependencies | ||
- 'pyproject.toml' | ||
|
||
python: &python | ||
- added|modified: 'src/**' | ||
- added|modified: 'tests/**' | ||
- 'manage.py' | ||
|
||
changelog: | ||
- added|modified: 'changes/**' | ||
- 'CHANGELOG.md' | ||
|
||
mypy: | ||
- *python | ||
- 'mypy.ini' | ||
|
||
run_tests: | ||
- *python | ||
- *dependencies | ||
- 'pytest.ini' | ||
- '.github/workflows/test.yml' | ||
- '.github/file-filters.yml' | ||
|
||
lint: | ||
- *python | ||
- '.flake8' | ||
- 'pyproject.toml' | ||
- '.github/file-filters.yml' | ||
- '.github/workflows/lint.yml' |
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,67 @@ | ||
name: "Documentation" | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
schedule: | ||
- cron: '37 23 * * 2' | ||
|
||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
generate: | ||
name: Generate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Restore cached venv | ||
id: cache-venv-restore | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
.cache-uv/ | ||
.venv/ | ||
key: ${{ matrix.python-version }}-${{matrix.django-version}}-venv | ||
|
||
- uses: yezz123/setup-uv@v4 | ||
- name: Build Doc | ||
run: | | ||
uv sync --extra docs | ||
PYTHONPATH=./src uv run --cache-dir .cache-uv/ mkdocs build -d ./docs-output | ||
- name: Cache venv | ||
if: steps.cache-venv-restore.outputs.cache-hit != 'true' | ||
id: cache-venv-save | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
.cache-uv/ | ||
.venv/ | ||
key: ${{ matrix.python-version }}-${{matrix.django-version}}-venv | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./docs-output | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: generate | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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,62 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' # matches every branch | ||
|
||
concurrency: | ||
group: "${{ github.workflow }}-${{ github.ref }}-lint" | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
permissions: | ||
id-token: write | ||
attestations: write | ||
|
||
|
||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 1 | ||
defaults: | ||
run: | ||
shell: bash | ||
outputs: | ||
lint: ${{steps.changes.outputs.lint }} | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4.1.7 | ||
- id: changes | ||
name: Check for file changes | ||
uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0 | ||
with: | ||
base: ${{ github.ref }} | ||
token: ${{ github.token }} | ||
filters: .github/file-filters.yml | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
needs: [ changes ] | ||
if: needs.changes.outputs.lint | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4.1.7 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
architecture: 'x64' | ||
- uses: yezz123/setup-uv@v4 | ||
- name: lint | ||
if: needs.changes.outputs.lint | ||
run: | | ||
uv run isort src/ --check-only | ||
uv run flake8 src/ |
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
.* | ||
~* | ||
*.lock | ||
build | ||
__pycache__ | ||
*.egg-info | ||
!docs/**/.pages | ||
!.gitignore | ||
!.github | ||
!.bumpversion.cfg | ||
|
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.