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

Use Conda Forge graph for package name mappings and less downloads #13

Merged
merged 12 commits into from
Sep 2, 2021

Conversation

flying-sheep
Copy link
Collaborator

@flying-sheep flying-sheep commented Aug 31, 2021

Fixes #12

However, not everything seems to be in there, e.g. black is missing. Maybe the file only contains mappings that are not trivial?

@saulshanabrook
Copy link
Contributor

Oh nice, this is awesome! @jaimergp do you know how to best use this file?

@flying-sheep
Copy link
Collaborator Author

flying-sheep commented Aug 31, 2021

I investigated a bit, but I can’t find a simple list of packages available. I think:

  • cf-graph-countyfair/master/graph.json contains all conda packages (and their for us useless dependency info)
  • cf-graph-countyfair/master/mappings/pypi/name_mapping.yaml contains all combinations of PyPI name, conda name, and import where the three are not equivalent
  • cf-scripts/master/conda_forge_tick/pypi_name_mapping_static.yaml the same as the one before, but manually maintained. IDK if the info in this one is included in the previous one.

@jaimergp
Copy link

  • cf-graph-countyfair/master/mappings/pypi/name_mapping.yaml contains all combinations of PyPI name, conda name, and import where the three are not equivalent

Yep this is the one you need. It should only contain known packages (to conda-forge) that don't share a name with PyPI. @viniciusdc might have some more info, since he's more involved with the bot infrastructure there.

@viniciusdc
Copy link

viniciusdc commented Aug 31, 2021

  • cf-graph-countyfair/master/mappings/pypi/name_mapping.yaml contains all combinations of PyPI name, conda name, and import where the three are not equivalent

Yep this is the one you need. It should only contain known packages (to conda-forge) that don't share a name with PyPI. @viniciusdc might have some more info, since he's more involved with the bot infrastructure there.

Indeed that's the best source for your problem. There is a notebook where you can inspect some of the metadata within the conda-forge json in that repo as well, if needed. About the usage of the static maps, this one pypi_mapping.py generates the magic

@flying-sheep
Copy link
Collaborator Author

Great, thank you!

This is looking good. Would be nice if there was a smaller JSON blob to download for the list of packages on conda forge, but with some caching, the graph.json will work too.

@flying-sheep flying-sheep marked this pull request as ready for review September 1, 2021 09:42
@flying-sheep
Copy link
Collaborator Author

flying-sheep commented Sep 1, 2021

Using it now looks like this (once an hour, otherwise no progress bars)

$ python -m beni pyproject.toml
Creating cache for name_mapping.yaml at /home/phil/.cache/beni: 100%|█████████████████████████████| 636k/636k [00:00<00:00, 5.46MB/s]
Creating cache for graph.json at /home/phil/.cache/beni: 100%|██████████████████████████████████| 8.28M/8.28M [00:01<00:00, 5.70MB/s]
channels:
- conda-forge
dependencies:
- ...

@flying-sheep flying-sheep changed the title Use CF graph Use Conda Forge graph for package name mappings and less downloads Sep 1, 2021
@flying-sheep flying-sheep merged commit fe4bd23 into master Sep 2, 2021
@flying-sheep flying-sheep deleted the cf-graph branch September 2, 2021 10:46
@saulshanabrook
Copy link
Contributor

Awesome! That looks great 🎈

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.

Switch to using cf-graph-countyfair for pypi -> conda forge mapping
4 participants