Skip to content

Commit

Permalink
docs: improve contributing guide
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhoesel committed Oct 2, 2021
1 parent de41f03 commit d271c76
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/source/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ To setup Tox:

1. Install tox from your distributions package repositories (probably :code:`tox` or :code:`python3-tox`.
2. For this repository and clone it: :code:`git clone [email protected]:yourUsername/MusicBird`
3. Enter the repository and run :code:`tox -l`: :code:`cd MusicBird && tox -l`. Tox will now initialize itself
and then display all available environments. You can run :code:`tox` to run all tests/integration steps at once.
3. Run :code:`tox -l` from inside the repository to see all available environments. Run :code:`tox` to test all environments.

Now,change to a feature branch and start making your changes. Whenever you are ready to test, you can just run :code:`tox -e <environment>`
to run the individual test steps.
Expand Down Expand Up @@ -47,7 +46,7 @@ Commit Messages

Follow the guidelines below when committing your changes

* All commits **must** follow the <conventional-commits standard https://www.conventionalcommits.org/en/v1.0.0/>_:
* All commits **must** follow the `conventional-commits standard <https://www.conventionalcommits.org/en/v1.0.0/>`_:
:code:`<type>(optional scope): <description>`
* Valid scopes are all components of this project, such as modules or commands
* Structure your changes so that they are separated into logical and independent commits whenever possible.
Expand All @@ -56,6 +55,7 @@ Follow the guidelines below when committing your changes
allowing you to make modifications before adding them to your branch.

Some good examples:

* :code:`fix(prune): also delete files with unicode chars`
* :code:`feat: Add "config edit" command`

Expand All @@ -77,14 +77,14 @@ You can one (or both) using :code:`tox` (:code:`tox -- tests/unit`, :code:`tox -

.. note::

Tox tries to test against all python versions that MusicBird supports (3.8 and up as of October 2021).
Unless you happen to have

Tox tries to test against all python versions that MusicBird supports. This means that some pyxx tests might fail
on your machine, because you probably don't have all of them installed. You can use a tool like PyEnv to manage
Python installations.

Writing new Tests
-----------------

Any significant in the MusicBird source should have tests associated with it. If you are adding a new feature or similar,
Any significant code in the MusicBird source should have tests associated with it. If you are adding a new feature or similar,
you will therefore also have to write some tets. You can take a look at the existing tests for guidance.

Note that there are several fixtures available that you can use in your tests - see the :file:`tests/conftest.py` file
Expand Down

0 comments on commit d271c76

Please sign in to comment.