Skip to content

support-python-private-classifier#4075

Open
VarshaUN wants to merge 11 commits intoaboutcode-org:developfrom
VarshaUN:support-python-private-package
Open

support-python-private-classifier#4075
VarshaUN wants to merge 11 commits intoaboutcode-org:developfrom
VarshaUN:support-python-private-package

Conversation

@VarshaUN
Copy link
Copy Markdown

@VarshaUN VarshaUN commented Jan 6, 2025

Fixes #3968

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁

Signed-off-by : Varsha U N varshaun58@gmail.com

@VarshaUN VarshaUN force-pushed the support-python-private-package branch 2 times, most recently from ef81e8a to f2c2b35 Compare January 7, 2025 02:39
Signed-off-by: Varsha U N <varshamaddur2006@gmail.com>

Signed-off-by: Varsha U N <varshamaddur2006@gmail.com>

Signed-off-by: Varsha U N <varshamaddur2006@gmail.com>
@VarshaUN VarshaUN force-pushed the support-python-private-package branch from f2c2b35 to e03db23 Compare January 11, 2025 15:19
Signed-off-by: Varsha U N <varshaun58@gmail.com>
Signed-off-by: Varsha U N <varshaun58@gmail.com>
Signed-off-by: Varsha U N <varshaun58@gmail.com>
Copy link
Copy Markdown
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Choose a reason for hiding this comment

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

@VarshaUN Thanks++ for the PR, this is looking great.
See comments for some small improvements and we can merge after that.
Apologies for the late review. 😅

Comment thread src/packagedcode/pypi.py Outdated
Comment thread src/packagedcode/pypi.py Outdated
Signed-off-by: Varsha U N <varshaun58@gmail.com>
Copy link
Copy Markdown
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Choose a reason for hiding this comment

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

Thanks++ @VarshaUN!

A couple more related changes are required as private classifiers are used generally in other python package manifests too, not just pyproject.toml files, so please see my comments.

Comment thread src/packagedcode/pypi.py Outdated
Comment thread src/packagedcode/pypi.py Outdated
@VarshaUN
Copy link
Copy Markdown
Author

Hey @AyanSinhaMahapatra I have moved that two lines of code into a function in utils.py and imported it in pypi.py and used it in handlers as you have mentioned.

Copy link
Copy Markdown
Member

@AyanSinhaMahapatra AyanSinhaMahapatra left a comment

Choose a reason for hiding this comment

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

@VarshaUN thanks++ for the updates to support all cases where this is seen, looking good. Could you add tests to cover all the cases, and this should be ready to merge.

Also please make sure all tests pass, and verify that the test expectation changes are intended and related to this PR: https://dev.azure.com/nexB/scancode-toolkit/_build/results?buildId=16089&view=logs&j=1412dbfa-421a-5a40-8ddf-7073fc46aa19&t=13c90161-2109-5957-f563-a96fefc7d869

Comment thread src/packagedcode/pypi.py
Signed-off-by: Varsha U N <varshaun58@gmail.com>
Signed-off-by: Varsha U N <varshaun58@gmail.com>
Comment thread src/packagedcode/utils.py Outdated
def is_simple_path_pattern(path):
return path.endswith('*') and path.count('*') == 1

def is_private_package(classifiers):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should not be in utils, but in the pypi.py

Signed-off-by: Varsha U N <varshaun58@gmail.com>
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.

Support Python private packages

3 participants