Skip to content

Commit 98bec38

Browse files
committed
(env): create maidfile to store tasks and descriptions
- so that there's a clear place where all the tasks are defined and so anything you might use for development is written out there - this should make for less confusion between poetry and setup.py use-cases - this isn't quite a CONTRIBUTING.md, but is kind of an in-between - and is a necessary tool for myself to not forget and to help contributors anyway - replace release.sh and changelog.sh with their own tasks - and split release into a few tasks that are then combined - makes it easier to publish to test PyPI and harder to accidentally publish to production PyPI too
1 parent e660be7 commit 98bec38

File tree

3 files changed

+88
-7
lines changed

3 files changed

+88
-7
lines changed

changelog.sh

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

maidfile.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Tasks
2+
3+
## Prerequisites
4+
5+
1. `node.js` and `npm` (task runner and some tasks make use of JS ecosystem)
6+
1. `npm i -g maid` or just run with `npx maid`
7+
8+
## Directions
9+
10+
To run any of the tasks listed below (the headers), run `maid <task>`.
11+
You can also see a list of the tasks and their descriptions with `maid help`.
12+
13+
## install
14+
15+
Install dependencies with `poetry`
16+
17+
```bash
18+
poetry install;
19+
```
20+
21+
## test
22+
23+
Runs tests with `pytest-django` and outputs coverage
24+
25+
```bash
26+
poetry run pytest tests/test_project/;
27+
```
28+
29+
## clean:dist
30+
31+
Cleans distribution directories
32+
33+
```bash
34+
rm -rf build/ dist/ *.egg-info;
35+
```
36+
37+
## build:dist
38+
39+
Builds a source distribution and binary wheel
40+
41+
We use `setup.py` for releases as `poetry` does not yet fully support all the configuration we make use of.
42+
43+
```bash
44+
python setup.py sdist bdist_wheel;
45+
```
46+
47+
## __release:test
48+
49+
Uploads a release to test PyPI.
50+
Internal use only (see `publish:test` for external usage).
51+
52+
```bash
53+
twine upload --repository-url https://test.pypi.org/legacy/ dist/*;
54+
```
55+
56+
## __release:prod
57+
58+
Uploads a release to production PyPI.
59+
Internal use only (see `publish:prod` for external usage).
60+
61+
```bash
62+
twine upload dist/*;
63+
```
64+
65+
## publish:test
66+
67+
`clean:dist` -> `build:dist` -> `__release:test`
68+
69+
Run tasks `clean:dist`, `build:dist`, `__release:test`
70+
71+
## publish:prod
72+
73+
`clean:dist` -> `build:dist` -> `__release:prod`
74+
75+
Run tasks `clean:dist`, `build:dist`, `__release:prod`
76+
77+
## changelog
78+
79+
Creates a changelog from the current tag to the previous tag
80+
81+
```bash
82+
# changelog-maker only gets name from package.json, so do a replace
83+
npx @agilgur5/changelog-maker | sed 's_nodejs/node_agilgur5/django-serializable-model_';
84+
```
85+
86+
## Further Reading
87+
88+
- [Maid Docs](https://github.com/egoist/maid)

release.sh

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

0 commit comments

Comments
 (0)