setup-tests.sh should support --active

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: Infrastructure
    • None
    • 🔵 Done
    • Python Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      Context

      `just setup-tests encryption` calls `uv run setup-tests.py` which then creates a venv to setup tests. If this command is run within an active venv, `uv` warns about it and suggest running with `–active`:

      warning: `VIRTUAL_ENV=/Users/alex.clark/Developer/django-mongodb-cli/.venv` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead

      There's currently no way to pass that arg to `just setup-tests`. Suggest adding an environment variable to the supported list of env vars that if set will run `uv run --active`. e.g. ACTIVE=1

      Definition of done

      ACTIVE=1 conditionally runs `uv run --active`.

      Pitfalls

      None

            Assignee:
            Alex Clark
            Reporter:
            Alex Clark
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: