Skip to content

Latest commit

 

History

History
118 lines (90 loc) · 2.41 KB

File metadata and controls

118 lines (90 loc) · 2.41 KB

Contributing to easymode

Development Setup

  1. Clone the repository:
git clone https://github.com/mgflast/easymode.git
cd easymode
  1. Create a virtual environment and install development dependencies:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"
  1. Install pre-commit hooks:
pre-commit install

Running Tests

Run all tests:

pytest

With coverage:

pytest --cov --cov-report=html

View coverage report:

open htmlcov/index.html  # On macOS
xdg-open htmlcov/index.html  # On Linux

Code Quality

This project uses:

  • ruff for linting and formatting
  • mypy for type checking (gradual adoption)
  • pre-commit for automated checks

Before committing, run:

pre-commit run --all-files

Or rely on the pre-commit hooks to run automatically on git commit.

Code Style

  • Line length: 88 characters (Black/Ruff default)
  • Docstring convention: NumPy style
  • Import sorting: isort via ruff

Making Changes

  1. Create a new branch for your feature or bugfix:
git checkout -b feature/your-feature-name
  1. Make your changes and commit them:
git add .
git commit -m "Description of changes"
  1. Push to your fork and create a pull request:
git push origin feature/your-feature-name

Making a Release

Releases are managed via git tags and automated through GitHub Actions:

  1. Update CHANGELOG.md with the new version
  2. Commit changes:
git add CHANGELOG.md
git commit -m "Prepare release vX.Y.Z"
  1. Create and push a tag:
git tag -a vX.Y.Z -m "Release vX.Y.Z"
git push origin vX.Y.Z
  1. GitHub Actions will automatically build and publish to PyPI

Project Structure

easymode/
├── src/easymode/           # Source code (src-layout)
│   ├── main.py            # CLI entry point
│   ├── core/              # Core utilities
│   ├── segmentation/      # 3D UNet segmentation
│   ├── ddw/               # DeepDeWedge denoising
│   └── n2n/               # Noise2Noise denoising
├── tests/                 # Test suite
├── .github/workflows/     # CI/CD configuration
└── pyproject.toml         # Project configuration

Questions or Issues?

  • Open an issue on GitHub
  • Check existing issues and pull requests first
  • Provide minimal reproducible examples for bugs