-
-
Notifications
You must be signed in to change notification settings - Fork 496
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
Test scikit.odes installation nightly #2973
Test scikit.odes installation nightly #2973
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## develop #2973 +/- ##
=========================================
Coverage 99.71% 99.71%
=========================================
Files 273 245 -28
Lines 19002 18705 -297
=========================================
- Hits 18947 18651 -296
+ Misses 55 54 -1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @arjxn-py!
Could you check if this test works by failing the workflows intentionally once? Maybe you can revert back SUNDIALS to an older version in install_odes.py
and check if the workflow fails on your fork (workflow_dispatch
is enabled; hence, you might see a run workflow button after selecting this workflow in the Actions tab of your fork).
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
Co-authored-by: Saransh Chopra <saransh0701@gmail.com>
I have tried doing that @Saransh-cpp in the |
@arjxn-py you should trigger the workflow on the Something like this - |
Apologies for the confusion, now doing as you suggested. |
@Saransh-cpp here are the test results |
I see the tests are failing, but not how we thought they would haha. Remember, the workflows use
because pybamm was never installed in the base environment. Why don't we do something like this - saransh@Saranshs-MacBook-Air PyBaMM % git diff
diff --git a/.github/workflows/run_periodic_tests.yml b/.github/workflows/run_periodic_tests.yml
diff --git a/.github/workflows/run_periodic_tests.yml b/.github/workflows/run_periodic_tests.yml
index 39ad33c05..cf73f4398 100644
--- a/.github/workflows/run_periodic_tests.yml
+++ b/.github/workflows/run_periodic_tests.yml
@@ -124,3 +124,7 @@ jobs:
- name: Install dev dependencies and run example tests
if: matrix.os == 'ubuntu-latest'
run: tox -e examples
+
+ - name: Install scikits.odes and test pybamm_install_odes
+ if: matrix.os == 'ubuntu-latest'
+ run: tox -e odes
diff --git a/tox.ini b/tox.ini
index 784d15494..d145aae6a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -23,6 +23,7 @@ deps =
commands =
tests-!windows-!mac: sh -c "pybamm_install_jax" # install jax, jaxlib for ubuntu
unit-!windows-!mac: sh -c "pybamm_install_jax" # install jax, jaxlib for ubuntu
+ odes-!windows-!mac: sh -c "pybamm_install_odes" # test install_odes.py
tests: python run-tests.py --all
unit: python run-tests.py --unit This should theoretically work. |
Thanks, it was much helpful. |
@Saransh-cpp I believe that the tests ran as expected this time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still does not work. Remember, we are trying to reproduce a very particular error, and not any error. The error that the CI throws right now is an actual error in this PR -
odes run-test-pre: PYTHONHASHSEED='840055894'
odes run-test: commands[0] | sh -c pybamm_install_odes
/home/runner/work/PyBaMM/PyBaMM/pybamm/scikits_odes_setup.log
Traceback (most recent call last):
File "/home/runner/work/PyBaMM/PyBaMM/.tox/odes/bin/pybamm_install_odes", line 33, in <module>
sys.exit(load_entry_point('pybamm', 'console_scripts', 'pybamm_install_odes')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/PyBaMM/PyBaMM/pybamm/install_odes.py", line 130, in main
default_install_dir = os.path.join(os.getenv("HOME"), ".local")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen posixpath>", line 76, in join
TypeError: expected str, bytes or os.PathLike object, not NoneType
ERROR: InvocationError for command /usr/bin/sh -c pybamm_install_odes (exited with code 1)
___________________________________ summary ____________________________________
ERROR: odes: commands failed
The script cannot find the HOME
env variable. You might have to pass it manually in the tox
environment,
a028241
to
bb8e161
Compare
@Saransh-cpp i've passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @arjxn-py! Working much better now. One last thing -
GH Actions is still installing scikits.odes
through cache -
Collecting scikits.odes
Using cached scikits.odes-2.7.0-cp310-cp310-linux_x86_64.whl
Requirement already satisfied: scipy in ./.tox/odes/lib/python3.10/site-packages (from scikits.odes) (1.10.1)
Requirement already satisfied: numpy<1.27.0,>=1.19.5 in ./.tox/odes/lib/python3.10/site-packages (from scipy->scikits.odes) (1.24.3)
Installing collected packages: scikits.odes
Successfully installed scikits.odes-2.7.0
I think removing the cache before executing pybamm_install_odes
with -
pip cache remove scikits.odes
should work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error is a good sign. Remember we decided to revert SUNDIALS version to check if the script fails and it did fail. We do have one last problem. The script does not return the correct error code even after failing, making the GH Actions pass, which should be failing. There was a similar issue with install_KLU_sundials.py
, see #2971 for a quick fix.
Could this be related to the error we have in the publish workflow? @Saransh-cpp |
@brosaplanella I've pushed fixes for macos and ubuntu here - https://github.com/pybamm-team/PyBaMM/tree/release-fix - with the workflow running here - https://github.com/pybamm-team/PyBaMM/actions/runs/5122444804 The macos fix works for me locally. Taking a look at the ubuntu and the windows fix. |
Thanks @Saransh-cpp, I had gone through #2971 & made some changes in accordance to it now i'm getting quite obvious failing logs, are these the one we expecting?
|
@arjxn-py can you link the latest scheduled run on your fork? |
Sure @Saransh-cpp, here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for working on this patiently, @arjxn-py!
Thanks @Saransh-cpp, you're a big help. |
Description
run_periodic_tests.yml
will now run test forpybamm_install_odes
on GNU/LinuxFixes #2962
Type of change
Key checklist:
$ pre-commit run
(see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)$ python run-tests.py --all
$ python run-tests.py --doctest
You can run unit and doctests together at once, using
$ python run-tests.py --quick
.Further checks: