Skip to content

Contributing to pymfx

Setup

git clone https://github.com/jabahm/pymfx
cd pymfx
pip install -e ".[dev]"

Run tests

pytest                        # run all tests
pytest --cov=pymfx            # with coverage

Code style

ruff check pymfx/             # lint
ruff format pymfx/            # format

Publish to PyPI

# 1. Bump version in pyproject.toml and CHANGELOG.md
# 2. Build
python -m build

# 3. Check the distribution
twine check dist/*

# 4. Upload to TestPyPI first
twine upload --repository testpypi dist/*

# 5. Install from TestPyPI and verify
pip install --index-url https://test.pypi.org/simple/ pymfx

# 6. Upload to PyPI
twine upload dist/*

Adding a converter

Create a new module under pymfx/converters/<format>.py with:

def from_<format>(source) -> MfxFile:
    ...

And expose it in pymfx/converters/__init__.py.