Skip to content

Commit a0d0d43

Browse files
Merge pull request #871 from adamtheturtle/release-process
Release process
2 parents 8bc589b + 7231ff3 commit a0d0d43

File tree

8 files changed

+98
-5
lines changed

8 files changed

+98
-5
lines changed

CHANGELOG.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Changelog
2+
=========
3+
4+
.. contents::
5+
6+
Next
7+
----

CONTRIBUTING.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,4 @@ The configuration for this is in ``.travis.yml``.
7474
Performing a release
7575
--------------------
7676

77-
There is currently no release process.
78-
See `this issue <https://github.com/adamtheturtle/vws-python/issues/55>`__ for details.
77+
See release process in the full documentation.

admin/CHANGELOG.rst

Whitespace-only changes.

admin/release.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
# Perform a release.
6+
# See the release process documentation for details.
7+
cd "$(mktemp -d)"
8+
git clone [email protected]:"${GITHUB_OWNER}"/vws-python.git
9+
cd vws-python-mock
10+
virtualenv -p python3 release
11+
source release/bin/activate
12+
pip install --editable .[dev]
13+
python admin/release.py

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ VWS Python
55
:maxdepth: 3
66

77
exceptions
8+
release-process

docs/source/release-process.rst

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
Release Process
2+
===============
3+
4+
Outcomes
5+
~~~~~~~~
6+
7+
* A new ``git`` tag available to install.
8+
* A new package on PyPI.
9+
10+
Prerequisites
11+
~~~~~~~~~~~~~
12+
13+
* ``python3`` on your ``PATH`` set to Python 3.6+.
14+
* ``virtualenv``.
15+
* Push access to this repository.
16+
* Trust that ``master`` is ready and high enough quality for release.
17+
18+
Perform a Release
19+
~~~~~~~~~~~~~~~~~
20+
21+
#. Install keyring
22+
23+
Make sure that `keyring <https://pypi.org/project/keyring/>`__ is available on your path.
24+
25+
E.g.:
26+
27+
.. code:: sh
28+
29+
curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python
30+
pipsi install keyring
31+
32+
#. Set up PyPI credentials
33+
34+
Register at `PyPI <https://pypi.org>`__.
35+
36+
Add the following information to :file:`~/.pypirc`.
37+
38+
.. code:: ini
39+
40+
[distutils]
41+
index-servers=
42+
pypi
43+
44+
[pypi]
45+
username = <Your PyPI username>
46+
47+
Store your PyPI password:
48+
49+
.. code:: sh
50+
51+
keyring set https://upload.pypi.org/legacy/ <Your PyPI username>
52+
53+
#. Get a GitHub access token:
54+
55+
Follow the `GitHub instructions <https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/>`__ for getting an access token.
56+
57+
#. Set environment variables to GitHub credentials, e.g.:
58+
59+
.. code:: sh
60+
61+
export GITHUB_TOKEN=75c72ad718d9c346c13d30ce762f121647b502414
62+
export GITHUB_OWNER=adamtheturtle
63+
64+
#. Perform a release:
65+
66+
.. code:: sh
67+
68+
curl https://raw.githubusercontent.com/"$GITHUB_OWNER"/vws-python/master/admin/release.sh | bash

setup.cfg

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ ignore =
99
.readthedocs.yml
1010
.style.yapf
1111
.travis.yml
12+
admin
13+
admin/release.sh
1214
CHANGELOG.rst
1315
CODE_OF_CONDUCT.rst
1416
CONTRIBUTING.rst
@@ -93,11 +95,13 @@ ignore_errors = True
9395
# Allow blank lines after function docstrings
9496
# - D202
9597
# Section names do not need to end in newlines
96-
# - D406
98+
# - D406
9799
# Section names do not need dashed underlines
98-
# - D407
100+
# - D407
99101
# No blank line is needed after the last section
100-
ignore = D200,D202,D203,D205,D212,D400,D406,D407,D413
102+
# Do not care about imperative mood
103+
# - D401
104+
ignore = D200,D202,D203,D205,D212,D400,D406,D407,D413,D401
101105
match=(?!.*(versioneer|test_|_version)).*\.py
102106

103107
[isort]

src/vws/exceptions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def response(self) -> Response:
9292
"""
9393
return self._response
9494

95+
9596
class TargetStatusProcessing(Exception):
9697
"""
9798
Exception raised when Vuforia returns a response with a result code

0 commit comments

Comments
 (0)