diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 255ab1c..f24ada5 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -28,6 +28,6 @@ Before committing, run style and linter checks using Code structure --------------- -The folder `ytmusicapi` contains the main library which is distributed to the users. -Each main library function in `ytmusic.py` is covered by a test in the `tests` folder. +The folder ``ytmusicapi`` contains the main library which is distributed to the users. +Each main library function in ``ytmusic.py`` is covered by a test in the ``tests`` folder. If you want to contribute a new function, please create a corresponding unittest. \ No newline at end of file diff --git a/docs/source/setup.rst b/docs/source/setup.rst index f1fc3e0..e874c43 100644 --- a/docs/source/setup.rst +++ b/docs/source/setup.rst @@ -23,7 +23,7 @@ in the correct format in the current directory. Manual file creation -------------------- -Alternatively, you can paste the cookie to `headers_auth.json` below and create your own file: +Alternatively, you can paste the cookie to ``headers_auth.json`` below and create your own file: .. literalinclude:: ../../headers_auth.json.example :language: JSON \ No newline at end of file diff --git a/tests/README.rst b/tests/README.rst index 2ad4ac4..831babe 100644 --- a/tests/README.rst +++ b/tests/README.rst @@ -1,22 +1,22 @@ Package tests ============================================ -Tests use the `unittest` framework. Each function has a corresponding unittest. +Tests use the ``unittest`` framework. Each function has a corresponding unittest. Sometimes there is a single unittest for multiple functions to ensure there are no permanent changes in the user's YouTube account (i.e. subscribe and unsubscribe). -Note that there must be a `headers_auth.json` in the project root to run authenticated tests. +Note that there must be a ``headers_auth.json`` in the project root to run authenticated tests. For testing the song upload, there also needs to be a file with the name specified in the code in the project root. -Copy `tests/test.cfg.example` to `test.cfg` in the project root to run tests with coverage. +Copy ``tests/test.cfg.example`` to ``test.cfg`` in the project root to run tests with coverage. Adjust the file to contain appropriate information for your YouTube account and local setup. Coverage badge -------------- -Install `coverage` and `coverage-badge` with pip. Run +Install ``coverage`` and ``coverage-badge`` with pip. Run -`coverage run --source=ytmusicapi -m unittest discover tests` +``coverage run --source=ytmusicapi -m unittest discover tests`` to generate a coverage report in the project root. With -`coverage-badge -o tests/coverage.svg -f` +``coverage-badge -o tests/coverage.svg -f`` you generate the badge. \ No newline at end of file