Skip to content

Commit

Permalink
Merge branch 'master' into introduce-ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
jerry-git authored Mar 14, 2024
2 parents 73b0111 + 095a9cd commit f25dccf
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 16 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ jobs:
cd example-project
poetry install
poetry run pre-commit run -a
poetry run mkdocs build
9 changes: 8 additions & 1 deletion {{cookiecutter.project_slug}}/.github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,11 @@ jobs:
- uses: ./.github/actions/python-poetry-env
with:
python-version: ${{ matrix.python-version }}
- run: poetry run pytest{% endraw %}
- run: poetry run pytest

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/python-poetry-env
- run: poetry run mkdocs build{% endraw %}
5 changes: 2 additions & 3 deletions {{cookiecutter.project_slug}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ pytest

### Documentation

The documentation is automatically generated from the content of the [docs directory](./docs) and from the docstrings
of the public signatures of the source code. The documentation is updated and published as a [Github project page
](https://pages.github.com/) automatically as part each release.
The documentation is automatically generated from the content of the [docs directory](https://github.com/{{ cookiecutter.github_username }}/{{ cookiecutter.project_slug }}/tree/master/docs) and from the docstrings
of the public signatures of the source code. The documentation is updated and published as a [Github Pages page](https://pages.github.com/) automatically as part each release.

### Releasing

Expand Down
4 changes: 1 addition & 3 deletions {{cookiecutter.project_slug}}/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ plugins:
default_handler: python
handlers:
python:
rendering:
options:
show_signature_annotations: true
show_source: true
show_submodules: true
watch:
- src/{{ cookiecutter.package_name }}
29 changes: 20 additions & 9 deletions {{cookiecutter.project_slug}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ packages = [
python = ">=3.8.1, <4.0"

[tool.poetry.dev-dependencies]
mkdocstrings = {version = ">=0.18", extras = ["python"]}
mkdocstrings = {version = ">=0.23", extras = ["python"]}
mkdocs-material = "*"
mypy = "*"
pre-commit = "*"
Expand Down Expand Up @@ -97,12 +97,23 @@ exclude_lines = [
]

[tool.mypy]
# This is the global mypy configuration.
# Avoid changing this!
strict = true # See all the enabled flags `mypy --help | grep -A 10 'Strict mode'`
disallow_any_unimported = true
disallow_untyped_defs = true
no_implicit_optional = true
strict_equality = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_return_any = true
check_untyped_defs = true
show_error_codes = true

# If you need to ignore something for some specific module,
# add overrides for them. Avoid changing the global config!
# For example:
# [[tool.mypy.overrides]]
# module = [
# "my_unpyted_dependency1.*",
# "my_unpyted_dependency2.*"
# ]
# ignore_missing_imports = true

# [[tool.mypy.overrides]]
# module = [
# "tests/my_thing/test_my_thing",
# ]
# disallow_untyped_defs = false

0 comments on commit f25dccf

Please sign in to comment.