42. Skip to content

42. Contributing and development

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

42.1 Dev setup

Install dependencies directly from the development extras declared in the project metadata. Use the editable pip install -e form when you want local code changes to be reflected immediately. [1]

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

The development extras are defined in pyproject.toml. [1]

42.2 Running tests

Tests are organized under tests/ and use pytest:

Use python -m pytest for the default suite. [1][2]

python -m pytest

Add flags or subset selection when needed. If you are only checking documentation contracts, prefer --no-cov so the repository-wide coverage gate does not fail on a tiny targeted subset. [1][2]

python -m pytest
python -m pytest --no-cov tests/contracts/test_docs_contracts.py

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

42.3 Style and linting

The project uses Ruff for linting and formatting. [1]

ruff check .
ruff format .

Ruff configuration is in pyproject.toml. [1]

42.4 Project structure explanation

42.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. tests/
  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