-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Various tweaks and improvements
Added detection for github and gitlab so documentation deployment can be adjusted accordingly. Reference: https://gitlab.com/pages/mkdocs https://squidfunk.github.io/mkdocs-material/publishing-your-site/#gitlab-pages https://docs.gitlab.com/ee/user/project/pages/getting_started_part_one.html https://medium.com/faun/automate-you-documentation-with-gitlab-and-mkdocs-26e1b564f9f2 Updated to add python 3.9 to tests and to also setup gitlab pages on deploy stage. Fixed hardcoded github.io even when gitlab is selected. Set this for gitlab documentation pages: gitlab.io. Added precommit hook so that all tests are run via poetry run duty test. https://pre-commit.com/#intro Setup coverage to be extracted when coverage is run https://docs.gitlab.com/ee/ci/yaml/README.html#coverage coverage: '^TOTAL.+?(\d+\.\d+\%)$' Added explicit 'tests' path to pytest config. It helps IDEs like PyCharm finding tests. https://docs.pytest.org/en/stable/customize.html#pytest-ini
- Loading branch information
1 parent
54ea35b
commit 56e4973
Showing
5 changed files
with
76 additions
and
4 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,28 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- repo: https://github.com/psf/black | ||
rev: 20.8b1 # Replace by any tag/version: https://github.com/psf/black/tags | ||
hooks: | ||
- id: black | ||
language_version: python3 # Should be a command that runs python3.6+ | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.720 | ||
hooks: | ||
- id: mypy | ||
exclude: ^(docs/|example-plugin/|tests/fixtures) | ||
- repo: local | ||
hooks: | ||
- id: pytest | ||
name: Check pytest unit tests pass | ||
entry: poetry run duty test | ||
pass_filenames: false | ||
language: system | ||
types: [python] |
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 |
---|---|---|
|
@@ -13,3 +13,5 @@ addopts = | |
--cov | ||
--cov-append | ||
--cov-config config/coverage.ini | ||
testpaths = | ||
tests |
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