32. Skip to content

32. Contributing and development

This page explains how to set up a dev environment, run tests, and contribute changes. If you are preparing a release, see Release process.

32.1 Dev setup

Use the Makefile targets or install dependencies directly.

Use make install-dev if you want a single command that matches the repo defaults. [2][1]

make install-dev

Use the editable pip install -e form when you want explicit control over installs and extras. [2][1]

python -m pip install -e "." && python -m pip install -e ".[dev]"

The development extras and Makefile targets are defined in pyproject.toml and Makefile. [1][2]

32.2 Running tests

Tests are organized under tests/ and use pytest:

Use make test for the default suite. [2][1]

make test

Use python -m pytest when you need custom flags or subset selection. [2][1]

python -m pytest

Pytest options and markers are configured in pyproject.toml. [1][3]

32.3 Style and linting

The project uses Ruff for linting and formatting:

make lint
make format

Ruff configuration is in pyproject.toml. [1][2]

32.4 Project structure explanation

32.5 Adding a new algorithm or dataset

Inductive methods: - Implement the InductiveMethod protocol and define a MethodInfo object. [7]

  • Register the method ID in register_builtin_methods. [8]

Transductive methods: - Implement the TransductiveMethod protocol and define MethodInfo. [9]

  • Register the method ID in register_builtin_methods. [10]

Datasets: - Add curated datasets by extending DATASET_CATALOG in the relevant modality file. [11]

  • Implement new providers by subclassing BaseProvider and registering it. [12][13]

Use a catalog entry when the dataset already fits an existing provider. Add a new provider when you need a new backend or authentication flow. Catalog entries reference providers by name. [11][12][13]

If you are preparing a tag or release artifacts, follow the release process.

Sources
  1. pyproject.toml
  2. Makefile
  3. tests/
  4. README.md
  5. bench/README.md
  6. examples/
  7. src/modssc/inductive/base.py
  8. src/modssc/inductive/registry.py
  9. src/modssc/transductive/base.py
  10. src/modssc/transductive/registry.py
  11. src/modssc/data_loader/catalog/
  12. src/modssc/data_loader/providers/base.py
  13. src/modssc/data_loader/providers/__init__.py