Skip to content

Check if python starts python3#6239

Merged
pavoljuhas merged 4 commits intoquantumlib:masterfrom
pavoljuhas:check-if-python-runs-python3
Aug 18, 2023
Merged

Check if python starts python3#6239
pavoljuhas merged 4 commits intoquantumlib:masterfrom
pavoljuhas:check-if-python-runs-python3

Conversation

@pavoljuhas
Copy link
Copy Markdown
Collaborator

Problem: dev_tools/pypath does not work when python command does
not exist causing a failure in check/pytest (PYTHONPATH not set).

Solution: Require that python starts Python 3.
Bail out from the check scripts otherwise.

This bails out when `python` command does not exist or
does not start Python 3.
@pavoljuhas pavoljuhas requested review from a team, cduck and vtomole as code owners August 11, 2023 21:26
@pavoljuhas pavoljuhas requested a review from maffoo August 11, 2023 21:26
@CirqBot CirqBot added the size: S 10< lines changed <50 label Aug 11, 2023
@pavoljuhas
Copy link
Copy Markdown
Collaborator Author

cc: @nafaynajam

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 11, 2023

Codecov Report

Patch coverage: 75.00% and no project coverage change.

Comparison is base (30fa6f5) 97.38% compared to head (72b5b2e) 97.38%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6239   +/-   ##
=======================================
  Coverage   97.38%   97.38%           
=======================================
  Files        1116     1116           
  Lines       96110    96118    +8     
=======================================
+ Hits        93594    93603    +9     
+ Misses       2516     2515    -1     
Files Changed Coverage Δ
dev_tools/notebooks/isolated_notebook_test.py 64.61% <50.00%> (-0.47%) ⬇️
dev_tools/packaging/isolated_packages_test.py 60.00% <50.00%> (-1.12%) ⬇️
cirq-core/cirq/vis/heatmap_test.py 97.53% <100.00%> (-0.48%) ⬇️
dev_tools/cloned_env_test.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nafaynajam
Copy link
Copy Markdown
Contributor

nafaynajam commented Aug 15, 2023

@pavoljuhas I see that you have mentioned me in this issue, could you elaborate how I may be of help?, I see commits in code coverage, is it just to notify me of the changes in it?.

@pavoljuhas
Copy link
Copy Markdown
Collaborator Author

@pavoljuhas I see that you have mentioned me in this issue, could you elaborate how I may be of help?

Hi Nafay, this PR is to address the error on running check/pytest you asked about last Friday.
It makes the script terminate early with an informative error message rather than fail later on.

No action is needed, the cc is to let you know about the fix.
That said feel free to check the PR and post comments/suggestions if any.

@nafaynajam
Copy link
Copy Markdown
Contributor

@pavoljuhas Very nice, thanks :-)

@pavoljuhas pavoljuhas enabled auto-merge (squash) August 18, 2023 17:35
@pavoljuhas pavoljuhas merged commit 6b44704 into quantumlib:master Aug 18, 2023
@pavoljuhas pavoljuhas deleted the check-if-python-runs-python3 branch August 29, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: S 10< lines changed <50

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants