-
Notifications
You must be signed in to change notification settings - Fork 194
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
Normalize PyPI package names #578
Normalize PyPI package names #578
Conversation
Use the same name as the subsequent set comprehensions so it's clearer to the reader that the same data is being operated on multiple times.
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.
nice! some comments.
Please also update the test here:
osv.dev/docker/worker/worker_test.py
Line 891 in a4b682a
def test_update_pypi(self): |
to make the test data have an un-normalized name.
* Standardize quoting * Abstract ecosystem-specific logic into normalization function See google#578 for details
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.
Nice! Looking good. We just need that test now :)
This will allow for the normalized value to be stored in Datastore and also set in the pubsub message.
This way the package name gets normalized before it goes to Datastore and PubSub
By George, I do believe I have tests. PTAL |
Very nice! I think you just need to format your code per https://github.com/google/osv.dev/runs/7782343232?check_suite_focus=true. (Ignore the lint errors -- this wasn't blocking our check and we need to fix them per #521) |
My bad, I knew I'd introduced changes that needed that and forgot to run it. PTAL. |
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.
very nice!! LGTM
Fixes: #508