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

Add --venv option to CLI #219

Merged
merged 3 commits into from
Mar 14, 2023
Merged

Add --venv option to CLI #219

merged 3 commits into from
Mar 14, 2023

Conversation

jherland
Copy link
Member

@jherland jherland commented Mar 14, 2023

Depends on #215.

  • packages: Add venv_path argument to resolve_dependencies()
  • Add venv setting and --venv command-line option
  • test_real_projects: Use --venv instead of editable install of FD

@jherland jherland self-assigned this Mar 14, 2023
@jherland jherland force-pushed the jherland/look-at-other-venv branch from 6ba869e to e75553d Compare March 14, 2023 11:37
Base automatically changed from jherland/look-at-other-venv to main March 14, 2023 11:44
@dpulls
Copy link

dpulls bot commented Mar 14, 2023

🎉 All dependencies have been resolved !

tests/conftest.py Show resolved Hide resolved
noxfile.py Show resolved Hide resolved
fawltydeps/settings.py Show resolved Hide resolved
tests/test_real_projects.py Show resolved Hide resolved
Copy link
Collaborator

@Nour-Mws Nour-Mws left a comment

Choose a reason for hiding this comment

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

Ready to ship 🚀

@Nour-Mws Nour-Mws linked an issue Mar 14, 2023 that may be closed by this pull request
4 tasks
One step closer to exposing the ability to look at other venvs to our
end users.

Add a couple of tests using this new resolve_dependencies() argument.

Also add a fixture for quickly setting up a fake venv (just enough of a
directory structure to fool importlib_metadata into finding packages and
associated import names). This fixture could become useful in many of
our other tests in order to isolate our tests from the current venv.
Hook it up to the venv_path argument to resolve_depenedencies(), to
allow the user to control which venv FawltyDeps uses to map dependencies
into import names.

For now we only accept a single venv dir here, but this might change in
the near future.

TODO: Write tests to verify that setting the command-line/config option
has the desired effect.
Until now we've used Experiment.venv_with_fawltydeps() to install
FawltyDeps into the experiment's venv before each test run, and
uninstall it afterwards.

The new --venv flag enables us to instead have FawltyDeps analyze the
experiment's venv _without_ first being installed into it.

Use the --venv flag, and remove the now-obsolete FawltyDeps installation
from the experiment venvs.
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.

Dependency to import name(s) mapping from local environment: a roadmap
2 participants