Skip to content
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

fix: pybamm.have_julia is True when PyCall.jl uninstalled #2402

Merged
merged 5 commits into from
Oct 26, 2022
Merged

fix: pybamm.have_julia is True when PyCall.jl uninstalled #2402

merged 5 commits into from
Oct 26, 2022

Conversation

awadell1
Copy link
Contributor

Currently pybamm.have_julia() returns True even if PyCall.jl is not configured this results in test failures as the tests assume they can call:

from julia.api import Julia
Julia()

Which fails if Julia has not been configured. This commit fixes that.

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • [] No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

awadell1 and others added 4 commits October 25, 2022 11:35
Currently `pybamm.have_julia()` returns True even if PyCall.jl is not configured
this results in test failures as the tests assume they can call:

```python
from julia.api import Julia
Julia()
```

Which fails if Julia has not actually been configured. This commit fixes that
Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will probably need to update this soon / coordinate with @abillscmu as we switch to pythoncall

@aabills
Copy link
Contributor

aabills commented Oct 25, 2022

I'll add a test but this should be obsolete when #2363 is merged.

@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Base: 99.66% // Head: 99.72% // Increases project coverage by +0.05% 🎉

Coverage data is based on head (5f50b93) compared to base (c9e2aca).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 5f50b93 differs from pull request most recent head d421be3. Consider uploading reports for the commit d421be3 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2402      +/-   ##
===========================================
+ Coverage    99.66%   99.72%   +0.05%     
===========================================
  Files          269      268       -1     
  Lines        20190    20153      -37     
===========================================
- Hits         20123    20097      -26     
+ Misses          67       56      -11     
Impacted Files Coverage Δ
pybamm/util.py 100.00% <100.00%> (ø)
pybamm/citations.py 100.00% <0.00%> (ø)
pybamm/parameters/parameter_sets.py 100.00% <0.00%> (ø)
pybamm/parameters/parameter_values.py 100.00% <0.00%> (ø)
pybamm/input/parameters/lithium_ion/Ai2020.py 100.00% <0.00%> (ø)
pybamm/input/parameters/lithium_ion/Xu2019.py 100.00% <0.00%> (ø)
pybamm/input/parameters/lead_acid/Sulzer2019.py 100.00% <0.00%> (ø)
pybamm/input/parameters/lithium_ion/Chen2020.py 100.00% <0.00%> (ø)
pybamm/input/parameters/lithium_ion/Ecker2015.py 100.00% <0.00%> (ø)
pybamm/input/parameters/lithium_ion/OKane2022.py 100.00% <0.00%> (ø)
... and 7 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Per conv with @tinosulzer have exempted missed branches from
coverage reporting
@valentinsulzer valentinsulzer merged commit 8a520e7 into pybamm-team:develop Oct 26, 2022
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.

3 participants