This document explains how to set up your development environment and workflow for contributing to SimNexus.
- Python 3.10 or newer
- uv for dependency management
- Git
-
Clone the repository:
git clone https://github.com/teaching-repositories/simnexus.git cd simnexus -
Create a virtual environment and install dependencies:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install -e .[dev]
This will install the package in development mode, making the package editable while working on it.
SimNexus uses:
Run linting:
ruff check .Run formatting:
ruff format .Run type checking:
mypy simnexusSimNexus uses pytest for testing.
Run tests:
pytestRun tests with coverage:
pytest --cov=simnexusSimNexus uses MkDocs with the Material theme.
Build documentation:
mkdocs buildServe documentation locally:
mkdocs servesimnexus/
├── src/ # Source directory
│ ├── simnexus/ # Package source code
│ │ ├── core/ # Core simulation logic
│ │ ├── cli/ # Command line interface
│ │ ├── tui/ # Terminal user interface
│ │ ├── web/ # Web interface
│ │ ├── viz/ # Visualization utilities
│ │ ├── utils/ # Helper utilities
│ │ └── config/ # Configuration management
│
├── tests/ # Test suite
├── docs/ # Documentation
├── examples/ # Example scripts
├── scripts/ # Build and utility scripts
├── .github/ # GitHub workflows and templates
├── pyproject.toml # Project configuration
└── mkdocs.yml # Documentation configuration
- Update version in
pyproject.toml - Update the changelog
- Run the release script:
# Install required dependencies if needed pip install build twine # Test the release (uploads to TestPyPI) python scripts/release.py --test # Make the actual release python scripts/release.py
Alternatively, you can still create and push tags manually:
git tag -a v0.x.x -m "Release v0.x.x"
git push origin v0.x.xGitHub Actions workflows automatically run:
- Tests on multiple Python versions
- Linting and type checking
- Documentation building and deployment
See .github/workflows/ for details.