Skip to content

Conversation

@standage
Copy link
Member

@standage standage commented Apr 28, 2025

This PR is enabling Python 3.12 support. This involved a versioneer upgrade, not only for the main package but also for accessory packages. The happer package was integrated into MicroHapulator as it probably never should have been an independent package. This eliminated one additional source of 3.12 incompatibility. The remaining source of incompatibility is MicroHapDB, whose version 0.12 release will be required before this PR can be merged.


Comment on lines -16 to +15
from pkg_resources import resource_filename
from importlib.resources import files
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pkg_resources package is also removed in Python 3.12, so it was replaced by importlib.resources.

Comment on lines +272 to +274
result,
"analysis/{}/03typing/callplots".format(wildcards.sample),
sample=wildcards.sample,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snakemake has weird problems with f-strings in Python 3.12, so calling the str.format function in a few places.

Comment on lines -43 to +44
linkfile = f"{params.outdir}/R{end}-fastqc.html"
# Snakemake f-strings break with Python 3.12: https://github.com/snakemake/snakemake/issues/2648
linkfile = "{}/R{}-fastqc.html".format(params.outdir, end)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's another.

@standage standage marked this pull request as ready for review April 30, 2025 18:49
@standage standage merged commit b30ed99 into main Apr 30, 2025
4 checks passed
@standage standage deleted the versioneer branch April 30, 2025 18:49
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.

2 participants