Skip to content

Commit a42a6b4

Browse files
added task file
1 parent 556cf61 commit a42a6b4

File tree

76 files changed

+25979
-9673
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+25979
-9673
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,11 @@ jobs:
2020
check-latest: true
2121
- name: Install dependencies
2222
run: |
23-
python -m pip install --upgrade pip
23+
task dependencies
2424
pip install -U coveralls
25-
pip install -e .[dev]
2625
- name: Run tests with pytest
2726
run: |
28-
pytest --doctest-modules --cov=pedantic --cov-branch --cov-report= --cov-report=term
27+
task tests-with-cov
2928
- name: Coveralls
3029
uses: coverallsapp/github-action@v2.3.6
3130
with:
@@ -53,4 +52,4 @@ jobs:
5352
- name: Build and Upload to PyPI
5453
run: |
5554
python -m build
56-
twine upload dist/*
55+
twine upload dist/*

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
- removed decorator `@timer`
88
- removed decorator `@timer_class`
99
- removed decorator `@uminplemented`
10+
- added `Taskfile.yml` and use it in CI
11+
- removed `create_pdoc.sh`
12+
- moved `examples` out of the package
1013

1114
## Pedantic 2.4.0
1215
- migrate from unittest to pytest

README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -144,26 +144,19 @@ if __name__ == '__main__':
144144
```
145145

146146
## List of all decorators in this package
147-
- [@count_calls](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_count_calls.html)
148147
- [@deprecated](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_deprecated.html)
149-
- [@does_same_as_function](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_does_same_as_function.html)
150148
- [@frozen_dataclass](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/cls_deco_frozen_dataclass.html#pedantic.decorators.cls_deco_frozen_dataclass.frozen_dataclass)
151149
- [@frozen_type_safe_dataclass](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/cls_deco_frozen_dataclass.html#pedantic.decorators.cls_deco_frozen_dataclass.frozen_type_safe_dataclass)
152150
- [@for_all_methods](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/class_decorators.html#pedantic.decorators.class_decorators.for_all_methods)
153151
- [@in_subprocess](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_in_subprocess.html)
154-
- [@mock](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_mock.html)
155152
- [@overrides](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_overrides.html)
156153
- [@pedantic](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_pedantic.html#pedantic.decorators.fn_deco_pedantic.pedantic)
157154
- [@pedantic_class](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/class_decorators.html#pedantic.decorators.class_decorators.pedantic_class)
158-
- [@rename_kwargs](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_rename_kwargs.html)
159155
- [@require_kwargs](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_require_kwargs.html)
160156
- [@retry](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_retry.html)
161-
- [@timer](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_timer.html)
162-
- [@timer_class](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/class_decorators.html#pedantic.decorators.class_decorators.timer_class)
163157
- [@trace](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_trace.html)
164158
- [@trace_class](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/class_decorators.html#pedantic.decorators.class_decorators.trace_class)
165159
- [@trace_if_returns](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_trace_if_returns.html)
166-
- [@unimplemented](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_unimplemented.html)
167160
- [@validate](https://lostindarkmath.github.io/pedantic-python-decorators/pedantic/decorators/fn_deco_validate/fn_deco_validate.html)
168161

169162
## List of all mixins in this package
@@ -183,12 +176,7 @@ There are no hard dependencies. But if you want to use some advanced features yo
183176
- `GenericFlaskDeserializer`
184177

185178
## Contributing
186-
Feel free to contribute by submitting a pull request :)
187-
188-
## Acknowledgments
189-
* [Rathaustreppe](https://github.com/rathaustreppe)
190-
* [Aran-Fey](https://stackoverflow.com/questions/55503673/how-do-i-check-if-a-value-matches-a-type-in-python/55504010#55504010)
191-
* [user395760](https://stackoverflow.com/questions/55503673/how-do-i-check-if-a-value-matches-a-type-in-python/55504010#55504010)
179+
This project is based on [poetry](https://python-poetry.org/) and [taskfile](https://taskfile.dev).
192180

193181
## Risks and side effects
194182
The usage of decorators may affect the performance of your application.

Taskfile.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# yaml-language-server: $schema=https://taskfile.dev/schema.json
2+
3+
version: '3'
4+
5+
tasks:
6+
dependencies:
7+
desc: Updates the poetry.lock file and installs all dependencies
8+
cmds:
9+
- pip install --upgrade pip
10+
- poetry lock
11+
- poetry install --extras dev
12+
silent: true
13+
tests:
14+
desc: Runs the tests
15+
cmds:
16+
- pytest --doctest-modules
17+
tests-with-cov:
18+
desc: Runs the tests with coverage
19+
cmds:
20+
- pytest --doctest-modules --cov=pedantic --cov-branch --cov-report= --cov-report=term
21+
docs:
22+
desc: Creates the HTML documentation
23+
cmds:
24+
- rm -rf ./docs
25+
- pip install pdoc
26+
- pdoc -o docs pedantic
27+
- google-chrome ./docs/index.html

create_pdoc.sh

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="refresh" content="0; url=./pedantic.html"/>
6+
</head>
7+
</html>

docs/pedantic.html

Lines changed: 262 additions & 0 deletions
Large diffs are not rendered by default.

docs/pedantic/constants.html

Lines changed: 394 additions & 61 deletions
Large diffs are not rendered by default.

docs/pedantic/decorators.html

Lines changed: 263 additions & 0 deletions
Large diffs are not rendered by default.

docs/pedantic/decorators/class_decorators.html

Lines changed: 469 additions & 169 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)