Skip to content
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

Metadata from pypi, or internal #37

Open
broeder-j opened this issue Feb 7, 2023 · 2 comments
Open

Metadata from pypi, or internal #37

broeder-j opened this issue Feb 7, 2023 · 2 comments

Comments

@broeder-j
Copy link

broeder-j commented Feb 7, 2023

Just an idea:

Pypi has an API for the basic metadata, for example see: https://pypi.org/pypi/codemetapy/json

one could use that as a backup if the parsing directly fails... (through then there is probably also nothing on pypi).

You use the orginal metadata parser from pkg and importlib_metadata, right?

One could also request the metadata for each python dependency that way to fill from that the metadata of the dependencies required for codemeta, or parse the metadata from the dependencies (which would only work if installed or?).

@proycon
Copy link
Owner

proycon commented Feb 13, 2023

Pypi has an API for the basic metadata, for example see: https://pypi.org/pypi/codemetapy/json

one could use that as a backup if the parsing directly fails... (through then there is probably also nothing on pypi).

That sounds like a good idea yes. It should be quite doable. We also have
Github and Gitlab API support after all, adding PyPi to the mix as a potential
source makes sense. Though indeed I'd rather have it as a fallback and not rely on it primarily, as
I think it's best if we can get as much from the git clone itself.

I'm definitely open to contributions on this.

You use the orginal metadata parser from pkg and importlib_metadata, right?

Indeed, that saves having to parse pyproject.toml or setup.py or setup.cfg directly and seems to most elegant way.

One could also request the metadata for each python dependency that way to
fill from that the metadata of the dependencies required for codemeta, or
parse the metadata from the dependencies (which would only work if installed
or?).

The actual dependencies seem not be listed in the pypi JSON. But from the source repo, it would work yeah.

@broeder-j
Copy link
Author

I am quit busy. I still want to finish the harvester contribution at some point and after lets see.

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

No branches or pull requests

2 participants