A self-contained Python module that combines multiple mass spectrometry quality control analysis scripts into a unified CLI interface using argparse for macproqc pipeline.
macproqc/
├── __init__.py # Package initialization
├── __main__.py # Entry point for `python -m macproqc`
├── cli.py # Main CLI with nested argparse subcommands
├── commands/ # Individual command modules
│ ├── __init__.py
│ ├── ... # actual logic and their partial CLI
└── utils/ # Shared utilities
├── __init__.py
└── hdf5.py # HDF5 helper functions
From the module directory:
pip install -e .Or for development with additional tools:
pip install -e ".[dev]"Or via docker
docker build -t mpc/macproqc-helpers:dev .macproqc-helpers --help
macproqc-helpers adjust-comet-params --help
macproqc-helpers combine-hdf5 --helppython -m macproqc_helpers --help
python -m macproqc_helpers combine-hdf5 -hdf_out_name output.hdf5 file1.hdf5 file2.hdf5Install the dev extras (includes pytest), then run the test suite from the module directory:
pip install -e ".[dev]"
pytestRun a single test file or test case:
pytest tests/test_collect_metrics_from_mzml.py
pytest tests/test_collect_metrics_from_mzml.py::test_metrics_match_reference -vFormatting, linting and type checking use ruff and ty (installed via the dev extras, configured in pyproject.toml). These also run in CI on every pull request and in the merge queue (.github/workflows/checks.yml).
pip install -e ".[dev]"
ruff format src tests # auto-format
ruff check src tests # lint
ty check # type check