File: release_process.rst

package info (click to toggle)
python-graphviz 0.20.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,188 kB
  • sloc: python: 4,098; makefile: 13
file content (162 lines) | stat: -rw-r--r-- 3,820 bytes parent folder | download
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
Release process
===============


Build
-----

Update build dependencies:

.. code:: bash

    $ pip install -U setuptools wheel twine

Create ``release`` branch from main:

.. code:: bash

    $ git checkout -b release

**Cleanup** (remove all untracked files and directories):

.. code:: bash

    $ git clean -f -d -x

Update ``help()`` output:

.. code:: bash

    $ python update-help.py

Set **release version** (remove ``.dev0`` from ``$MAJOR.$MINOR[.$BUGFIX]`` version):

- ``docs/conf.py``
- ``graphviz/__init__.py``
- ``setup.py``

Document release:

- remove ``(in development)`` from ``CHANGES.rst`` header

Run the tests, lint the code, and build the documentation:

.. code:: bash

    $ python -m tox -r -- -W error -W ignore:"The signature of":PendingDeprecationWarning  # --recreate, raise error on warning
    $ python lint-code.py --disable-noqa
    $ python build-docs.py -b doctest
    $ python build-docs.py
    $ git clean -f -d -x

Commit to ``release`` branch and push to ``origin``:

.. code:: bash

    $ git add *
    $ git commit -m "release $MAJOR.$MINOR[.$BUGFIX]"
    $ git push --set-upstream origin release

- Check GitHub Actions ``relase`` `Build workflow
  <https://github.com/xflr6/graphviz/actions?query=branch%3Arelease>`_
- Check Codecov ``release`` build `test coverage
  <https://app.codecov.io/gh/xflr6/graphviz/branch/release>`_

**Build** and check the release files:

.. code:: bash

    $ python setup.py sdist bdist_wheel
    $ python -m twine check --strict dist/*

- ``dist/graphviz-$MAJOR.$MINOR[.$BUGFIX].zip``
- ``dist/graphviz-$MAJOR.$MINOR[.$BUGFIX]-py3-none-any.whl``

If changes are needed (and go back to: **Cleanup** step):

.. code:: bash

    $ git commit --amend --date=now

Switch to main branch and merge ``release``:

.. code:: bash

    $ git switch master
    $ git merge --ff-only release

**Tag** with annotated release version tag:

.. code:: bash

    $ git tag -a -m "$MAJOR.$MINOR[.$BUGFIX] release"

Bump **post-release version** to ``$MAJOR.$MINOR.[.$BUGFIX].dev0``:

- ``docs/conf.py``
- ``graphviz/__init__.py``
- ``setup.py``

Document post-release:

- add new ``Version $MAJOR.$MINOR[.$BUGFIX] (in development)`` heading to ``CHANGES.rst``

Commit version bump to main branch:

.. code:: bash

    $ git commit -m "bump version for development"


Publish
-------

Publish the release with twine_:

.. code:: bash

    $ python -m twine upload dist/*

Push main branch and push all new tags:

.. code:: bash

    $ git push --tags

Update `stable <https://github.com/xflr6/graphviz/tree/stable>`_ branch to the latest release:

.. code:: bash

    $ git switch stable
    $ git merge --ff-only $MAJOR.$MINOR[.$BUGFIX]
    $ git push


Verify
------

Verify publication:

- Check `PyPI files <https://pypi.org/project/graphviz/#files>`_
- Check GitHub `Main page <https://github.com/xflr6/graphviz>`_
- Check GitHub Actions `main branch Build workflow
  <https://github.com/xflr6/graphviz/actions?query=branch%3Amaster>`_
- Check Read the Docs `builds <https://readthedocs.org/projects/graphviz/builds/>`_
- Check `latest release notes <https://graphviz.readthedocs.io/en/latest/changelog.html>`_
- Check `stable release notes <https://graphviz.readthedocs.io/en/stable/changelog.html>`_
- Check ``stable`` binder: https://mybinder.org/v2/gh/xflr6/graphviz/stable

Install in default environment:

.. code:: bash

    $ pip install -U graphviz
    $ python -c "import graphviz; print((graphviz.__version__, graphviz.version()))"

Downstream
----------

- Check downstream `conda-forge release <https://github.com/conda-forge/python-graphviz-feedstock>`_


.. include:: _links.rst