pyproject.toml
High-level description
This pyproject.toml
file defines the configuration for the Cassiopeia project, a Python package for single-cell lineage reconstruction. It specifies project metadata, dependencies, build settings, and optional features for development, documentation, and spatial analysis.
Code Structure
The file is structured into several sections using TOML format, including tool configurations for Poetry (a Python dependency management tool), project metadata, dependencies, build settings, and extras for different use cases.
Symbols
[tool.poetry]
Description
This section defines the project metadata for the Cassiopeia package.
Internal Logic
- Specifies authors, classifiers, description, documentation URL, homepage, keywords, license, package name, readme file, repository URL, and version.
- Includes file paths for wheel format distribution.
- Defines the main package to be included.
[tool.poetry.dependencies]
Description
Lists all the dependencies required for the Cassiopeia package.
Internal Logic
- Specifies required Python packages and their version constraints.
- Some dependencies are marked as optional and are tied to specific features (e.g., development, documentation, spatial analysis).
[tool.poetry.build]
Description
Configures the build process for the package.
Internal Logic
- Disables automatic setup file generation.
- Specifies a custom build script (
build.py
).
[build-system]
Description
Defines the build system requirements for the package.
Internal Logic
- Specifies Poetry as the build backend.
- Lists required packages for building, including Cython and numpy.
[tool.poetry.scripts]
Description
Defines command-line entry points for the package.
Internal Logic
- Maps the
cassiopeia-preprocess
command to the main function in thecassiopeia.preprocess.cassiopeia_preprocess
module.
[tool.poetry.extras]
Description
Defines optional feature sets that can be installed separately.
Internal Logic
dev
: Includes development tools like black, pytest, and pre-commit.docs
: Includes documentation generation tools like Sphinx.spatial
: Includes packages for spatial analysis features.
Dependencies
The project has numerous dependencies, including:
- Core scientific libraries: numpy, scipy, pandas, scikit-learn
- Bioinformatics tools: Biopython, pysam
- Visualization libraries: matplotlib, plotly
- Machine learning: scikit-learn
- Documentation: Sphinx and related packages
- Development tools: black, pytest, pre-commit
Configuration
The file itself serves as a configuration for the project, defining various aspects of the package structure, dependencies, and build process.
API/Interface Reference
The file defines one command-line interface:
Endpoint | Method | Description |
---|---|---|
cassiopeia-preprocess | Command | Entry point for the Cassiopeia preprocessing pipeline |
This command likely corresponds to the main()
function in the cassiopeia/preprocess/cassiopeia_preprocess.py
file, which is referenced in the related code snippets.