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: Don't filter out extras for a pip dependency. #377

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

feanil
Copy link
Contributor

@feanil feanil commented Aug 7, 2023

Before this change, the function was dropping extra dependencies. For
example:

If you had a requirements file like the following:

Xblock[django]

It will output: Xblock

The correct output should be Xblock[django]

This drops the extras which may have further constraint requirements or
more packages that are required. In the example, the package would need
Django but that dependency would not be visible upstream correctly.

@feanil feanil requested review from rgraber and a team August 7, 2023 14:41
@feanil feanil force-pushed the feanil/fix_update_py_sh_script branch from 303a9e4 to ad307cf Compare August 7, 2023 14:48
Copy link
Contributor

@rgraber rgraber left a comment

Choose a reason for hiding this comment

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

We should update python-template/setup.py as well so new repos get the correct regex.
Also can you document the tests you ran and what the difference was in output between the old and the new scripts?

Before this change, the function was dropping extra dependencies. For
example:

If you had a requirements file like the following:
```
Xblock[django]
```

It will output: `Xblock`

The correct output should be `Xblock[django]`

This drops the extras which may have further constraint requirements or
more packages that are required. In the example, the package would need
Django but that dependency would not be visible upstream correctly.
@feanil feanil force-pushed the feanil/fix_update_py_sh_script branch from ad307cf to c340961 Compare August 7, 2023 14:59
@feanil
Copy link
Contributor Author

feanil commented Aug 7, 2023

@rgraber I made the update to setup.py, for testing, I updated the description and commit message to make it more clear what the test looks like. The example is from the test I actually ran, let me know if you are looking for something else or if that's sufficient documentation of testing.

@feanil feanil requested a review from rgraber August 7, 2023 15:01
Copy link
Contributor

@rgraber rgraber left a comment

Choose a reason for hiding this comment

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

LGTM

@feanil feanil merged commit 46cfcb7 into master Aug 7, 2023
4 checks passed
@feanil feanil deleted the feanil/fix_update_py_sh_script branch August 7, 2023 15:07
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.

2 participants