fix(ci): fix Windows and macOS ngspice installation in GitHub Actions#242
fix(ci): fix Windows and macOS ngspice installation in GitHub Actions#242
Conversation
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
xarthurx
left a comment
There was a problem hiding this comment.
Windows test still failed. Also make sure linting is correct
Two separate failures were fixed in commit
Linting already passed in the previous run; all ruff/mypy/CodeQL checks continue to pass with these changes. |
xarthurx
left a comment
There was a problem hiding this comment.
One check: "pre-commit / conventional-commits (pull_request)"
still failed. fix it.
|
@g-braeunlich Could you take over this PR? |
The two bad commits ( The actual code changes are correct (all ruff/mypy/CodeQL checks pass). To get the conventional-commits check to pass, the simplest fix is to squash-merge this PR on the GitHub side — GitHub's squash-merge feature lets you set a single clean commit message that satisfies the linter. Alternatively, a force-push of a clean 3-commit history would also work. |
|
Why all that empty "initial plan" commits? |
Should be ready to merge based on this explanation. |
|
The
|
See. |
33261b7 to
ba3ebd4
Compare
|
I did a force push with a suggestion on how I would organize the changes into commits. |
g-braeunlich
left a comment
There was a problem hiding this comment.
Windows still does not seem to be able to find the executable
xarthurx
left a comment
There was a problem hiding this comment.
FAILED tests/test_problem_implementations.py::test_python_problem_impl[PowerElectronics] - FileNotFoundError: ngspice.exe not found. You can install it via Chocolatey (choco install ngspice) or download it from https://sourceforge.net/projects/ngspice/files/ng-spice-rework/. You can also see our GitHub Actions workflow (test.yml) for how to automatically install it.
Still failing the windows test.
Fixed in Replaced |
xarthurx
left a comment
There was a problem hiding this comment.
windows now can use ngspice, but always the test show:
C:\hostedtoolcache\windows\Python\3.13.12\x64\Lib\site-packages\gymnasium\spaces\box.py:306
C:\hostedtoolcache\windows\Python\3.13.12\x64\Lib\site-packages\gymnasium\spaces\box.py:306: UserWarning: WARN: Box high's precision lowered by casting to float32, current high.dtype=float64
gym.logger.warn(
tests/test_airfoil.py: 11 warnings
D:\a\EngiBench\EngiBench\engibench\problems\airfoil\v0.py:65: DeprecationWarning: Arrays of 2-dimensional vectors are deprecated. Use arrays of 3-dimensional vectors instead. (deprecated in NumPy 2.0)
x = np.cross(dp, dq)
tests/test_airfoil.py: 11 warnings
D:\a\EngiBench\EngiBench\engibench\problems\airfoil\v0.py:67: DeprecationWarning: Arrays of 2-dimensional vectors are deprecated. Use arrays of 3-dimensional vectors instead. (deprecated in NumPy 2.0)
t = np.cross(q[~parallel] - p, dq[~parallel]) / x[~parallel]
tests/test_airfoil.py: 11 warnings
D:\a\EngiBench\EngiBench\engibench\problems\airfoil\v0.py:68: DeprecationWarning: Arrays of 2-dimensional vectors are deprecated. Use arrays of 3-dimensional vectors instead. (deprecated in NumPy 2.0)
s = np.cross(q[~parallel] - p, dp) / x[~parallel]
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
C:\hostedtoolcache\windows\Python\3.13.12\x64\Lib\threading.py:1095: KeyboardInterrupt
(to show a full traceback on KeyboardInterrupt use --full-trace)
=========== 30 passed, 3 skipped, 37 warnings in 1692.41s (0:28:12) ===========
Error: The operation was canceled.
Investigate why and fix it.
Fixed in |
|
@g-braeunlich I'll leave it to you to fix. |
|
OK. I ll try to revert to the old version |
…ice executable
- ngspice.py: add shutil.which("ngspice") to Windows path search so ngspice
installed via Chocolatey (in PATH) is found automatically; also simplify the
path resolution logic and update the error message
- Make Windows version detection in ngspice.py more robust by falling back to
--version subprocess if docs folder PDF is not found
65a0445 to
9bae90e
Compare
|
I replaced all commits relating to the windows setup with a single commit just changing the version to 26.2 again.
|
@g-braeunlich No, I dont think so. To the best of my knowledge, NGSPICE is only used in Power Electronics. This was failing before that commit. |
|
@mkeeler43 The test in this case is about thermoelastic2d and not for ngspice / powerelectronic |
Yes I know @g-braeunlich, but ngspice is what is causing problems and has nothing to do with thermoelastic2d. Zhao and Gabe mentioned this issue before this commit was made. (Edit) Oh sorry I see you mean the "volume_fraction" issue not the other issue. Yes I think Gabe must have renamed this in the new dataset. @gapaza |
|
@mkeeler43 What do we do about the macos error? |
|
Sorry, regarding the macos error, I actually ment @xarthurx |
@g-braeunlich I think the problem with the thermoelastic data was not caught because the dataset was changed after the commit on huggingface. This commit/merge was made and then @gapaza changed the name of some dataset columns on a dataset reupload to huggingface. It will be resolved. |
FileNotFoundError– fixed with MSYS2 pacman (commit88073ef)timeout-minuteslimit.github/workflows/test.yml: increasetimeout-minutesforwindows-testfrom 30 → 60Original prompt