forked from nedbat/coveragepy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
howto.txt
121 lines (111 loc) · 4.41 KB
/
howto.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
* Release checklist
- Check that the current virtualenv matches the current coverage branch.
- Version number in coverage/version.py
version_info = (4, 0, 2, "alpha", 1)
version_info = (4, 0, 2, "beta", 1)
version_info = (4, 0, 2, "candidate", 1)
version_info = (4, 0, 2, "final", 0)
- Supported Python version numbers. Search for "PYVERSIONS".
- Copyright date in NOTICE.txt
- run `python igor.py cheats` to get useful snippets for next steps.
- Update CHANGES.rst, including release date.
- don't forget the jump target
- Update README.rst
- "New in x.y:"
- Python versions supported
- Update docs
- Python versions in doc/index.rst
- Version of latest stable release in doc/index.rst
- Version, release, release_date and copyright date in doc/conf.py
- Look for CHANGEME comments
- Make sure the docs are cogged:
$ make prebuild
- Don't forget the man page: doc/python-coverage.1.txt
- Check that the docs build correctly:
$ tox -e doc
- commit the release-prep changes
- Generate new sample_html to get the latest, incl footer version number:
$ make clean
$ pip install -e .
$ cd ~/cog/trunk
$ rm -rf htmlcov
$ PYTEST_ADDOPTS= coverage run --branch --source=cogapp -m pytest -k CogTestsInMemory; coverage combine; coverage html
- IF PRE-RELEASE:
$ rm -f ~/coverage/trunk/doc/sample_html_beta/*.*
$ cp -r htmlcov/ ~/coverage/trunk/doc/sample_html_beta/
$ rm ~/coverage/trunk/doc/sample_html_beta/.gitignore
- IF NOT PRE-RELEASE:
$ rm -f ~/coverage/trunk/doc/sample_html/*.*
$ cp -r htmlcov/ ~/coverage/trunk/doc/sample_html/
$ rm ~/coverage/trunk/doc/sample_html/.gitignore
$ cd ~/coverage/trunk
- IF NOT PRE-RELEASE:
check in the new sample html
- Done with changes to source files, check them in.
$ git push
- Build and publish docs:
- IF PRE-RELEASE:
$ make publishbeta
- ELSE:
$ make publish
- Kits:
- Manually trigger the kit GitHub Action
- https://github.com/nedbat/coveragepy/actions/workflows/kit.yml
- Download and check built kits from GitHub Actions:
$ make clean download_kits check_kits
- examine the dist directory, and remove anything that looks malformed.
- test the pypi upload:
$ make test_upload
- Update PyPI:
- upload kits:
$ make kit_upload
- Tag the tree
$ make tag
- IF NOT PRE-RELEASE:
- update git "stable" branch to point to latest release
$ make update_stable
- Update GitHub releases:
$ make clean github_releases
- Bump version:
- coverage/version.py
- increment version number
- IF NOT PRE-RELEASE:
- set to alpha-0 if just released.
- CHANGES.rst
- add an "Unreleased" section to the top.
$ git push
- Update readthedocs
- @ https://readthedocs.org/projects/coverage/versions/
- find the latest tag in the inactive list, edit it, make it active.
- readthedocs won't find the tag until a commit is made on master.
- keep just the latest version of each x.y release, make the rest active but hidden.
- IF NOT PRE-RELEASE:
- @ https://readthedocs.org/projects/coverage/builds/
- wait for the new tag build to finish successfully.
- @ https://readthedocs.org/dashboard/coverage/advanced/
- change the default version to the new version
- Visit the fixed issues on GitHub and mention the version it was fixed in.
$ make comment_on_fixes
- "This is now released as part of [coverage 5.2](https://pypi.org/project/coverage/5.2)."
- Announce:
- twitter @coveragepy
- nedbatchelder.com blog post?
- things to automate:
- url to link to latest changes in docs
- next version.py line
- curl to start the kit actions going
- readthedocs api to do the readthedocs changes
* Testing
- Testing of Python code is handled by tox.
- Create and activate a virtualenv
- pip install -r requirements/dev.pip
- $ tox
- For complete coverage testing:
$ make metacov
This will run coverage.py under its own measurement. You can do this in
different environments (Linux vs. Windows, for example), then copy the data
files (.metacov.*) to one machine for combination and reporting. To
combine and report:
$ make metahtml
- To run the Javascript tests:
open tests/js/index.html in variety of browsers.