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
DM-43137: Use dayObs as bind parameter instead of day_obs in queries #85
Conversation
packageDir = getPackageDir("summit_utils") | ||
dataFilename = os.path.join(packageDir, "tests", "data", "blockInfoData.json") | ||
dataFilename = os.path.join(TESTDIR, "data", "blockInfoData.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the package dir method no longer preferred? I don't see a problem with this switch, but just want to educate myself, as this method used to be the way to do it, and I'm curious why changed, and if I should change it everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are looking for test data in a subdir relative to the test file, you should not use getPackageDir
because you always want the test data files to go with the test python files regardless of how EUPS has been configured. This is future-proofed as well since it lets tests run in a future that doesn't always have EUPS.
You currently have to use getPackageDir
in the package code to locate configs but at some point we really do need to move configs inside the python tree so we can use standard python package data to find the configs (which would let them work even without EUPS) but that is a big change that needs an RFC and changes to pex_config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, sounds good, thanks.
There is no need to find the EUPS package in order to find the test data.
No description provided.