duty 1.4.0__tar.gz → 1.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- duty-1.4.1/CHANGELOG.md +218 -0
- duty-1.4.1/CODE_OF_CONDUCT.md +133 -0
- duty-1.4.1/CONTRIBUTING.md +151 -0
- {duty-1.4.0 → duty-1.4.1}/PKG-INFO +1 -1
- duty-1.4.1/config/coverage.ini +27 -0
- duty-1.4.1/config/git-changelog.toml +9 -0
- duty-1.4.1/config/mypy.ini +5 -0
- duty-1.4.1/config/pytest.ini +14 -0
- duty-1.4.1/config/ruff.toml +84 -0
- duty-1.4.1/config/vscode/launch.json +47 -0
- duty-1.4.1/config/vscode/settings.json +33 -0
- duty-1.4.1/config/vscode/tasks.json +97 -0
- duty-1.4.1/devdeps.txt +32 -0
- duty-1.4.1/docs/.overrides/main.html +14 -0
- duty-1.4.1/docs/.overrides/partials/comments.html +57 -0
- duty-1.4.1/docs/changelog.md +1 -0
- duty-1.4.1/docs/code_of_conduct.md +1 -0
- duty-1.4.1/docs/contributing.md +1 -0
- duty-1.4.1/docs/credits.md +10 -0
- duty-1.4.1/docs/css/material.css +4 -0
- duty-1.4.1/docs/css/mkdocstrings.css +27 -0
- duty-1.4.1/docs/demo.svg +1 -0
- duty-1.4.1/docs/gen_credits.py +62 -0
- duty-1.4.1/docs/index.md +75 -0
- duty-1.4.1/docs/js/feedback.js +14 -0
- duty-1.4.1/docs/license.md +10 -0
- duty-1.4.1/docs/usage.md +874 -0
- duty-1.4.1/duties.py +201 -0
- duty-1.4.1/mkdocs.yml +169 -0
- {duty-1.4.0 → duty-1.4.1}/pyproject.toml +13 -1
- duty-1.4.1/scripts/gen_credits.py +179 -0
- duty-1.4.1/scripts/gen_ref_nav.py +37 -0
- duty-1.4.1/scripts/make +210 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/decorator.py +1 -1
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_griffe.py +1 -1
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_ruff.py +2 -2
- {duty-1.4.0 → duty-1.4.1}/src/duty/validation.py +6 -2
- duty-1.4.1/tests/__init__.py +7 -0
- duty-1.4.1/tests/conftest.py +1 -0
- duty-1.4.1/tests/fixtures/arguments.py +6 -0
- duty-1.4.1/tests/fixtures/basic.py +6 -0
- duty-1.4.1/tests/fixtures/booleans.py +6 -0
- duty-1.4.1/tests/fixtures/code.py +6 -0
- duty-1.4.1/tests/fixtures/list.py +11 -0
- duty-1.4.1/tests/fixtures/multiple.py +11 -0
- duty-1.4.1/tests/fixtures/precedence.py +6 -0
- duty-1.4.1/tests/fixtures/validation.py +46 -0
- duty-1.4.1/tests/test_cli.py +247 -0
- duty-1.4.1/tests/test_collection.py +70 -0
- duty-1.4.1/tests/test_context.py +99 -0
- duty-1.4.1/tests/test_decorator.py +26 -0
- duty-1.4.1/tests/test_running.py +114 -0
- duty-1.4.1/tests/test_validation.py +164 -0
- {duty-1.4.0 → duty-1.4.1}/LICENSE +0 -0
- {duty-1.4.0 → duty-1.4.1}/README.md +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/__init__.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/__main__.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/__init__.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/_io.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/autoflake.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/black.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/blacken_docs.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/build.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/coverage.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/flake8.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/git_changelog.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/griffe.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/interrogate.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/isort.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/mkdocs.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/mypy.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/pytest.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/ruff.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/safety.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/ssort.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/callables/twine.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/cli.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/collection.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/context.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/debug.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/exceptions.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/py.typed +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/__init__.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_autoflake.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_base.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_black.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_blacken_docs.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_build.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_coverage.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_flake8.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_git_changelog.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_interrogate.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_isort.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_mkdocs.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_mypy.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_pytest.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_safety.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_ssort.py +0 -0
- {duty-1.4.0 → duty-1.4.1}/src/duty/tools/_twine.py +0 -0
duty-1.4.1/CHANGELOG.md
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
All notable changes to this project will be documented in this file.
|
|
3
|
+
|
|
4
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
|
+
|
|
7
|
+
<!-- insertion marker -->
|
|
8
|
+
## [1.4.1](https://github.com/pawamoy/duty/releases/tag/1.4.1) - 2024-08-15
|
|
9
|
+
|
|
10
|
+
<small>[Compare with 1.4.0](https://github.com/pawamoy/duty/compare/1.4.0...1.4.1)</small>
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- Fix call to `eval_type` (missing `type_params` argument on Python 3.13) ([eae6c85](https://github.com/pawamoy/duty/commit/eae6c85b26ee5c95739d3d108460d2145c18fc26) by Timothée Mazzucotelli).
|
|
15
|
+
|
|
16
|
+
### Code Refactoring
|
|
17
|
+
|
|
18
|
+
- Update Griffe tool ([3f69fa0](https://github.com/pawamoy/duty/commit/3f69fa0d027468315f82e96d417d6681a4a061f0) by Timothée Mazzucotelli).
|
|
19
|
+
|
|
20
|
+
## [1.4.0](https://github.com/pawamoy/duty/releases/tag/1.4.0) - 2024-05-19
|
|
21
|
+
|
|
22
|
+
<small>[Compare with 1.3.0](https://github.com/pawamoy/duty/compare/1.3.0...1.4.0)</small>
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
- Allow passing additional arguments, preventing their interpretation by delimitating them with `--` if needed ([9df0437](https://github.com/pawamoy/duty/commit/9df0437969a476073fd1e71b3d6cdce7f80e113f) by Timothée Mazzucotelli). [Issue-15](https://github.com/pawamoy/duty/issues/15)
|
|
27
|
+
- Rewrite callables as "tools", to allow building the `command` value automatically ([55c9b9f](https://github.com/pawamoy/duty/commit/55c9b9ff117d7f36a07268689707a9d72cad82b9) by Timothée Mazzucotelli). [Issue-21](https://github.com/pawamoy/duty/issues/21)
|
|
28
|
+
- Expose all callables in their parent module ([e3357b9](https://github.com/pawamoy/duty/commit/e3357b965e4c0829a368a5b146af4fec056cc93d) by Timothée Mazzucotelli).
|
|
29
|
+
- Add callable for Griffe ([36644c4](https://github.com/pawamoy/duty/commit/36644c4ea15afc11114fbdb6c4db4a7ad9c7252a) by Timothée Mazzucotelli).
|
|
30
|
+
- Add callable for git-changelog ([c236b43](https://github.com/pawamoy/duty/commit/c236b4377ed3a5c11f4af518e0a8e433fdec242c) by Timothée Mazzucotelli).
|
|
31
|
+
- Add callable for build ([efbe66e](https://github.com/pawamoy/duty/commit/efbe66e80fedbf44dbf13d167919d9370ea4767f) by Timothée Mazzucotelli). [Issue-18](https://github.com/pawamoy/duty/issues/18)
|
|
32
|
+
- Add callable for Twine ([608c1c2](https://github.com/pawamoy/duty/commit/608c1c27e38b63485b8ca010ca4c797c42e561c1) by Timothée Mazzucotelli). [Issue-19](https://github.com/pawamoy/duty/issues/19)
|
|
33
|
+
|
|
34
|
+
## [1.3.0](https://github.com/pawamoy/duty/releases/tag/1.3.0) - 2024-04-28
|
|
35
|
+
|
|
36
|
+
<small>[Compare with 1.2.0](https://github.com/pawamoy/duty/compare/1.2.0...1.3.0)</small>
|
|
37
|
+
|
|
38
|
+
### Features
|
|
39
|
+
|
|
40
|
+
- Support duty parameters annotated as type unions, with both old and modern syntax, even on Python 3.8 and 3.9 ([e8ca7c1](https://github.com/pawamoy/duty/commit/e8ca7c1fb453a6f0b3de3268e2cea3434985c428) by Timothée Mazzucotelli).
|
|
41
|
+
|
|
42
|
+
## [1.2.0](https://github.com/pawamoy/duty/releases/tag/1.2.0) - 2024-01-31
|
|
43
|
+
|
|
44
|
+
<small>[Compare with 1.1.0](https://github.com/pawamoy/duty/compare/1.1.0...1.2.0)</small>
|
|
45
|
+
|
|
46
|
+
### Features
|
|
47
|
+
|
|
48
|
+
- Support safety v3 in safety callable ([5f832b1](https://github.com/pawamoy/duty/commit/5f832b1bc57163db2d1458d79554239588ea5348) by Timothée Mazzucotelli).
|
|
49
|
+
|
|
50
|
+
## [1.1.0](https://github.com/pawamoy/duty/releases/tag/1.1.0) - 2023-10-25
|
|
51
|
+
|
|
52
|
+
<small>[Compare with 1.0.0](https://github.com/pawamoy/duty/compare/1.0.0...1.1.0)</small>
|
|
53
|
+
|
|
54
|
+
### Dependencies
|
|
55
|
+
|
|
56
|
+
- Exclude failprint 1.0 from accepted versions ([25f088a](https://github.com/pawamoy/duty/commit/25f088a0dddc69002fd8da195c4ab4884aacf004) by Timothée Mazzucotelli).
|
|
57
|
+
|
|
58
|
+
### Features
|
|
59
|
+
|
|
60
|
+
- Add `format` command to Ruff callable ([d462425](https://github.com/pawamoy/duty/commit/d4624251cc0a8332d0c931d374caab47f0e05ac0) by Kyle Wigley). [PR #16](https://github.com/pawamoy/duty/pull/16)
|
|
61
|
+
|
|
62
|
+
## [1.0.0](https://github.com/pawamoy/duty/releases/tag/1.0.0) - 2023-06-27
|
|
63
|
+
|
|
64
|
+
<small>[Compare with 0.11.1](https://github.com/pawamoy/duty/compare/0.11.1...1.0.0)</small>
|
|
65
|
+
|
|
66
|
+
### Breaking Changes
|
|
67
|
+
|
|
68
|
+
- Drop support for Python 3.7
|
|
69
|
+
|
|
70
|
+
### Dependencies
|
|
71
|
+
|
|
72
|
+
- Remove dependencies for Python 3.7 ([a1d2629](https://github.com/pawamoy/duty/commit/a1d262978d1294c421874152d26ad5f1bfdc67c2) by Timothée Mazzucotelli).
|
|
73
|
+
|
|
74
|
+
### Features
|
|
75
|
+
|
|
76
|
+
- Cast parameters using default values' type when there's no annotation ([c93db55](https://github.com/pawamoy/duty/commit/c93db55126cf2463401deeb07c0a475f052066d3) by Timothée Mazzucotelli). [Issue #10](https://github.com/pawamoy/duty/issues/10)
|
|
77
|
+
|
|
78
|
+
### Bug Fixes
|
|
79
|
+
|
|
80
|
+
- Fix parameter casting for stringified annotations ([56090e5](https://github.com/pawamoy/duty/commit/56090e59034302fd5b91047ebfa37228b206a32d) by Timothée Mazzucotelli).
|
|
81
|
+
|
|
82
|
+
### Code Refactoring
|
|
83
|
+
|
|
84
|
+
- Remove Python 3.7 related code ([b412f29](https://github.com/pawamoy/duty/commit/b412f292a9a2b81d44a5e1bcba5a4aa3211d329c) by Timothée Mazzucotelli).
|
|
85
|
+
- Add duties module to `sys.modules` after loading it ([5730f5f](https://github.com/pawamoy/duty/commit/5730f5f4c921b3694f0d6e48af3d54e049648f3e) by Timothée Mazzucotelli).
|
|
86
|
+
|
|
87
|
+
## [0.11.1](https://github.com/pawamoy/duty/releases/tag/0.11.1) - 2023-05-23
|
|
88
|
+
|
|
89
|
+
<small>[Compare with 0.11.0](https://github.com/pawamoy/duty/compare/0.11.0...0.11.1)</small>
|
|
90
|
+
|
|
91
|
+
### Code Refactoring
|
|
92
|
+
|
|
93
|
+
- Print help and duties when no arguments are given ([eaab432](https://github.com/pawamoy/duty/commit/eaab4324b8581fbd9ef2208ab3b0ecb625adb8bd) by Timothée Mazzucotelli). [Issue #11](https://github.com/pawamoy/duty/issues/11)
|
|
94
|
+
|
|
95
|
+
## [0.11.0](https://github.com/pawamoy/duty/releases/tag/0.11.0) - 2023-04-13
|
|
96
|
+
|
|
97
|
+
<small>[Compare with 0.10.0](https://github.com/pawamoy/duty/compare/0.10.0...0.11.0)</small>
|
|
98
|
+
|
|
99
|
+
### Features
|
|
100
|
+
|
|
101
|
+
- Add callable for `ssort` ([11b54da](https://github.com/pawamoy/duty/commit/11b54dab2f36efbac0650b825ed2e3ce73e9afac) by Timothée Mazzucotelli).
|
|
102
|
+
|
|
103
|
+
## [0.10.0](https://github.com/pawamoy/duty/releases/tag/0.10.0) - 2023-04-10
|
|
104
|
+
|
|
105
|
+
<small>[Compare with 0.9.0](https://github.com/pawamoy/duty/compare/0.9.0...0.10.0)</small>
|
|
106
|
+
|
|
107
|
+
### Features
|
|
108
|
+
|
|
109
|
+
- Support updated lazy decorator from `failprint` ([a0446ac](https://github.com/pawamoy/duty/commit/a0446ac20672344ab9508d661e21ff5b5132742b) by Timothée Mazzucotelli).
|
|
110
|
+
|
|
111
|
+
## [0.9.0](https://github.com/pawamoy/duty/releases/tag/0.9.0) - 2023-03-07
|
|
112
|
+
|
|
113
|
+
<small>[Compare with 0.8.0](https://github.com/pawamoy/duty/compare/0.8.0...0.9.0)</small>
|
|
114
|
+
|
|
115
|
+
### Features
|
|
116
|
+
|
|
117
|
+
- Add callable for Interrogate ([9be8068](https://github.com/pawamoy/duty/commit/9be80680c0d0ab5fbe62e6a117ed655d68da7967) by jexio). [PR #8](https://github.com/pawamoy/duty/pull/8)
|
|
118
|
+
|
|
119
|
+
## [0.8.0](https://github.com/pawamoy/duty/releases/tag/0.8.0) - 2023-02-18
|
|
120
|
+
|
|
121
|
+
<small>[Compare with 0.7.0](https://github.com/pawamoy/duty/compare/0.7.0...0.8.0)</small>
|
|
122
|
+
|
|
123
|
+
### Features
|
|
124
|
+
|
|
125
|
+
- Make all callables lazy, allowing to call them directly ([a499e4b](https://github.com/pawamoy/duty/commit/a499e4b42a26eee28d921d818f92b7747a8f3cad) by Timothée Mazzucotelli).
|
|
126
|
+
- Provide callables for popular tools ([0e065e2](https://github.com/pawamoy/duty/commit/0e065e2be722d26d8c2f0e38f4d593f140da1f5d) by Timothée Mazzucotelli). [Issue #7](https://github.com/pawamoy/duty/issues/7)
|
|
127
|
+
- Add option to skip duties based on condition ([629b988](https://github.com/pawamoy/duty/commit/629b988880de8b7c3f5b42fcbdb2ec9018c29dbc) by Timothée Mazzucotelli). [Issue #6](https://github.com/pawamoy/duty/issues/6)
|
|
128
|
+
|
|
129
|
+
## [0.7.0](https://github.com/pawamoy/duty/releases/tag/0.7.0) - 2021-08-01
|
|
130
|
+
|
|
131
|
+
<small>[Compare with 0.6.0](https://github.com/pawamoy/duty/compare/0.6.0...0.7.0)</small>
|
|
132
|
+
|
|
133
|
+
### Features
|
|
134
|
+
- Make `ctx.run` return the command output ([1810623](https://github.com/pawamoy/duty/commit/1810623a67bd102aceb56b3285064753d58d464e) by Timothée Mazzucotelli). [Issue #4](https://github.com/pawamoy/duty/issues/4)
|
|
135
|
+
- Add `allow_overrides` and `workdir` options ([ddbf7a2](https://github.com/pawamoy/duty/commit/ddbf7a260dc0bcb06603400197d514e63e77253d) by Timothée Mazzucotelli). [Issue #1](https://github.com/pawamoy/duty/issues/1)
|
|
136
|
+
- Allow passing standard input to a command (thanks to [*failprint* 0.8](https://pawamoy.github.io/failprint/changelog/#080-2021-07-31)). [Issue #3](https://github.com/pawamoy/duty/issues/3)
|
|
137
|
+
|
|
138
|
+
### Bug Fixes
|
|
139
|
+
- Make duties unwrappable ([c96325a](https://github.com/pawamoy/duty/commit/c96325a302ca52670bf33c8950c24d1fd441280f) by Timothée Mazzucotelli).
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## [0.6.0](https://github.com/pawamoy/duty/releases/tag/0.6.0) - 2021-02-06
|
|
143
|
+
|
|
144
|
+
<small>[Compare with 0.5.0](https://github.com/pawamoy/duty/compare/0.5.0...0.6.0)</small>
|
|
145
|
+
|
|
146
|
+
This release greatly improves usability on the command line!
|
|
147
|
+
You will now be able to override `silent`, `capture` and other options
|
|
148
|
+
with arguments like `--silent`, `--no-silent`, `--capture=both`, etc.
|
|
149
|
+
See [Usage](https://pawamoy.github.io/duty/usage/) in the docs for details!
|
|
150
|
+
|
|
151
|
+
### Features
|
|
152
|
+
- Implement type casting based on annotations ([52ea614](https://github.com/pawamoy/duty/commit/52ea614f1ff1186651f22e9322b5e5ad0e23d66c) by Timothée Mazzucotelli).
|
|
153
|
+
- Improve CLI usage ([93e10cd](https://github.com/pawamoy/duty/commit/93e10cdaaace17c7422bb128ef2d5278187d02a9) by Timothée Mazzucotelli).
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## [0.5.0](https://github.com/pawamoy/duty/releases/tag/0.5.0) - 2020-10-11
|
|
157
|
+
|
|
158
|
+
<small>[Compare with 0.4.1](https://github.com/pawamoy/duty/compare/0.4.1...0.5.0)</small>
|
|
159
|
+
|
|
160
|
+
### Packaging
|
|
161
|
+
- Use `failprint` version 0.6.0 ([changelog](https://pawamoy.github.io/failprint/changelog/#060-2020-10-11)).
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
## [0.4.1](https://github.com/pawamoy/duty/releases/tag/0.4.1) - 2020-10-05
|
|
165
|
+
|
|
166
|
+
<small>[Compare with 0.4.0](https://github.com/pawamoy/duty/compare/0.4.0...0.4.1)</small>
|
|
167
|
+
|
|
168
|
+
### Bug Fixes
|
|
169
|
+
- Fix `-d` option parsing ([a004c7f](https://github.com/pawamoy/duty/commit/a004c7fb3d9849fe877d775738950b8e93934af2) by Timothée Mazzucotelli).
|
|
170
|
+
|
|
171
|
+
### Code Refactoring
|
|
172
|
+
- Accept args and kwargs in decorator ([567334f](https://github.com/pawamoy/duty/commit/567334f0a9e68a2592ca13ea7d43f7ab587359e6) by Timothée Mazzucotelli).
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
## [0.4.0](https://github.com/pawamoy/duty/releases/tag/0.4.0) - 2020-10-05
|
|
176
|
+
|
|
177
|
+
<small>[Compare with 0.3.1](https://github.com/pawamoy/duty/compare/0.3.1...0.4.0)</small>
|
|
178
|
+
|
|
179
|
+
### Features
|
|
180
|
+
- Add list options and aliases ([c238110](https://github.com/pawamoy/duty/commit/c23811013f92609907c934a1f54e65c209c6f7f0) by Timothée Mazzucotelli).
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
## [0.3.1](https://github.com/pawamoy/duty/releases/tag/0.3.1) - 2020-10-04
|
|
184
|
+
|
|
185
|
+
<small>[Compare with 0.3.0](https://github.com/pawamoy/duty/compare/0.3.0...0.3.1)</small>
|
|
186
|
+
|
|
187
|
+
### Bug Fixes
|
|
188
|
+
- Add missing `failprint` dependency ([5b1663c](https://github.com/pawamoy/duty/commit/5b1663ccacc12bcefe28ab2bcce5b43a5953f073) by Timothée Mazzucotelli).
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
## [0.3.0](https://github.com/pawamoy/duty/releases/tag/0.3.0) - 2020-10-04
|
|
192
|
+
|
|
193
|
+
<small>[Compare with 0.2.0](https://github.com/pawamoy/duty/compare/0.2.0...0.3.0)</small>
|
|
194
|
+
|
|
195
|
+
### Bug Fixes
|
|
196
|
+
- Add missing `__call__` method to `Duty` ([290e283](https://github.com/pawamoy/duty/commit/290e2836b5e720f952f4224e7e07dbe19532ed0e) by Timothée Mazzucotelli).
|
|
197
|
+
|
|
198
|
+
### Code Refactoring
|
|
199
|
+
- Better handle CLI arguments ([144b33d](https://github.com/pawamoy/duty/commit/144b33d8095c5e338c589d674a62e404e8aa3e39) by Timothée Mazzucotelli).
|
|
200
|
+
|
|
201
|
+
### Features
|
|
202
|
+
- Handle keyboard interruptions ([1c5b594](https://github.com/pawamoy/duty/commit/1c5b594df84ae036c3eac58db391684a7d591d18) by Timothée Mazzucotelli).
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
## [0.2.0](https://github.com/pawamoy/duty/releases/tag/0.2.0) - 2020-10-02
|
|
206
|
+
|
|
207
|
+
<small>[Compare with 0.1.0](https://github.com/pawamoy/duty/compare/0.1.0...0.2.0)</small>
|
|
208
|
+
|
|
209
|
+
### Features
|
|
210
|
+
- Initial features ([3c395d3](https://github.com/pawamoy/duty/commit/3c395d36ec404877b2a6e2a55f7645c5ff22b894) by Timothée Mazzucotelli).
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
## [0.1.0](https://github.com/pawamoy/duty/releases/tag/0.1.0) - 2020-10-02
|
|
214
|
+
|
|
215
|
+
<small>[Compare with first commit](https://github.com/pawamoy/duty/compare/371ef31789160379c8c8f013b5c2574907150715...0.1.0)</small>
|
|
216
|
+
|
|
217
|
+
### Features
|
|
218
|
+
- Initial commit ([371ef31](https://github.com/pawamoy/duty/commit/371ef31789160379c8c8f013b5c2574907150715) by Timothée Mazzucotelli).
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
* Demonstrating empathy and kindness toward other people
|
|
21
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
* Giving and gracefully accepting constructive feedback
|
|
23
|
+
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
* Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
* The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
* Public or private harassment
|
|
34
|
+
* Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
dev@pawamoy.fr.
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
|
86
|
+
actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
+
interaction with the people involved, including unsolicited interaction with
|
|
90
|
+
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
+
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
+
like social media. Violating these terms may lead to a temporary or permanent
|
|
93
|
+
ban.
|
|
94
|
+
|
|
95
|
+
### 3. Temporary Ban
|
|
96
|
+
|
|
97
|
+
**Community Impact**: A serious violation of community standards, including
|
|
98
|
+
sustained inappropriate behavior.
|
|
99
|
+
|
|
100
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
+
communication with the community for a specified period of time. No public or
|
|
102
|
+
private interaction with the people involved, including unsolicited interaction
|
|
103
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
+
Violating these terms may lead to a permanent ban.
|
|
105
|
+
|
|
106
|
+
### 4. Permanent Ban
|
|
107
|
+
|
|
108
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
+
|
|
112
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
113
|
+
community.
|
|
114
|
+
|
|
115
|
+
## Attribution
|
|
116
|
+
|
|
117
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
+
version 2.1, available at
|
|
119
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
120
|
+
|
|
121
|
+
Community Impact Guidelines were inspired by
|
|
122
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
123
|
+
|
|
124
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
125
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
126
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
127
|
+
|
|
128
|
+
[homepage]: https://www.contributor-covenant.org
|
|
129
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
130
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
131
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
132
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
133
|
+
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Contributions are welcome, and they are greatly appreciated!
|
|
4
|
+
Every little bit helps, and credit will always be given.
|
|
5
|
+
|
|
6
|
+
## Environment setup
|
|
7
|
+
|
|
8
|
+
Nothing easier!
|
|
9
|
+
|
|
10
|
+
Fork and clone the repository, then:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
cd duty
|
|
14
|
+
make setup
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
> NOTE:
|
|
18
|
+
> If it fails for some reason,
|
|
19
|
+
> you'll need to install
|
|
20
|
+
> [uv](https://github.com/astral-sh/uv)
|
|
21
|
+
> manually.
|
|
22
|
+
>
|
|
23
|
+
> You can install it with:
|
|
24
|
+
>
|
|
25
|
+
> ```bash
|
|
26
|
+
> python3 -m pip install --user pipx
|
|
27
|
+
> pipx install uv
|
|
28
|
+
> ```
|
|
29
|
+
>
|
|
30
|
+
> Now you can try running `make setup` again,
|
|
31
|
+
> or simply `uv install`.
|
|
32
|
+
|
|
33
|
+
You now have the dependencies installed.
|
|
34
|
+
|
|
35
|
+
You can run the application with `make run duty [ARGS...]`.
|
|
36
|
+
|
|
37
|
+
Run `make help` to see all the available actions!
|
|
38
|
+
|
|
39
|
+
## Tasks
|
|
40
|
+
|
|
41
|
+
The entry-point to run commands and tasks is the `make` Python script,
|
|
42
|
+
located in the `scripts` directory. Try running `make` to show the available commands and tasks.
|
|
43
|
+
The *commands* do not need the Python dependencies to be installed,
|
|
44
|
+
while the *tasks* do.
|
|
45
|
+
The cross-platform tasks are written in Python, thanks to [duty](https://github.com/pawamoy/duty).
|
|
46
|
+
|
|
47
|
+
If you work in VSCode, we provide
|
|
48
|
+
[an action to configure VSCode](https://pawamoy.github.io/copier-uv/work/#vscode-setup)
|
|
49
|
+
for the project.
|
|
50
|
+
|
|
51
|
+
## Development
|
|
52
|
+
|
|
53
|
+
As usual:
|
|
54
|
+
|
|
55
|
+
1. create a new branch: `git switch -c feature-or-bugfix-name`
|
|
56
|
+
1. edit the code and/or the documentation
|
|
57
|
+
|
|
58
|
+
**Before committing:**
|
|
59
|
+
|
|
60
|
+
1. run `make format` to auto-format the code
|
|
61
|
+
1. run `make check` to check everything (fix any warning)
|
|
62
|
+
1. run `make test` to run the tests (fix any issue)
|
|
63
|
+
1. if you updated the documentation or the project dependencies:
|
|
64
|
+
1. run `make docs`
|
|
65
|
+
1. go to http://localhost:8000 and check that everything looks good
|
|
66
|
+
1. follow our [commit message convention](#commit-message-convention)
|
|
67
|
+
|
|
68
|
+
If you are unsure about how to fix or ignore a warning,
|
|
69
|
+
just let the continuous integration fail,
|
|
70
|
+
and we will help you during review.
|
|
71
|
+
|
|
72
|
+
Don't bother updating the changelog, we will take care of this.
|
|
73
|
+
|
|
74
|
+
## Commit message convention
|
|
75
|
+
|
|
76
|
+
Commit messages must follow our convention based on the
|
|
77
|
+
[Angular style](https://gist.github.com/stephenparish/9941e89d80e2bc58a153#format-of-the-commit-message)
|
|
78
|
+
or the [Karma convention](https://karma-runner.github.io/4.0/dev/git-commit-msg.html):
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
<type>[(scope)]: Subject
|
|
82
|
+
|
|
83
|
+
[Body]
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Subject and body must be valid Markdown.**
|
|
87
|
+
Subject must have proper casing (uppercase for first letter
|
|
88
|
+
if it makes sense), but no dot at the end, and no punctuation
|
|
89
|
+
in general.
|
|
90
|
+
|
|
91
|
+
Scope and body are optional. Type can be:
|
|
92
|
+
|
|
93
|
+
- `build`: About packaging, building wheels, etc.
|
|
94
|
+
- `chore`: About packaging or repo/files management.
|
|
95
|
+
- `ci`: About Continuous Integration.
|
|
96
|
+
- `deps`: Dependencies update.
|
|
97
|
+
- `docs`: About documentation.
|
|
98
|
+
- `feat`: New feature.
|
|
99
|
+
- `fix`: Bug fix.
|
|
100
|
+
- `perf`: About performance.
|
|
101
|
+
- `refactor`: Changes that are not features or bug fixes.
|
|
102
|
+
- `style`: A change in code style/format.
|
|
103
|
+
- `tests`: About tests.
|
|
104
|
+
|
|
105
|
+
If you write a body, please add trailers at the end
|
|
106
|
+
(for example issues and PR references, or co-authors),
|
|
107
|
+
without relying on GitHub's flavored Markdown:
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
Body.
|
|
111
|
+
|
|
112
|
+
Issue #10: https://github.com/namespace/project/issues/10
|
|
113
|
+
Related to PR namespace/other-project#15: https://github.com/namespace/other-project/pull/15
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
These "trailers" must appear at the end of the body,
|
|
117
|
+
without any blank lines between them. The trailer title
|
|
118
|
+
can contain any character except colons `:`.
|
|
119
|
+
We expect a full URI for each trailer, not just GitHub autolinks
|
|
120
|
+
(for example, full GitHub URLs for commits and issues,
|
|
121
|
+
not the hash or the #issue-number).
|
|
122
|
+
|
|
123
|
+
We do not enforce a line length on commit messages summary and body,
|
|
124
|
+
but please avoid very long summaries, and very long lines in the body,
|
|
125
|
+
unless they are part of code blocks that must not be wrapped.
|
|
126
|
+
|
|
127
|
+
## Pull requests guidelines
|
|
128
|
+
|
|
129
|
+
Link to any related issue in the Pull Request message.
|
|
130
|
+
|
|
131
|
+
During the review, we recommend using fixups:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
# SHA is the SHA of the commit you want to fix
|
|
135
|
+
git commit --fixup=SHA
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Once all the changes are approved, you can squash your commits:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
git rebase -i --autosquash main
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
And force-push:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
git push -f
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
If this seems all too complicated, you can push or force-push each new commit,
|
|
151
|
+
and we will squash them ourselves if needed, before merging.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[coverage:run]
|
|
2
|
+
branch = true
|
|
3
|
+
parallel = true
|
|
4
|
+
source =
|
|
5
|
+
src/
|
|
6
|
+
tests/
|
|
7
|
+
|
|
8
|
+
[coverage:paths]
|
|
9
|
+
equivalent =
|
|
10
|
+
src/
|
|
11
|
+
.venv/lib/*/site-packages/
|
|
12
|
+
.venvs/*/lib/*/site-packages/
|
|
13
|
+
|
|
14
|
+
[coverage:report]
|
|
15
|
+
precision = 2
|
|
16
|
+
omit =
|
|
17
|
+
src/*/__init__.py
|
|
18
|
+
src/*/__main__.py
|
|
19
|
+
src/*/callables/*
|
|
20
|
+
src/*/tools/*
|
|
21
|
+
tests/__init__.py
|
|
22
|
+
exclude_lines =
|
|
23
|
+
pragma: no cover
|
|
24
|
+
if TYPE_CHECKING
|
|
25
|
+
|
|
26
|
+
[coverage:json]
|
|
27
|
+
output = htmlcov/coverage.json
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[pytest]
|
|
2
|
+
python_files =
|
|
3
|
+
test_*.py
|
|
4
|
+
addopts =
|
|
5
|
+
--cov
|
|
6
|
+
--cov-config config/coverage.ini
|
|
7
|
+
testpaths =
|
|
8
|
+
tests
|
|
9
|
+
|
|
10
|
+
# action:message_regex:warning_class:module_regex:line
|
|
11
|
+
filterwarnings =
|
|
12
|
+
error
|
|
13
|
+
# TODO: remove once pytest-xdist 4 is released
|
|
14
|
+
ignore:.*rsyncdir:DeprecationWarning:xdist
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
target-version = "py38"
|
|
2
|
+
line-length = 120
|
|
3
|
+
|
|
4
|
+
[lint]
|
|
5
|
+
exclude = [
|
|
6
|
+
"tests/fixtures/*.py",
|
|
7
|
+
]
|
|
8
|
+
select = [
|
|
9
|
+
"A", "ANN", "ARG",
|
|
10
|
+
"B", "BLE",
|
|
11
|
+
"C", "C4",
|
|
12
|
+
"COM",
|
|
13
|
+
"D", "DTZ",
|
|
14
|
+
"E", "ERA", "EXE",
|
|
15
|
+
"F", "FBT",
|
|
16
|
+
"G",
|
|
17
|
+
"I", "ICN", "INP", "ISC",
|
|
18
|
+
"N",
|
|
19
|
+
"PGH", "PIE", "PL", "PLC", "PLE", "PLR", "PLW", "PT", "PYI",
|
|
20
|
+
"Q",
|
|
21
|
+
"RUF", "RSE", "RET",
|
|
22
|
+
"S", "SIM", "SLF",
|
|
23
|
+
"T", "T10", "T20", "TCH", "TID", "TRY",
|
|
24
|
+
"UP",
|
|
25
|
+
"W",
|
|
26
|
+
"YTT",
|
|
27
|
+
]
|
|
28
|
+
ignore = [
|
|
29
|
+
"A001", # Variable is shadowing a Python builtin
|
|
30
|
+
"ANN101", # Missing type annotation for self
|
|
31
|
+
"ANN102", # Missing type annotation for cls
|
|
32
|
+
"ANN204", # Missing return type annotation for special method __str__
|
|
33
|
+
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
|
|
34
|
+
"ARG005", # Unused lambda argument
|
|
35
|
+
"C901", # Too complex
|
|
36
|
+
"D105", # Missing docstring in magic method
|
|
37
|
+
"D417", # Missing argument description in the docstring
|
|
38
|
+
"E501", # Line too long
|
|
39
|
+
"ERA001", # Commented out code
|
|
40
|
+
"G004", # Logging statement uses f-string
|
|
41
|
+
"PLR0911", # Too many return statements
|
|
42
|
+
"PLR0912", # Too many branches
|
|
43
|
+
"PLR0913", # Too many arguments to function call
|
|
44
|
+
"PLR0915", # Too many statements
|
|
45
|
+
"SLF001", # Private member accessed
|
|
46
|
+
"TRY003", # Avoid specifying long messages outside the exception class
|
|
47
|
+
]
|
|
48
|
+
|
|
49
|
+
[lint.per-file-ignores]
|
|
50
|
+
"src/*/cli.py" = [
|
|
51
|
+
"T201", # Print statement
|
|
52
|
+
]
|
|
53
|
+
"src/*/debug.py" = [
|
|
54
|
+
"T201", # Print statement
|
|
55
|
+
]
|
|
56
|
+
"scripts/*.py" = [
|
|
57
|
+
"INP001", # File is part of an implicit namespace package
|
|
58
|
+
"T201", # Print statement
|
|
59
|
+
]
|
|
60
|
+
"tests/*.py" = [
|
|
61
|
+
"ARG005", # Unused lambda argument
|
|
62
|
+
"FBT001", # Boolean positional arg in function definition
|
|
63
|
+
"PLR2004", # Magic value used in comparison
|
|
64
|
+
"S101", # Use of assert detected
|
|
65
|
+
]
|
|
66
|
+
|
|
67
|
+
[lint.flake8-quotes]
|
|
68
|
+
docstring-quotes = "double"
|
|
69
|
+
|
|
70
|
+
[lint.flake8-tidy-imports]
|
|
71
|
+
ban-relative-imports = "all"
|
|
72
|
+
|
|
73
|
+
[lint.isort]
|
|
74
|
+
known-first-party = ["duty"]
|
|
75
|
+
|
|
76
|
+
[lint.pydocstyle]
|
|
77
|
+
convention = "google"
|
|
78
|
+
|
|
79
|
+
[format]
|
|
80
|
+
exclude = [
|
|
81
|
+
"tests/fixtures/*.py",
|
|
82
|
+
]
|
|
83
|
+
docstring-code-format = true
|
|
84
|
+
docstring-code-line-length = 80
|