-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into user_preferences_file
- Loading branch information
Showing
20 changed files
with
1,427 additions
and
723 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,4 @@ | ||
[flake8] | ||
extend-ignore = C408,E203,F841,W503 | ||
max-complexity = 10 | ||
max-line-length = 88 |
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,19 @@ | ||
version: 2 | ||
updates: | ||
# Maintain dependencies for GitHub Actions | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
assignees: | ||
- "ezio-melotti" | ||
open-pull-requests-limit: 10 | ||
|
||
# Maintain dependencies for Python | ||
- package-ecosystem: pip | ||
directory: "/" | ||
schedule: | ||
interval: monthly | ||
assignees: | ||
- "ezio-melotti" | ||
open-pull-requests-limit: 10 |
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,5 @@ | ||
changelog: | ||
exclude: | ||
authors: | ||
- dependabot | ||
- pre-commit-ci |
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,79 @@ | ||
name: Build package | ||
|
||
on: | ||
push: | ||
pull_request: | ||
release: | ||
types: | ||
- published | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
jobs: | ||
# Always build & lint package. | ||
build-package: | ||
name: Build & verify package | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: hynek/build-and-inspect-python-package@v2 | ||
|
||
# Publish to Test PyPI on every commit on main. | ||
release-test-pypi: | ||
name: Publish in-dev package to test.pypi.org | ||
if: | | ||
github.repository_owner == 'python' | ||
&& github.event_name == 'push' | ||
&& github.ref == 'refs/heads/main' | ||
runs-on: ubuntu-latest | ||
needs: build-package | ||
|
||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: Download packages built by build-and-inspect-python-package | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Packages | ||
path: dist | ||
|
||
- name: Publish to Test PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
attestations: true | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
# Publish to PyPI on GitHub Releases. | ||
release-pypi: | ||
name: Publish to PyPI | ||
# Only run for published releases. | ||
if: | | ||
github.repository_owner == 'python' | ||
&& github.event.action == 'published' | ||
runs-on: ubuntu-latest | ||
needs: build-package | ||
|
||
permissions: | ||
id-token: write | ||
|
||
steps: | ||
- name: Download packages built by build-and-inspect-python-package | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: Packages | ||
path: dist | ||
|
||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
attestations: 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,29 @@ | ||
name: Lint | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
|
||
env: | ||
FORCE_COLOR: 1 | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
cache: pip | ||
cache-dependency-path: .github/workflows/lint.yml | ||
- uses: pre-commit/[email protected] | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip wheel | ||
python -m pip install --upgrade safety | ||
python -m pip install --editable . | ||
# Ignore 70612 / CVE-2019-8341, Jinja2 is a safety dep, not ours | ||
- run: safety check --ignore 70612 |
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
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,80 @@ | ||
repos: | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.6.8 | ||
hooks: | ||
- id: ruff | ||
args: [--exit-non-zero-on-fix] | ||
|
||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 24.8.0 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-merge-conflict | ||
- id: check-toml | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: forbid-submodules | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/python-jsonschema/check-jsonschema | ||
rev: 0.29.2 | ||
hooks: | ||
- id: check-dependabot | ||
- id: check-github-workflows | ||
|
||
- repo: https://github.com/rhysd/actionlint | ||
rev: v1.7.2 | ||
hooks: | ||
- id: actionlint | ||
|
||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.11.2 | ||
hooks: | ||
- id: mypy | ||
args: | ||
[ | ||
--ignore-missing-imports, | ||
--install-types, | ||
--non-interactive, | ||
--pretty, | ||
--show-error-codes, | ||
., | ||
] | ||
pass_filenames: false | ||
|
||
- repo: https://github.com/tox-dev/pyproject-fmt | ||
rev: 2.2.4 | ||
hooks: | ||
- id: pyproject-fmt | ||
|
||
- repo: https://github.com/abravalheri/validate-pyproject | ||
rev: v0.20.2 | ||
hooks: | ||
- id: validate-pyproject | ||
|
||
- repo: https://github.com/tox-dev/tox-ini-fmt | ||
rev: 1.4.1 | ||
hooks: | ||
- id: tox-ini-fmt | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.3.0 | ||
hooks: | ||
- id: codespell | ||
args: [--ignore-words-list=commitish] | ||
|
||
- repo: meta | ||
hooks: | ||
- id: check-hooks-apply | ||
- id: check-useless-excludes | ||
|
||
ci: | ||
autoupdate_schedule: quarterly |
Oops, something went wrong.