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

fake packages #50

Open
jkarp314 opened this issue Sep 23, 2020 · 3 comments
Open

fake packages #50

jkarp314 opened this issue Sep 23, 2020 · 3 comments

Comments

@jkarp314
Copy link
Contributor

Hi.

I'm working on updating the sanitize_deps function to use the name_mapping.yml file instead of the old pkg_data.yml file.

I don't know what to do about fake packages. (the '_FAKE_PACKAGES' in pkg.data.yml). What exactly are those? Is there a way we can get those from the name_mapping.yml file?

@ericdill

@jkarp314
Copy link
Contributor Author

jkarp314 commented Oct 5, 2020

Hi @ericdill, I just want to follow up on this.

I'm planning a PR where I change the sanitize_deps() function to use the new name_mapping.yml file to map the import names to conda names.

It would be nice to eventually delete the old pkg_data.yml file and not have to load it too.

The sanitize_deps() function still uses pkg_data.yml for the "fake packages" but I don't understand what they are. Is there a way we can get info about fake packages from the name_mapping.yml file, so that we can delete the old pkg_data.yml file?

@ericdill
Copy link
Owner

ericdill commented Oct 5, 2020

_FAKE_PACKAGES is a terrible name, but what is represents is that when you install packages like matplotlib or pymongo, there are a number of other top-level imports that become available. In the case of matplotlib, you can import mpl_toolkits. In the case of pymongo, you can import bson and gridfs. I'm not sure how best to capture that with the information we're getting out of conda-forge. cc @CJ-Wright

@CJ-Wright
Copy link
Collaborator

I think we can pull that out of the import maps in libcfgraph. For example in https://raw.githubusercontent.com/regro/libcfgraph/master/import_maps/mp.json if you search for mpl_toolkits you'll see the artifacts that support it that import (including a bunch of matplotlib)

I think the next move for that to happen would be to add another clause to the current import inspection logic to create a subset of the top-level imports and then use that.

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

3 participants