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

Ranked packages for python guess #201

Merged
merged 10 commits into from
Jan 3, 2024

Conversation

blast-hardcheese
Copy link
Collaborator

@blast-hardcheese blast-hardcheese commented Dec 28, 2023

Initial work towards #15

  • Converting Guess over to an import statement mapping to multiple packages that can provide that import
  • If any package in the package array is installed, the entire array is removed
  • After filtering, we pick the first package in every array and offer those as the response from guess

Follow-on work to this as follows:

  1. Augment the process that writes internal/nix/python_map.json to also include information about which package roots (the shallowest module in a package with more than one child, to start. There may be some utility in indexing what classes are available as well, but that'll come in the future)
  2. Alter UPM to build a bespoke index by walking the $PYTHONPATH to exclude packages from guess that already supply necessary imports.

@blast-hardcheese blast-hardcheese added the bug Something isn't working label Dec 28, 2023
@blast-hardcheese blast-hardcheese requested a review from a team as a code owner December 28, 2023 04:06
@blast-hardcheese blast-hardcheese requested review from airportyh and cdmistman and removed request for a team and airportyh December 28, 2023 04:06
@blast-hardcheese blast-hardcheese force-pushed the dstewart/ranked-packages-for-python-guess branch 3 times, most recently from 72ca8b7 to e54f51f Compare December 28, 2023 18:29
Copy link
Contributor

@cdmistman cdmistman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

after ^ addressed lgtm

@blast-hardcheese blast-hardcheese enabled auto-merge (squash) January 2, 2024 22:27
@blast-hardcheese blast-hardcheese force-pushed the dstewart/ranked-packages-for-python-guess branch from b33f5dd to 1132e8c Compare January 2, 2024 22:58
@blast-hardcheese blast-hardcheese force-pushed the dstewart/ranked-packages-for-python-guess branch from ff8a787 to 37a81c0 Compare January 3, 2024 02:48
@blast-hardcheese blast-hardcheese merged commit fe14912 into main Jan 3, 2024
2 of 3 checks passed
@blast-hardcheese blast-hardcheese deleted the dstewart/ranked-packages-for-python-guess branch January 3, 2024 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants