Skip to content

Commit 45db8a4

Browse files
committed
Added 'Contributing' page to documentation
1 parent f2f9e1e commit 45db8a4

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

docs/contributing.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Contributing
2+
------------
3+
If you're looking to contribute to this package: welcome!
4+
5+
Setup
6+
^^^^^
7+
Start out by installing with ``pip install -e .[dev]`` (this installs the package in editable mode alongside the development dependencies).
8+
During development, unit and integration tests can be ran with ``pytest``.
9+
`Black <https://pypi.org/project/black/>`_ is used as a formatter, and `Ruff <https://pypi.org/project/ruff/>`_ is used as a linter to check the formatting, import sorting et cetera.
10+
When using Visual Studio Code, use the ``settings.json`` found in ``.vscode`` to automatically have the correct linting, formatting and sorting during development.
11+
In addition, install the extensions recommended by us by searching for ``@recommended:workspace`` in the extensions tab for a better development experience.
12+
13+
Documentation
14+
^^^^^^^^^^^^^
15+
To build the documentation locally, run ``make clean html`` from the ``docs`` folder. Note that the package must have been installed in editable mode with ``pip install -e .``.
16+
Upon pushing to main or publishing a version, the documentation will be built and published to the GitHub Pages.
17+
The Docstring format used is Google.
18+
Type hints are to be included in the function signature and therefor omitted from the docstring.
19+
In Visual Studio Code, the ``autoDocstring`` extension can be used to automatically infer docstrings.
20+
When referrring to functions and parameters in the docstring outside of their definition, use double backquotes to be compatible with both MarkDown and ReStructuredText, e.g.: *"skip_draws_check: skips checking that each value in ``draws`` is in the ``dist``."*.
21+
22+
Testing
23+
^^^^^^^
24+
Before contributing a pull request, please run ``nox`` and ensure it has no errors. This will test against all Python versions explicitely supported by this package, and will check whether the correct formatting has been applied.
25+
Upon submitting a pull request or pushing to main, these same checks will be ran remotely via GitHub Actions.

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ This is an example output of this methodology package. It depicts the aggregated
2424
:maxdepth: 1
2525

2626
getting_started
27+
contributing
2728
autotuning_methodology
2829

2930

0 commit comments

Comments
 (0)