Skip to content

fix(hooks): use the Windows virtualenv interpreter - #3710

Open
audmartina9 wants to merge 2 commits into
Chain-Love:mainfrom
audmartina9:codex/fix-windows-venv-python
Open

fix(hooks): use the Windows virtualenv interpreter#3710
audmartina9 wants to merge 2 commits into
Chain-Love:mainfrom
audmartina9:codex/fix-windows-venv-python

Conversation

@audmartina9

@audmartina9 audmartina9 commented Sep 8, 2026

Copy link
Copy Markdown

On Windows, the pre-commit hook creates .venv/Scripts/python.exe but then tries to install dependencies using .venv/bin/python, which raises FileNotFoundError before validation starts. Select the Windows interpreter path on os.name == "nt" and keep the existing POSIX path elsewhere.

Adds one offline integration test that exercises the hook's dependency branch using a real virtual environment, an empty requirements file, and three fixture validators. Each validator asserts that it runs inside a virtual environment. Downloads and index checkout are replaced with local fixtures; the interpreter and pip calls are real.

Validation on Windows:

  • Reproduced the original FileNotFoundError at upstream commit 168495987009158d811c7bb41a3bb4b65d9a7a80 using the same offline fixture approach.
  • python -m unittest discover -s git-hooks -p test_pre_commit_venv.py -v — passed (1 test).
  • git diff --check — passed before commit.
  • This is a tooling change; no CSV values or schemas are modified. The offline test does not run the production dataset validation pipeline. Linux/macOS execution has not been tested here.

Prepared and tested with an AI coding assistant under the account holder's authorization. If this tooling fix is eligible for a discretionary USDC/USDT contributor reward, please assess it under the project's rules. I understand that the published per-cell data reward and schema-DBIP reward do not automatically cover this repair; no payment has been agreed or is being claimed as owed.

If this tooling contribution qualifies for a reward, Ethereum mainnet receiving address: 0xb45A8D75cDf5C85c15d046D6ceA826Db4c034C61.

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.

1 participant