Skip to content

Add tag support for rust packages - #16

Merged
pombredanne merged 1 commit into
aboutcode-org:masterfrom
TG1999:rust-tags
Aug 20, 2020
Merged

Add tag support for rust packages#16
pombredanne merged 1 commit into
aboutcode-org:masterfrom
TG1999:rust-tags

Conversation

@TG1999

@TG1999 TG1999 commented Mar 17, 2020

Copy link
Copy Markdown
Collaborator

Related issue #14

Signed-off-by: TG1999 tushar.goel.dav@gmail.com

Comment thread package_registry/rust_tags.py Outdated
return '{}/{}'.format(base_url, package)


def get_tags(package):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldnt this be get_versions? AFAIK, tags are specific to git and other VCS systems.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, you are right , will change it ASAP

@TG1999

TG1999 commented Mar 19, 2020

Copy link
Copy Markdown
Collaborator Author

@MaJuRG done

@steven-esser steven-esser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can we get a few more tests here. Specifically when there is no/None data and when there is junk data?

We want to know what happens in these cases.

@TG1999

TG1999 commented Mar 19, 2020

Copy link
Copy Markdown
Collaborator Author

Yeah sure agreed, will add some testing :)
Any suggestions from your side @MaJuRG to give tests a little bit variation or should I test it conventionally like I did in pre existing tests

@steven-esser

Copy link
Copy Markdown
Contributor

@TG1999 at minimum we need to know the behavior of functions when they are passed None or null type data AND when we pass them junk data.

Also, you can add some where there are special characters etc. You need to think about all the cases you may come across when using this code.

@TG1999

TG1999 commented Mar 19, 2020

Copy link
Copy Markdown
Collaborator Author

Cool, thanks @MaJuRG for your guidance, will add the tests :D

Comment thread package_registry/rust_versions.py Outdated
Comment thread package_registry/rust_versions.py Outdated
Comment thread package_registry/rust_versions.py Outdated
@TG1999

TG1999 commented Mar 24, 2020

Copy link
Copy Markdown
Collaborator Author

@MaJuRG all the changes have been addressed

Comment thread package_registry/rust_versions.py Outdated
Comment on lines +41 to +42
if 'versions' in response:
versions = response.get('versions')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can handle this a different way:

versions = response.get('versions', [])

This way, we can get rid of the "if" statement and one level of indentation. Some of your tests may need to be updated.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sure I will do the suggested updates

@TG1999

TG1999 commented Mar 24, 2020

Copy link
Copy Markdown
Collaborator Author

Done @MaJuRG

@TG1999
TG1999 requested a review from steven-esser March 27, 2020 15:33
Signed-off-by: TG1999 <tushar.goel.dav@gmail.com>
@pombredanne
pombredanne merged commit 55696d1 into aboutcode-org:master Aug 20, 2020
JonoYang pushed a commit that referenced this pull request Aug 2, 2021
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.

3 participants