Closed matthewfeickert closed 2 years ago
The issue is related to this bit of code:
package = parse_object.path.split("/")[-1]
...
pypi_url = f"https://pypi.org/pypi/{package}/json"
The url from GitHub
returns package as awkward-1.0
but on pypi the package is registered as awkward
This is not a case I had considered where the repo name in GitHub does not match the package name in pypi
The current design of the package is GitHub first .... but maybe too naive. When the requirements
feature was added in v0.6.0 the package is looked up on PyPi and then gets the GitHub url to run the CLI.
Maybe a better way to do it is to start at the PyPi API url first.
First thing might be to output an error / warning message when using the PyPi API url, but that would impact 5 of the 12 questions and make the tool less useful.
A good nights sleep may help clarify which direction to go in
After a good night’s sleep, and good morning jog, I think that instead of using url as the starting point, we should start with the package name. Then, that can be fed into he PyPi API and that can get the various GitHub API URLs.
So, instead of:
the-well-maintained-test url 'https://github.com/ryancheley/the-well-maintained-test'
We would instead have:
the-well-maintained-test package 'the-well-maintained-test'
We can keep the url argument for backwards compatibility BUT we’d also switch it from being click.argument
to a click.option
I’m in the middle of an update for v0.7.0 so I think that I’ll add this change to the roadmap for v0.8.0.
@matthewfeickert what do you think of the proposed change above?
The url
option has been deprecated and replaced with package
. Marking this as closed since the underlying issue has been resolved. See c963b for full change
Describe the bug
the-well-maintained-test
v0.6.0
fails with ajson.decoder.JSONDecodeError
for a url target ofhttps://github.com/scikit-hep/awkward-1.0
To Reproduce
Expected behavior
For an argument of
https://github.com/scikit-hep/awkward-1.0
to give valid output.