-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhowto.txt
146 lines (134 loc) · 5.24 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
* Release checklist
- Run twice
$ make pre-commit
- Remove old branches
$ git branch
$ git branch -D [branch name]
- Check that the current virtualenv matches the current branch.
- Check current version. Taken from git, updates src/[prog name]/_version.py
Initial version, edit _version.py manually, otherwise
$ python igor.py version "tag"
or
$ python igor.py version "current"
Do not use, `python setup.py --version`
If not in dev mode, in venv, update ``[prog name]._version.py``
- What would the next version be?
$ python igor.py cheats "tag"
or
$ python igor.py cheats "current"
See `facts.next_vi`
- start branch for release work
$ make relbranch
- Edit supported Python version numbers. Search for "PYVERSIONS".
- README.rst
- docs/index.rst
- Update sphinx conf.py CHANGES.rst, and NOTICE.txt with release facts. Supply "next version":
$ python igor.py bump_version "1.2.11"
or
$ python igor.py bump_version "current"
$ python igor.py edit_for_release "1.2.11"
or
$ python igor.py edit_for_release "current"
- Look over CHANGES.rst
Takes time. Rewrite commit messages to be accessible by normies. Rewrite it again.
- Update README.rst
- "New in x.y:"
- Update docs
- IF PRE-RELEASE:
- Version of latest stable release in docs/index.rst
- Make sure the docs are cogged:
$ make prebuild
- Don't forget the man page: docs/python-asz.1.txt
- Check that the docs build correctly:
$ tox -e docs
or
$ cd docs && make doctest; cd - &>/dev/null
$ cd docs && make linkcheck; cd - &>/dev/null
$ cd docs && make html; cd - &>/dev/null
$ cd docs && make pdf; cd - &>/dev/null
- commit the release-prep changes
$ make relcommit1
- Generate new sample_html to get the latest, incl footer version number:
- IF PRE-RELEASE:
$ make sample_html_beta
- IF NOT PRE-RELEASE:
$ make sample_html
- check in the new sample html
$ make relcommit2
- Done with changes to source files
- check them in on the release prep branch
- wait for ci to finish
- merge to master
$ git branch
$ git switch master
$ git merge -S -m "Your merge commit message" [source_branch]
- Check web connection then push. Don't trigger a release until a tag push
$ git push
- Start the kits:
- Update logging_strict/src/_version.py with next version and build (not tagged yet)
$ python igor.py build_next "[bumped version]"
or for current (prerelease/postrelease) version, version is empty string.
side effect _version.py changes)
$ python igor.py build_next ""
Trigger the kit GitHub Action (no CI integration yet)
$ make kits_build (make debug=1 prep_kit)
- Build and publish docs:
- IF PRE-RELEASE:
$ make publishbeta
- ELSE:
$ make publish
- commit and publish home page (if any)
- Kits:
- Wait for kits to finish:
- https://github.com/msftcangoblowm/logging-strict/.github/workflows/kit.yml
- Download and check built kits from GitHub Actions:
$ make clean download_kits check_kits
- there should be 52
- examine the dist directory, and remove anything that looks malformed.
- opvars (https://github.com/nedbat/dot/blob/master/.config/shellrc/opvars.sh)
- test the pypi upload:
$ make test_upload
- upload kits:
$ make kit_upload
- Tag the tree
$ make tag
or
$ git tag -as -m "Version 1.2.11" 1.2.11
# git push --follow-tags
- Version already upgraded to new tag, but can do it again
$ python igor.py version "tag"
- Update GitHub releases:
$ make clean github_releases
- Visit the fixed issues on GitHub and mention the version it was fixed in.
$ make comment_on_fixes
- deopvars (https://github.com/nedbat/dot/blob/master/.config/shellrc/opvars.sh)
- Bump version (retired; obsolete):
- Update readthedocs
- @ https://readthedocs.org/projects/asz/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.
- pre-releases should be hidden
- IF NOT PRE-RELEASE:
- @ https://readthedocs.org/dashboard/logging-strict/advanced/
- change the default and latest versions to the new version
- @ https://readthedocs.org/projects/logging-strict/builds/
- manually build "latest"
- wait for the new tag build to finish successfully.
- Once CI passes, merge the bump-version branch to master and push it
- things to automate:
- 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.