EnvironmentΒΆ
This document describes how to configure and use your development environment.
PrerequisitesΒΆ
You must complete these steps once before you can start setting up the project itself:
- Install Python 3.11.
-
Verify that
pythoncan be launched by running this command in a new terminal:shell python --versionIf this fails, add the directory that contains thepythonexecutable to yourPATHenvironment variable. -
Install Poetry with the official installer. Follow the instructions for your operating system in the linked document.
- Verify that
poetrycan be launched by running this command in a new terminal:shell poetry --versionIf this fails, add the directory that contains thepoetryexecutable to yourPATHenvironment variable.
Project setupΒΆ
Follow the instructions for your preferred IDE. If you want to use neither PyCharm nor Visual Studio Code, use the generic instructions. You only need to do these steps once.
Note
All terminal commands listed in this section are assumed to be run from the root of the repository.
- Clone the repository.
- Open the project folder in PyCharm.
- Follow the instructions in the PyCharm documentation to create a new Poetry environment and to install the dependencies of the project.
- Open the PyCharm settings and search for "Python Integrated Tools". Set the "Default test runner" to "pytest" and the "Docstring format" to "NumPy". Your settings should look like this:

- Clone the repository.
- Open the project folder in Visual Studio Code.
- Install the Python extension.
- Create a new Poetry environment and install the dependencies of the project by running this command:
shell poetry install - Find the path to the Poetry environment that was created in step 4 by running this command:
shell poetry env info --path - Copy the output of step 5 to your clipboard.
- Open the command palette and search for "Python: Select Interpreter".
- Select the Poetry environment that matches the output of step 5. It should show up in the list of available interpreters. If it does not, you can pick it manually by choosing "Enter interpreter path..." and pasting the path that you copied in step 6 into the input field.
- Open the command palette and search for "Python: Configure Tests".
- Select "pytest" as the test runner.
- Select "tests" as the directory containing tests.
- Clone the repository.
- Create a new Poetry environment and install the dependencies of the project by running this command:
shell poetry install
Running the testsΒΆ
Right-click the tests directory in the Project tool window and select "Run 'pytest in tests'".
Run the tests by opening the command palette and searching for "Test: Run All Tests".
Run this command from the root of the repository:
shell
poetry run pytest
Serving the documentationΒΆ
- Start the server by running this command from the root of the repository:
shell poetry run mkdocs serve - Check the command output for the URL of the created site and open it in a browser (usually localhost:8000).
You can keep the server running while you edit the documentation. The server will automatically rebuild and reload the site when you save changes.