<commit_before>Committer Guide
===============

New committer guidelines
------------------------

.. note::

    This section outlines steps which need to be completed by new team members and
    is indented for people who have been voted to join Libcloud project as a
    committer and / or PMC member. It also assumes you have already filled
    your ICLA and your Apache account has been created.

First congratulations and welcome to the team!

1. Subscribe to the public mailing lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you haven't yet, subscribe to {<EMAIL>,<EMAIL>,<EMAIL>
mailing lists. Notifications mailing list is especially important because all of
Github Issue, Pull Request and build notifications are sent there.

2. Subscribe to the private mailing list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Subscribe to <EMAIL> by sending an email to
<EMAIL>. Keep in mind that this list is private
and your subscription needs to be approved by a moderator.

3. Create PyPi account
~~~~~~~~~~~~~~~~~~~~~~

Creating a PyPi account by going to
https://pypi.python.org/pypi?%3Aaction=register_form and send an email to
<EMAIL> requesting to be added as a maintainer to
`apache-libcloud <https://pypi.python.org/pypi/apache-libcloud/>`_ package.
Make sure to select a strong and unique password (``pwgen -s 48 1`` is your
friend).

After you have registered go to
"`Your details <https://pypi.python.org/pypi?%3Aaction=user_form>`_" page and
populate `PGP Key ID` field with your PGP key ID.

Merging user contributions
--------------------------

When a pull request with user contribution / changes has been reviewed and
all the criteria for merging has been meet (tests and code coverage, Travis
build is passing, user signed an ICLA, etc.), you can directly merge those
changes into trunk either by using Github web interface or doing it on the
command line.

It's also important that you update changelog in ``CHANGES.rst`` file after
you have merged the changes.

Making a release (for release managers)
---------------------------------------

This section contains information a release manager should follow when
preparing a release.

0. Update committed files
~~~~~~~~~~~~~~~~~~~~~~~~~

* Make sure ``CHANGES`` file is up to date
* Make sure ``__version__`` string in ``libcloud/__init__.py`` is up to date
* Make sure ``version`` and ``release`` in ``docs/conf.py`` are up to date
* Update constants: ``python contrib/scrape-ec2-sizes.py > libcloud/compute/constants.py``

1. Pre-release check list
~~~~~~~~~~~~~~~~~~~~~~~~~

* Make sure tests pass on all the supported Python versions (``tox``)
* Remove the ``tox`` directory with ``rm -rf .tox``
* Remove the _secrets_ file with ``rm libcloud/test/secrets.py``
* Remove leftover builds from previous releases. ``rm -f dist/apache* ; rm -rf apache_libcloud.egg-info``

2. Update Github
~~~~~~~~~~~~~~~~~

* Create a new Github milestone for the release in question (if one doesn't exist
  yet)
* Update affected issues and pull requests and add the corresponding release
  milestone

3. Creating release artifacts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We have a script that runs the required setup.py commands and then hashes
and signs the files. You will need the latest version of ``pip`` and the ``wheel``
package. To run it:

.. sourcecode:: bash

    cd dist
    ./release.sh -u <<EMAIL>>@<EMAIL>.<EMAIL>

``-u`` argument will be used to find a key with a matching email address in
your local GPG database.

This should result in a set of
``apache-libcloud-${VERSION}.{tar.bz2,tar.gz,zip,whl}{,asc,md5,sha1}`` files that
are suitable to be uploaded for a release.

Copy the artifacts in another directory, unpack one of them and test it with ``tox``.

4. Tagging a release
~~~~~~~~~~~~~~~~~~~~

Tag the tentative release with a ``-tentative`` postfix.

.. sourcecode:: bash<commit_msg>Fix typos.<commit_after>Committer Guide
===============

New committer guidelines
------------------------

.. note::

    This section outlines steps which need to be completed by new team members and
    is indented for people who have been voted to join Libcloud project as a
    committer and / or PMC member. It also assumes you have already filled
    your ICLA and your Apache account has been created.

First congratulations and welcome to the team!

1. Subscribe to the public mailing lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you haven't yet, subscribe to {dev,users,<EMAIL>
mailing lists. Notifications mailing list is especially important because all of
Github Issue, Pull Request and build notifications are sent there.

2. Subscribe to the private mailing list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Subscribe to <EMAIL> by sending an email to
<EMAIL>. Keep in mind that this list is private
and your subscription needs to be approved by a moderator.

3. Create PyPi account
~~~~~~~~~~~~~~~~~~~~~~

Creating a PyPi account by going to
https://pypi.python.org/pypi?%3Aaction=register_form and send an email to
<EMAIL> requesting to be added as a maintainer to
`apache-libcloud <https://pypi.python.org/pypi/apache-libcloud/>`_ package.
Make sure to select a strong and unique password (``pwgen -s 48 1`` is your
friend).

After you have registered go to
"`Your details <https://pypi.python.org/pypi?%3Aaction=user_form>`_" page and
populate `PGP Key ID` field with your PGP key ID.

Merging user contributions
--------------------------

When a pull request with user contribution (changes) has been reviewed and
all the criteria for merging has been met (tests and code coverage, Travis
build is passing, user signed an ICLA, etc.), you can directly merge those
changes into trunk either by using Github web interface or doing it manually
on the command line.

It's also important that you update changelog in ``CHANGES.rst`` file after
you merged the changes.

Making a release (for release managers)
---------------------------------------

This section contains information a release manager should follow when
preparing a release.

0. Update committed files
~~~~~~~~~~~~~~~~~~~~~~~~~

* Make sure ``CHANGES`` file is up to date
* Make sure ``__version__`` string in ``libcloud/__init__.py`` is up to date
* Make sure ``version`` and ``release`` in ``docs/conf.py`` are up to date
* Update constants: ``python contrib/scrape-ec2-sizes.py > libcloud/compute/constants.py``

1. Pre-release check list
~~~~~~~~~~~~~~~~~~~~~~~~~

* Make sure tests pass on all the supported Python versions (``tox``)
* Remove the ``tox`` directory with ``rm -rf .tox``
* Remove the _secrets_ file with ``rm libcloud/test/secrets.py``
* Remove leftover builds from previous releases. ``rm -f dist/apache* ; rm -rf apache_libcloud.egg-info``

2. Update Github
~~~~~~~~~~~~~~~~~

* Create a new Github milestone for the release in question (if one doesn't exist
  yet)
* Update affected issues and pull requests and add the corresponding release
  milestone to them

3. Creating release artifacts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We have a script that runs the required setup.py commands and then hashes
and signs the files. You will need the latest version of ``pip`` and the ``wheel``
package. To run it:

.. sourcecode:: bash

    cd dist
    ./release.sh -u <yourusername>@apache.org

``-u`` argument will be used to find a key with a matching email address in
your local GPG database.

This should result in a set of
``apache-libcloud-${VERSION}.{tar.bz2,tar.gz,zip,whl}{,asc,md5,sha1}`` files that
are suitable to be uploaded for a release.

Copy the artifacts in another directory, unpack one of them and test it with ``tox``.

4. Tagging a release
~~~~~~~~~~~~~~~~~~~~

Tag the tentative release with a ``-tentative`` postfix.

.. sourcecode:: bash
{'fraction_non_alphanumeric': 0.15370658372213583, 'fraction_numerical': 0.0044064282011404875, 'mean_word_length': 3.9563262684649967, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 24, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4858368', 'n_tokens_mistral': 2148, 'n_tokens_neox': 2024, 'n_words': 1018}