Closed hugovk closed 2 years ago
You're welcome, thanks for pypi-data!
There were some questions too, which I can deal with in follow-ups if you like:
Should we run the tests in GitHub Actions?
And:
- I think we can drop
bugtrack_url
? Looks like it was dropped from Warehouse and I've not found any results for it (I built the first 6% of the database).docs_url
is sometimes used, looks like it's only used for legacy documentation that was uploaded to pythonhosted.org (e.g. pythonhosted.org/atd ). Perhaps we could name it "Legacy docs"? (Related: Add the ability to delete "legacy" documentation pypi/warehouse#582)project_url
seems to be always generated ashttps://pypi.org/project/{project}/
and subsequently ditched byparse_project_url
, so should we skip this too?
I'm ++ on everything you've suggested. Let's run tests in GHA and remove the URLs that are on the way out or not useful. Docs_url can be kept with a name of "docs_url" maybe?
Yep, sounds good.
Fixes #13. Fixes #14.
First, refactor the startup stuff into
if __name__ == "__main__":
so we can importmain.py
and easily unit test it instead testing against the live API.Should we run the tests in GitHub Actions?
Move the fetching of
project_urls
into a new function:get_project_urls(resp["info"])
Similar to before, we initialise the list with:
It's now a list of (name, URL) tuples instead of just URLs, because we're also going to save the name into the database.
For
download_url
andhome_page
I put "Downloads" and "Homepage" because that is what's shown on PyPI.I think we can drop
bugtrack_url
? Looks like it was dropped from Warehouse and I've not found any results for it (I built the first 6% of the database).docs_url
is sometimes used, looks like it's only used for legacy documentation that was uploaded to https://pythonhosted.org/ (e.g. https://pythonhosted.org/atd/ ). Perhaps we could name it "Legacy docs"? (Related: https://github.com/pypi/warehouse/issues/582)project_url
seems to be always generated ashttps://pypi.org/project/{project}/
and subsequently ditched byparse_project_url
, so should we skip this too?Demo