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

Better handle env vars DATAPATH, CYCLEFOLD_DATAPATH if already set correctly or when overriding #4

Closed
marcom opened this issue Jun 25, 2023 · 0 comments · Fixed by #5

Comments

@marcom
Copy link
Owner

marcom commented Jun 25, 2023

Don't warn when env vars DATAPATH, CYCLEFOLD_DATAPATH already set correctly

Currently we warn in __init__() if these env vars are already set. Don't warn if they are already set to what we would want to set them anyway.

This avoids unnecessary warnings, for example when running the tests after the package has already been loaded with using.

Accidentally overriding DATAPATH, CYCLEFOLD_DATAPATH should be harder

If DATAPATH or CYCLEFOLD_DATAPATH are already set, e.g. because another RNAstructure version has been installed on the system independently of julia, and these env vars are set in .bashrc, then this package will nearly silently (it will issue an @info, nothing more) use the wrong parameters.

Solution: use RNASTRUCTURE_JLL_DATAPATH, RNASTRUCTURE_JLL_CYCLEFOLD_DATAPATH env vars to override these vars in this package.

@marcom marcom changed the title Don't warn when env vars DATAPATH, CYCLEFOLD_DATAPATH already set correctly Better handle env vars DATAPATH, CYCLEFOLD_DATAPATH if already set correctly or when overriding Jan 17, 2024
marcom added a commit that referenced this issue Jan 18, 2024
Always ensure the DATAPATH, CYCLEFOLD_DATAPATH env vars are pointing
to the correct path from the `RNAstructure_jll` binary package.

These paths can be overridden with the RNASTRUCTURE_JL_DATAPATH,
RNASTRUCTURE_JLCYCLEFOLD_DATAPATH env vars if necessary.

Don't warn if the DATAPATH, CYCLEFOLD_DATAPATH env vars are already
set to the correct directories.  This avoids unnecessary warnings when
running the tests.

Fixes #4.
@marcom marcom closed this as completed in #5 Jan 18, 2024
marcom added a commit that referenced this issue Jan 18, 2024
Improve overriding energy parameter dirs via env vars

Always ensure the DATAPATH, CYCLEFOLD_DATAPATH env vars are pointing
to the correct path from the `RNAstructure_jll` binary package.

These paths can be overridden with the RNASTRUCTURE_JL_DATAPATH,
RNASTRUCTURE_JLCYCLEFOLD_DATAPATH env vars if necessary.

Don't warn if the DATAPATH, CYCLEFOLD_DATAPATH env vars are already
set to the correct directories.  This avoids unnecessary warnings when
running the tests.

Fixes #4.
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 a pull request may close this issue.

1 participant