PyBaMM
PyBaMM copied to clipboard
pybamm.JaxSolver docstring improvement
Description
pybamm.JaxSolver. Arg method is optional. Link to jax.experimental.odeint and format as code. For method=‘BDF’ option summarise method used (use docstrings in jax_bdf_integrate.py) or simply link to the docstrings in jax_bdf_integrate.py
Fixes # (issue) API Docs - Small fixes suitable for first time contributors - pybamm.JaxSolver
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:
$ pre-commit run(or$ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code) - [ ] All tests pass:
$ python run-tests.py --all(or$ nox -s tests) - [ ] The documentation builds:
$ python run-tests.py --doctest(or$ nox -s doctests)
You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).
Further checks:
- [ ] Code is commented, particularly in hard-to-understand areas
- [ ] Tests added that prove fix is effective or that feature works
Hi, @buddhiwisr, a suggestion: could you also link to JAX's intersphinx inventory in the intersphinx_mapping dictionary in docs/conf.py? It will enable external links for the JAX documentation where jax.experimental.odeint is referenced. I think it should be "jax": ("https://jax.readthedocs.io/en/latest", None).
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.58%. Comparing base (
a553fe6) to head (4b8858c). Report is 3 commits behind head on develop.
:exclamation: Current head 4b8858c differs from pull request most recent head 6a15163
Please upload reports for the commit 6a15163 to get more accurate results.
Additional details and impacted files
@@ Coverage Diff @@
## develop #3994 +/- ##
===========================================
+ Coverage 99.55% 99.58% +0.03%
===========================================
Files 288 257 -31
Lines 21789 21249 -540
===========================================
- Hits 21692 21161 -531
+ Misses 97 88 -9
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@buddhiwisr Are you still on it?
@arjxn-py I am not working on it anymore, afraid.
Would you like to pick it up from here, @arjxn-py? Though the hackathon has passed, I think these contributions will still be useful
Would you like to pick it up from here, @arjxn-py? Though the hackathon has passed, I think these contributions will still be useful
Sure, I'd be happy to
Docs look correct now, but the example notebooks are failing. This passed right before this, so I am going to try just retriggering it
Looks like doctests are failing because of ade96fa
Looks like doctests are failing because of
ade96fa
Makes sense. Jax doesn't provide mappings for stable because it doesn't have multi-versioned docs, it just deploys the latest version. Feel free to revert the change
pipx run sphobjinv suggest -t 90 -u https://jax.readthedocs.io/en/latest/ odeint suggests that there is no odeint symbol in the Jax codebase, which is why no clickable link shows up. We'll probably need to update the docstring.
pipx run sphobjinv suggest -t 90 -u https://jax.readthedocs.io/en/latest/ odeintsuggests that there is noodeintsymbol in the Jax codebase, which is why no clickable link shows up. We'll probably need to update the docstring.
Just giving the function name instead of direct linking should work, not the perfect solution but better than spending much time on something minor
cc: @kratman