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

DM-43137: Use dayObs as bind parameter instead of day_obs in queries #85

Merged
merged 6 commits into from Mar 4, 2024

Conversation

timj
Copy link
Contributor

@timj timj commented Mar 1, 2024

No description provided.

packageDir = getPackageDir("summit_utils")
dataFilename = os.path.join(packageDir, "tests", "data", "blockInfoData.json")
dataFilename = os.path.join(TESTDIR, "data", "blockInfoData.json")
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, sounds good, thanks.

tests/test_blockUtils.py Outdated Show resolved Hide resolved
tests/test_efdUtils.py Outdated Show resolved Hide resolved
tests/test_ics.py Outdated Show resolved Hide resolved
tests/test_tmaUtils.py Outdated Show resolved Hide resolved
@timj timj merged commit 85cbe3c into main Mar 4, 2024
2 checks passed
@timj timj deleted the tickets/DM-43137 branch March 4, 2024 18:40
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.

None yet

2 participants