Skip to content

Contribute

Set Up a Development Environment

After cloning this repository, set up a development environment by using either Poetry or Dev Container.

Using Poetry

This project uses Poetry to manage dependencies. To set up a development environment, install Poetry and run poetry install:

$ pipx install poetry
$ poetry install --with dev

When running tests, serving documentation, using the CLI, or issuing any project-specific shell commands, be sure to either:

  • Issue all commands after entering the poetry virtual environment. You can enter the virtual environment with poetry shell, and exit the virtual environment with deactivate.
  • Preface all commands with poetry run. For example, run unit tests with poetry run pytest.

Using Dev Container

This repository includes a devcontainer configuration for Visual Studio Code. To use it, either:

  1. Install the Remote - Containers extension in VS Code and open the repository in a container.
  2. Open the devcontainer in GitHub Codespaces:

Launch devcontainer in GitHub Codespace instance

Run Tests

This project uses pytest for testing. To run tests, issue the pytest command in the Dev Container or poetry environment from the base of the repository:

$ pytest
# With coverage
$ poetry run pytest --cov-report term-missing --cov=datajoint_file_validator tests

Build and Serve Documentation

This project uses mkdocs to build documentation. To build and serve documentation, issue the mkdocs command in the Dev Container or poetry environment from the base of the repository:

$ mkdocs serve