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

in util.version.py::get_project_path(), consider calling modules to report VERSION correctly #109

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

tomkinsc
Copy link
Member

When derived modules (i.e. viral-classify) are symlinked into viral-core and their versions are read from a VERSION file, only the path to the viral-core version file was read.

This changes that behavior, so outer members of the call stack are checked for the presence of VERSION files as well (and if found, the version is read from the first/outermost one found).

(i.e. when calling ./taxon-filter.py --version, with these changes, the version of viral-classify is correctly returned rather than the version of viral-core)

Since this relies on the presence of a VERSION file to find the current "project path", this will fall back to the old behavior if viral-core has a VERSION file but the derived module lacks such a file.

This does not change the existing behavior where a version file will not be created for a derived module when calling ./symlinked_derived_module.py --version

When derived modules (i.e. viral-classify) are symlinked into viral-core and their versions are read from a VERSION file, only the path to the viral-core version file was used. This changes that behavior, so outer members of the call stack are checked for the presence of VERSION files as well (and if found, the version is read from the first/outermost one found).

(i.e. when calling ./taxon-filter.py --version, with these changes, the version of viral-classify is correctly returned rather than the version of viral-core)

Since this relies on the presence of a VERSION file to find the current "project path", this will fall back to the old behavior if viral-core has a VERSION file and a derived module lacks such a file.

This does not change the behavior where a version file will not be created for a derived module when calling `./symlinked_derived_module.py --version`
@tomkinsc tomkinsc merged commit dd0d3c8 into master Aug 23, 2024
10 checks passed
@tomkinsc tomkinsc deleted the ct-version-read-fix branch August 23, 2024 21:11
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.

1 participant