Solutions to the Rosalind problems in python as a command line app.
I'm trying not to use Biopython (whilst also not attempting to rewrite this from scratch!)
Some build details that I'm playing with while putting this together:
- CLI built using Poetry & Typer based on this blog post
- GitLab CI based on this medium blog post
- black for code formatting
- flake8 for code linting
- Pre-commit hook for formatting with black using pre-commit based on black docs
- Coverage and coverage reports with pytest-cov
- Snapshots of test output with snapshottest
- GitHub CI based with github actions
You can install with pip:
pip3 install rosalind
rosalind dna rosalind_dna.txt
You can run tests using poetry. For example, to test a function with the test data, run something like:
poetry run rosalind fib tests/data/test_fib.txt
To run all tests and calculate coverage run:
poetry run pytest --cov rosalind