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¶
-
src/modssc/: core library and CLI implementations. [4] -
bench/: benchmark runner and experiment configs (repository-only). [5] -
examples/andnotebooks/: runnable demos and exploratory workflows. [4][6]
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]
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.
42.6 Related links¶
Sources
pyproject.tomltests/tests/README.mdbench/README.mdexamples/src/modssc/inductive/base.pysrc/modssc/inductive/registry.pysrc/modssc/transductive/base.pysrc/modssc/transductive/registry.pysrc/modssc/data_loader/catalog/src/modssc/data_loader/providers/base.pysrc/modssc/data_loader/providers/__init__.py