Skip to content

Commit 3e03c1a

Browse files
authored
Merge pull request #2 from CastXML/add-script-to-update-version
Update documentation and add script for updating version
2 parents 8a974d6 + f225751 commit 3e03c1a

File tree

6 files changed

+405
-4
lines changed

6 files changed

+405
-4
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ matrix:
1111
- os: osx
1212
language: generic
1313
env:
14-
- PYTHON_VERSION=3.7.2
14+
- PYTHON_VERSION=3.7.8
1515

1616
- os: osx
1717
language: generic
@@ -20,7 +20,7 @@ matrix:
2020

2121
cache:
2222
directories:
23-
- $HOME/.pyenv/versions/3.7.2
23+
- $HOME/.pyenv/versions/3.7.8
2424
- $HOME/.pyenv/versions/2.7.15
2525
- $HOME/downloads
2626

CastXMLUrls.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
12
#-----------------------------------------------------------------------------
23
# CastXML binaries
4+
35
set(linux32_binary_url "NA") # Linux 32-bit binaries not available
46
set(linux32_binary_sha512 "NA")
57

@@ -13,4 +15,4 @@ set(win32_binary_url "NA") # Windows 32-bit binaries not available
1315
set(win32_binary_sha512 "NA")
1416

1517
set(win64_binary_url "https://data.kitware.com/api/v1/file/5ee7eb539014a6d84ec1f22a/download")
16-
set(win64_binary_sha512 "fa7a38dbdb71e0484cfeb255aef6d085abf23496a85051e3dccac593d9eec042fad5be72110d7f3528b424d90fbf5b5053c31f054470d691a7109c1f13776229")
18+
set(win64_binary_sha512 "fa7a38dbdb71e0484cfeb255aef6d085abf23496a85051e3dccac593d9eec042fad5be72110d7f3528b424d90fbf5b5053c31f054470d691a7109c1f13776229")

README.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
# CastXML
1+
# CastXML Python Distribution
22

33
Introduction
44
============
55

6+
The latest CastXML python wheels provide CastXML 0.3.4 executable.
7+
68
CastXML is a C-family abstract syntax tree XML output tool.
79

810
This project is maintained by [Kitware][kitware] in support of [ITK][itk],
@@ -18,6 +20,45 @@ See the [castxml(1)][manual] manual page for instructions to run the tool.
1820

1921
[manual]: https://github.com/CastXML/CastXML/blob/master/doc/manual/castxml.1.rst#castxml1
2022

