You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Only provide options to enable/disable resolvers, not reorder them.
Does not make sense to have ID mapping anywhere other than at the bottom of the stack
Does not make sense to reorder PyPI vs --pyenv
A user-provided mapping should always have the highest priority.
This can be done e.g via:
Add a new option: --use-mappings that takes a sequence of "magic" words that correspond to the boxes in the diagram:
custom: [tool.fawltydeps.custom_mapping] from config file (if it exists). [^1]
pyenv: Any --pyenv option(s) given on the command or in the config file.
basepath: Any Python environments discovered under basepath i.e. in the current "project' (for lack of a better word). [^2]
current: The Python environment that FD is currently running in (aka sys.path).
pypi: The various components that make up the PyPI logic.
id: The identity mapping.
The user can pass --use-mappingswith their own list to reorder and skip any of the mappings corresponding to the above words. In other words, advanced users have full control.
The default value of --use-mappings (based on the above diagram) is: --use-mappings=custom,pyenv,basepath,current,id (pypi is off by default).
Add a --use-pypi option to insert pypi before the id mapping in the default list, i.e. equivalent to --use-mappings=custom,pyenv,basepath,current,pypi,id
Add a --use-pyenv-only option to reduce the list to --use-mappings=pyenv
Consider adding more options to satisfy common user scenarios.
Make all of these options mutually exclusive to prevent confusing scenarios with option combinations that don't make sense. (e.g. --use-pyenv-only --use-pypi).
The text was updated successfully, but these errors were encountered:
From #256 (comment):
This can be done e.g via:
The text was updated successfully, but these errors were encountered: