-
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.
Merge pull request #5 from cryptk/pydantic
Pydantic models and a big cleanup
- Loading branch information
Showing
16 changed files
with
1,853 additions
and
469 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,83 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
# Make sure commit messages follow the conventional commits convention: | ||
# https://www.conventionalcommits.org | ||
commitlint: | ||
name: Lint Commit Messages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: wagoid/commitlint-github-action@v5.3.0 | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- uses: abatilo/actions-poetry@v2.3.0 | ||
- uses: pre-commit/action@v3.0.0 | ||
|
||
test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.10" | ||
- "3.11" | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
- macOS-latest | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- uses: abatilo/actions-poetry@v2.3.0 | ||
- name: Install Dependencies | ||
run: poetry install | ||
shell: bash | ||
# - name: Test with Pytest | ||
# run: poetry run pytest | ||
# shell: bash | ||
# release: | ||
# runs-on: ubuntu-latest | ||
# environment: release | ||
# if: github.ref == 'refs/heads/main' | ||
# needs: | ||
# - test | ||
|
||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# with: | ||
# fetch-depth: 0 | ||
# persist-credentials: false | ||
|
||
# # Run semantic release: | ||
# # - Update CHANGELOG.md | ||
# # - Update version in code | ||
# # - Create git tag | ||
# # - Create GitHub release | ||
# # - Publish to PyPI | ||
# - name: Python Semantic Release | ||
# uses: relekang/python-semantic-release@v7.33.2 | ||
# with: | ||
# github_token: ${{ secrets.GH_TOKEN }} | ||
# repository_username: __token__ | ||
# repository_password: ${{ secrets.PYPI_TOKEN }} |
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,54 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
exclude: "CHANGELOG.md" | ||
default_stages: [ commit ] | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: debug-statements | ||
- id: check-builtin-literals | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-json | ||
exclude: ^.vscode/ | ||
- id: check-toml | ||
- id: detect-private-key | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/python-poetry/poetry | ||
rev: 1.3.2 | ||
hooks: | ||
- id: poetry-check | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/psf/black | ||
rev: 22.12.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.2 | ||
hooks: | ||
- id: codespell | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: v0.0.260 | ||
hooks: | ||
- id: ruff | ||
args: | ||
- --fix | ||
# - repo: local | ||
# hooks: | ||
# - id: pylint | ||
# name: pylint | ||
# entry: poetry run -- pylint | ||
# language: system | ||
# types: [python] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.2.0 | ||
hooks: | ||
- id: mypy | ||
exclude: cli.py | ||
additional_dependencies: [ "pydantic" ] |
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,4 +1,9 @@ | ||
{ | ||
"files.trimTrailingWhitespace": true, | ||
"editor.rulers": [140] | ||
"editor.rulers": [140], | ||
"python.formatting.provider": "black", | ||
// https://code.visualstudio.com/docs/python/testing#_pytest-configuration-settings | ||
"python.testing.pytestEnabled": false, | ||
"python.linting.mypyEnabled": true, | ||
"python.analysis.typeCheckingMode": "basic" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.