23+
Latest Release
24+
==============
25+
26+
[![][pypi-version-img]][pypi] [![][pypi-download-img]][pypi]
27+
28+
[pypi-version-img]: https://img.shields.io/pypi/v/ninja.svg
29+
[pypi-download-img]: https://img.shields.io/badge/downloads-2535k%20total-green.svg
30+
[pypi]: https://pypi.python.org/pypi/ninja
31+
32+
Build Status
33+
============
34+
35+
| | Linux | macOS | Windows |
36+
|------|-------|-------|----------|
37+
| PyPI | [![][ci-status-linux-img]][ci-status-linux] | [![][ci-status-macos-img]][ci-status-macos] | [![][ci-status-win-img]][ci-status-win] |
38+
39+
[ci-status-linux-img]: https://circleci.com/gh/CastXML/CastXML-python-distributions.svg?style=shield
40+
[ci-status-linux]: https://circleci.com/gh/CastXML/CastXML-python-distributions
41+
42+
[ci-status-macos-img]: https://travis-ci.org/CastXML/CastXML-python-distributions.svg?branch=master
43+
[ci-status-macos]: https://travis-ci.org/CastXML/CastXML-python-distributions
44+
45+
[ci-status-win-img]: https://ci.appveyor.com/api/projects/status/56orbr008wcgjyr4?svg=true
46+
[ci-status-win]: https://ci.appveyor.com/project/CastXML/CastXML-python-distributions/branch/master
47+
48+
Maintainers
49+
===========
50+
51+
* [How to update CastXML version ?](https://github.com/CastXML/CastXML-python-distributions/blob/master/docs/update_ninja_version.rst)
52+
53+
* [How to make a release ?](https://github.com/CastXML/CastXML-python-distributions/blob/master/docs/make_a_release.rst)
54+
55+
Miscellaneous
56+
=============
57+
58+
* Documentation: https://github.com/CastXML/CastXML-python-distributions#readme
59+
* Source code: https://github.com/CastXML/CastXML-python-distributions
60+
* Mailing list: https://public.kitware.com/mailman/listinfo/castxml
61+
2162
License
2263
=======
2364

docs/make_a_release.rst

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
.. _making_a_release:
2+
3+
================
4+
Making a release
5+
================
6+
7+
A core developer should use the following steps to create a release `X.Y.Z` of
8+
**ninja-python-distributions** on `PyPI`_.
9+
10+
This is usually done after :ref:`updating_castxml_version`.
11+
12+
-------------
13+
Prerequisites
14+
-------------
15+
16+
* All CI tests are passing on `AppVeyor`_, `CircleCI`_ and `Travis CI`_.
17+
18+
* You have a `GPG signing key <https://help.github.com/articles/generating-a-new-gpg-key/>`_.
19+
20+
-------------------------
21+
Documentation conventions
22+
-------------------------
23+
24+
The commands reported below should be evaluated in the same terminal session.
25+
26+
Commands to evaluate starts with a dollar sign. For example::
27+
28+
$ echo "Hello"
29+
Hello
30+
31+
means that ``echo "Hello"`` should be copied and evaluated in the terminal.
32+
33+
34+
---------------------
35+
`PyPI`_: Step-by-step
36+
---------------------
37+
38+
1. Make sure that all CI tests are passing on `AppVeyor`_, `CircleCI`_ and `Travis CI`_.
39+
40+
41+
2. Download the latest sources
42+
43+
.. code::
44+
45+
$ cd /tmp && \
46+
git clone [email protected]:CastXML/CastXML-python-distributions CastXML-python-distributions-release && \
47+
cd CastXML-python-distributions-release
48+
49+
3. List all tags sorted by version
50+
51+
.. code::
52+
53+
$ git fetch --tags && \
54+
git tag -l | sort -V
55+
56+
57+
4. Choose the next release version number
58+
59+
.. code::
60+
61+
$ release=X.Y.Z
62+
63+
.. warning::
64+
65+
To ensure the packages are uploaded on `PyPI`_, tags must match this regular
66+
expression: ``^[0-9]+(\.[0-9]+)*(\.post[0-9]+)?$``.
67+
68+
69+
5. In `README.md`, update `PyPI`_ download count after running ``pypistats overall CastXML``
70+
and commit the changes.
71+
72+
.. code::
73+
74+
$ git add README.rst && \
75+
git commit -m "README: Update download stats"
76+
77+
.. note::
78+
79+
To learn more about `pypistats`, see https://pypi.org/project/pypistats/
80+
81+
82+
6. Tag the release
83+
84+
.. code::
85+
86+
$ git tag --sign -m "CastXML-python-distributions ${release}" ${release} master
87+
88+
.. warning::
89+
90+
We recommend using a `GPG signing key <https://help.github.com/articles/generating-a-new-gpg-key/>`_
91+
to sign the tag.
92+
93+
94+
7. Publish the release tag
95+
96+
.. code::
97+
98+
$ git push origin ${release}
99+
100+
.. note:: This will trigger builds on each CI services and automatically upload the wheels \
101+
and source distribution on `PyPI`_.
102+
103+
8. Check the status of the builds on `AppVeyor`_, `CircleCI`_ and `Travis CI`_.
104+
105+
9. Once the builds are completed, check that the distributions are available on `PyPI`_.
106+
107+
10. Create a clean testing environment to test the installation
108+
109+
.. code::
110+
111+
$ pushd $(mktemp -d) && \
112+
mkvirtualenv CastXML-${release}-install-test && \
113+
pip install CastXML && \
114+
castxml --version
115+
116+
.. note::
117+
118+
If the ``mkvirtualenv`` command is not available, this means you do not have `virtualenvwrapper`_
119+
installed, in that case, you could either install it or directly use `virtualenv`_ or `venv`_.
120+
121+
11. Cleanup
122+
123+
.. code::
124+
125+
$ popd && \
126+
deactivate && \
127+
rm -rf dist/* && \
128+
rmvirtualenv CastXML-${release}-install-test
129+
130+
12. Publish master branch
131+
132+
.. code::
133+
134+
$ git push origin master
135+
136+
.. _virtualenvwrapper: https://virtualenvwrapper.readthedocs.io/
137+
.. _virtualenv: http://virtualenv.readthedocs.io
138+
.. _venv: https://docs.python.org/3/library/venv.html
139+
140+
141+
.. _AppVeyor: https://ci.appveyor.com/project/CastXML/CastXML-python-distributions/history
142+
.. _CircleCI: https://circleci.com/gh/CastXML/CastXML-python-distributions
143+
.. _Travis CI: https://travis-ci.org/CastXML/CastXML-python-distributions/pull_requests
144+
145+
.. _PyPI: https://pypi.org/project/CastXML

docs/update_castxml_version.rst

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
.. _updating_castxml_version:
2+
3+
============================
4+
Updating the CastXML version
5+
============================
6+
7+
A developer should use the following steps to update the version ``X.Y.Z``
8+
of CastXML associated with the current CastXML python distributions.
9+
10+
Available CastXML archives can be found `here <https://data.kitware.com/#folder/57b5de948d777f10f2696370>`_.
11+
12+
1. Install `girder-client`::
13+
14+
$ pip install girder-client
15+
16+
2. Execute `scripts/update_castxml_version.py` command line tool with the desired
17+
``X.Y.Z`` CastXML version available for download. For example::
18+
19+
$ release=0.3.4
20+
$ python scripts/update_castxml_version.py ${release}
21+
22+
Collecting URLs and SHAs from 'https://data.kitware.com/#folder/57b5de948d777f10f2696370'
23+
Collecting URLs and SHAs from 'https://data.kitware.com/#folder/57b5de948d777f10f2696370' - done
24+
Updating 'CastXMLUrls.cmake' with CastXML version 0.3.4
25+
Updating 'CastXMLUrls.cmake' with CastXML version 0.3.4 - done
26+
Updating README.md
27+
Updating README.md - done
28+
Updating docs/update_castxml_version.rst
29+
Updating docs/update_castxml_version.rst - done
30+
Updating tests/test_distribution.py
31+
Updating tests/test_distribution.py - done
32+
33+
3. Create a topic named `update-to-castxml-X.Y.Z` and commit the changes.
34+
For example::
35+
36+
release=0.3.4
37+
git checkout -b update-to-castxml-${release}
38+
git add CastXMLUrls.cmake README.md docs/update_castxml_version.rst tests/test_distribution.py
39+
git commit -m "Update to CastXML ${release}"
40+
41+
4. Create a `Pull Request`.
42+
43+
5. If all CI tests are passing, merge the topic and consider `making a new
44+
release <https://github.com/CastXML/CastXML-python-distributions/blob/master/docs/make_a_release.rst>`_.

0 commit comments

Comments
 (0)