Skip to content

Commit

Permalink
Update release creation docs
Browse files Browse the repository at this point in the history
  • Loading branch information
clelange committed Jul 25, 2024
1 parent 24863e9 commit f9c64b2
Showing 1 changed file with 8 additions and 30 deletions.
38 changes: 8 additions & 30 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,40 +33,18 @@ The files in which the versions are updated as well as the current version can b

.. _sec-dev-pypi:

Uploading to PyPI
-----------------

Once a new version has been tagged, the package should be uploaded to the Python Package Index (PyPI_).
For the markdown formatting to work, ``twine>=1.11.0`` is required.
Execute the following commands to create a source distribution and upload it:

::

pip install -U wheel
python setup.py sdist bdist_wheel
pip install -U twine
twine upload --repository-url https://test.pypi.org/legacy/ dist/*

This uploads to the `PyPI test server`_. Mind that you need to have an account for both the test and the production servers.

Install the package for testing:

::

pip install --index-url https://test.pypi.org/simple/ hepdata_lib

If everything is fine, upload to the production server:

::

twine upload dist/*

You should then find the new version at `this location`_. You need to be a maintainer of the project for this to work. For more details please see the `python packaging documentation`_.
Creating a new release
---------------------------

Once a new version has been tagged, a new release has to be created on GitHub.
Go to `Releases`_ and click on "Draft a new release".
Choose the tag you just created, auto-generate release notes, and click "Publish release".
The package will then be automatically uploaded to the Python Package Index (PyPI_) at `this location`_
and a new container image will be built and tagged.

.. _bumpversion: https://github.com/peritus/bumpversion
.. _.bumpversion.cfg: https://github.com/HEPData/hepdata_lib/blob/main/.bumpversion.cfg
.. _Releases: https://github.com/HEPData/hepdata_lib/releases
.. _PyPI: https://pypi.org
.. _PyPI test server: https://test.pypi.org/project/hepdata_lib/
.. _this location: https://pypi.org/project/hepdata_lib/
.. _python packaging documentation: https://packaging.python.org/tutorials/packaging-projects/

0 comments on commit f9c64b2

Please sign in to comment.