-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
878 additions
and
718 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: pip | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
groups: | ||
production-dependencies: | ||
dependency-type: production | ||
development-dependencies: | ||
dependency-type: development | ||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: monthly |
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,34 @@ | ||
name: Build and publish docs | ||
|
||
permissions: | ||
contents: write | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Python Tests] | ||
types: | ||
- completed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-publish-docs: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: pyproject.toml | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install poetry | ||
poetry install --with docs | ||
- name: Build docs | ||
run: | | ||
APP_MODULE_NAME=$(ls src -U | head -1) # Get the first module name in the src directory | ||
poetry run pdoc src/"$APP_MODULE_NAME" -o docs_build -t docs/pdoc-theme --docformat google | ||
touch docs_build/.nojekyll | ||
- uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: docs_build |
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,35 @@ | ||
name: Publish to PyPi | ||
|
||
permissions: | ||
actions: write | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
pypi-release: | ||
name: PyPi Release | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: pyproject.toml | ||
cache: poetry | ||
- name: Install dependencies and build | ||
run: | | ||
poetry install | ||
poetry build | ||
- name: Publish to PyPi | ||
id: pypi_publish | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} | ||
verbose: true |
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,69 @@ | ||
name: Python Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
unit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: pyproject.toml | ||
cache: poetry | ||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
- name: Run tests | ||
id: run-tests | ||
run: > | ||
poetry run pytest \ | ||
--junitxml=pytest.xml \ | ||
--cov-report=term-missing:skip-covered \ | ||
--cov-report=xml:coverage.xml \ | ||
--cov=src tests \ | ||
--log-level=DEBUG \ | ||
--verbose | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
verbose: true | ||
|
||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version-file: pyproject.toml | ||
cache: poetry | ||
- name: Install dependencies | ||
run: | | ||
poetry install | ||
- name: Ruff format | ||
run: poetry run ruff format --check | ||
- name: Ruff check | ||
run: poetry run ruff check | ||
|
||
mypy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install poetry | ||
run: pipx install poetry | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.11' | ||
cache: poetry | ||
- run: | | ||
poetry install | ||
poetry run mypy . |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.