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

Support for multiple extras sets with the same library #19

Open
gabe-l-hart opened this issue Feb 3, 2022 · 0 comments
Open

Support for multiple extras sets with the same library #19

gabe-l-hart opened this issue Feb 3, 2022 · 0 comments

Comments

@gabe-l-hart
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

When using import_tracker to manage a set of dependencies as optional in a large library, the problem of clean dependency management is deferred to the upstream library dependencies. Sometimes, those libraries also manage complex extras_require sets for various subsets of functionality. Currently, there is no way to subdivide the dependency on an upstream library across its extras_requires sets. For example:

requirements.txt

big_upstream[set1,set2]>=1.2.3

In this example, some modules in the library using import_tracker may require big_upstream, but may only use the parts of big_upstream from either set1 or set2. Currently, import_tracker will put big_upstream[set1,set2]>=1.2.3 into the extras_require set for all modules that require any functionality from big_upstream.

Describe the solution you'd like

The goal of this feature would be able to leverage the full set of dependency information for big_upstream[set1] and big_upstream[set2] independently such that individual modules within the import track'ed library can depend on these two extras sets independently.

Describe alternatives you've considered

Leave it as is and try to subdivide the upstream libs! Not terribly practical...

Additional context

The implementation of this would need to do the following:

  • Deduce the full set of modules required by each module+extras set listed in the requirements.txt (not sure if this is possible)
  • Use the full dependencies found when tracking a given module to cross-reference which module+extras set is needed for a given module, rather than using only the modules that appear in requirements.txt
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

1 participant