Skip to content

Packageify & Migrate to Py3 #17

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

Merged
merged 74 commits into from
May 19, 2025
Merged

Conversation

Adamtaranto
Copy link
Collaborator

@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
Collaborator Author

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

@Adamtaranto Adamtaranto changed the title WIP: Packageify & Migrate to Py3 Packageify & Migrate to Py3 Apr 14, 2025
@Adamtaranto
Copy link
Collaborator Author

@crimBubble requested fix made. Let me know if there is anything else you want to change before merging.

@crimBubble crimBubble merged commit 014915f into flexidot-bio:master May 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Double counting kmers in find_match_pos_diag() numpy version Are there plans to make Flexidot suitable for Python 3?
2 participants