Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Packageify & Migrate to Py3 #17

Open
wants to merge 73 commits into
base: master
Choose a base branch
from

Conversation

Adamtaranto
Copy link

@Adamtaranto Adamtaranto commented Dec 17, 2024

Migrate module to modern scientific python package format

Hi All, thanks for producing this tool! I've found it super useful in my work. I've done a bit of refactoring here to improve usability in modern python envs.

This PR restructures Flexidot as a pip installable, Py3 compatible, package.

When merged this will support distribution via PyPi and Bioconda.

Versioning is now controlled via git tags.

Several cmd line args have been modified to simplify handling with argparse. Next release should bump up a major version to v2.0.0 to signal that it is not backwards compatible.

Compatibility issues

Refactor and Modernise package structure

  • Use pyproject.toml
  • Use hatch as build tool
  • Use dynamic versioning with hatch-vcs based on git tags
  • Modularise! (Room for improvement here.)
  • Move dependency management out of app and into toml
  • Provide env yaml for setup
  • Kill ghost Global variables

Improve user experience

  • Make pip installable
  • Use logging module for console and file logs
  • Audit logging messages. Add/remove as required.
  • Use argparse to handle restrictions on input options.
  • Simplify cmd line args. i.e methods for providing multiple input files.
  • Add input file sanity checks
  • Auto clean up temp files
  • Minor speed up by avoiding redundant kmer indexing. Closes Double counting kmers in find_match_pos_diag() #21

Automation

  • Add action to enforce Ruff style formatting
  • Add action to run Pytests on Py v3.8 - 3.12 (No Biopython for 3.13 yet)

Testing

  • Add basic tests for core matching function
  • Replicate example plots from upstream repo.
  • Add more demo data for simple TIRs
  • Fix norev / rc_option so it toggles rc matches

@Adamtaranto
Copy link
Author

Hi Tony (@molbio-dresden) and @KathSe1984! I think this is ready for review if you have time to check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant