- launch the command ``bin/init-py-repo`` to initialize the repository with a project
template
- In swh-jenkins-jobs_, open `jobs/swh-packages.yaml <https://gitlab.softwareheritage.org/swh/infra/ci-cd/swh-jenkins-jobs/-/blob/master/jobs/swh-packages.yaml>`__ and add a section like the others for the new repository.
.. code:: bash
.. note::
Jobs will automatically be recreated when changes are pushed to the
``swh-jenkins-jobs`` repository. See `Jenkins documentation <ci_jenkins>`_
for details.
bin/init-py-repo swh-new-repo
Make an initial release
-----------------------
- Within that new repository, replace the ``swh-py-template`` entry in
``docs/index.rst`` with the new package name ``swh-<package>`` (e.g:
``swh-scrubber``).
Releases are made automatically by Jenkins when a tag is pushed to a module
repository. Making an initial release is thus done by doing:
.. code:: bash
REPO_NAME=swh-new-repo # edit this part, keep the "swh-" prefix
sed -i -e "s/swh-py-template/$REPO_NAME/g" docs/index.rst
git tag v0.0.0
git push origin --tags v0.0.0
- Edit the default content of the template (`Example <https://forge.softwareheritage.org/rDCNT142fff84305b793974e6f7b837988e5fb95d8db1>`__)
.. note::
Before adding a new module to the documentation, at least one release must
have been made. Otherwise, the documentation will not build as it won’t be
able to fetch the Python package from PyPI nor determine the version number.
This is why we need to make an initial release before moving forward.
- Configure **your local** pre-commit hook
- In the ``swh-environment/swh-my-new-repo`` directory, execute: