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

Fix science build to handle nested file names. #7

Merged
merged 5 commits into from
May 14, 2023

Conversation

jsirois
Copy link
Contributor

@jsirois jsirois commented May 14, 2023

Previously a flat name like "science.pyz" would work without a --path
mapping if the file was in the cwd, but a name like "dist/science.pyz"
would not even if it the file was at that path relative to the cwd.

Fixes #2

Previously a flat name like "science.pyz" would work without a `--path`
mapping if the file was in the cwd, but a name like "dist/science.pyz"
would not even if it the dile was at that path relative to the cwd.

Fixes a-scie#2
@jsirois
Copy link
Contributor Author

jsirois commented May 14, 2023

@sureshjoshi you've got an invite to collaborate in this repo, but even if you don't want to accept that, perhaps you want to review the test. The fix is exactly what you suggested with a new test that fails without the fix.

@jsirois jsirois changed the title Fix science build to handle nest file names. Fix science build to handle nested file names. May 14, 2023
@jsirois jsirois requested a review from benjyw May 14, 2023 17:30
@@ -142,3 +145,50 @@ def test_dogfood(tmp_path: Path, science_exe: Path, config: Path, science_pyz: P
"Expected the bootstrap science executable to be able to build itself and produce a "
"byte-wise identical science executable."
)


def test_issue_2(tmp_path: Path, science_exe: Path, config: Path, science_pyz: Path) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a matter of taste, so feel free to ignore, but I prefer the test name to indicate what we're testing for (test_nested_filenames or whatever) with a comment linking to the issue, rather than the test name being opaque to the reader and forcing them to scramble for the issue to figure out what the test is trying to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jsirois jsirois merged commit dbfd378 into a-scie:main May 14, 2023
@jsirois jsirois deleted the issues/2 branch May 14, 2023 20:52
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.

Error if pex file is not a sibling to science config
2 participants