Skip to content

Commit d8f2066

Browse files
author
Alan Christie
committed
- Adds tag/publish instructions
1 parent 875d63b commit d8f2066

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

README.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ tester by navigating to the sub-module in your pipelines project: -
225225
$ cd pipelines-utils
226226
$ ./gradlew runPipelineTester
227227

228-
## Testing the pipeline utilities
228+
## Testing the pipeline utilities Python utilities
229229
The pipeline utilities consist of a number of Python-based modules
230230
that provide some common processing but are also distributed in the
231231
pipeline container images. The distributed can be tested using `setup.py`.
@@ -234,11 +234,34 @@ To test these modules run the following from the `src/python` directory: -
234234
$ pip install -r requirements.txt
235235
$ python setup.py test
236236

237-
### Publishing the im-pipelines-utils package to PyPI
238-
The utilities are published to PyPI for easy installation
239-
(normally automatically by the Travis CI/CD framework
240-
when the repository is tagged on master).
241-
237+
# Publishing the im-pipelines-utils package to PyPI
238+
The utilities are published to [PyPi] for easy installation
239+
(normally automatically by the Travis CI/CD framework).
240+
241+
## Publishing via Travis
242+
We currently employ Travis to automate our tests and also to publish the
243+
Python module to PyPi.
244+
245+
In order to publish a new release of the module you need to: -
246+
247+
1. **Update** the `version` value in `src/python/setup.py` with a new
248+
release number and commit the change.
249+
2. **Review** the `src/python/READEME.rst` file (which is the source of
250+
the PyPi documentation. This rarely needs changing but it's worth
251+
understanding where the PyPi documentation comes from.
252+
3. **Tag** the repository. It's the tagging that instructs Travis
253+
to publish the Python module to PyPi - it does not publish *every*
254+
commit. In order to publish the module the tag *must* begin `pypi-`.
255+
This allows you to use other tags and not cause a publication of the
256+
module. By convention is you've set the `version` to `2.3.1` the tag would
257+
be `pypi-2.3.1` (you can see the other *releases* or tags in the project
258+
as an example). The the actual number is unimportant as it's the act of
259+
tagging that causes a release. After tagging Travis pulls the code and
260+
then builds and publishes the module.
261+
262+
The travis instructions are all encoded in the project's `.travis.yml` file.
263+
264+
## Publishing manually
242265
If you are going to publish the utilities yourself (not recommended) you will
243266
need our PyPI account details. For Informatics Matters you should add the
244267
following to your `~/.pypirc` file (or create one if you don't have one): -

0 commit comments

Comments
 (0)