Skip to content

Commit

Permalink
Merge branch 'develop' into random-seed-for-simulations
Browse files Browse the repository at this point in the history
  • Loading branch information
agriyakhetarpal authored Nov 2, 2023
2 parents e8cf8dc + d37a8f2 commit 2b86a0a
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
12 changes: 3 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.1"
rev: "v0.1.3"
hooks:
- id: ruff
args: [--fix, --ignore=E741, --exclude=__init__.py]

- repo: https://github.com/nbQA-dev/nbQA
rev: 1.7.0
hooks:
- id: nbqa-ruff
additional_dependencies: [ruff==0.0.284]
args: ["--fix","--ignore=E501,E402"]
args: [--fix, --show-fixes]
types_or: [python, pyi, jupyter]

- repo: https://github.com/adamchainz/blacken-docs
rev: "1.16.0"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Bug fixes

- Fixed a bug where simulations using the CasADi-based solvers would fail randomly with the half-cell model ([#3494](https://github.com/pybamm-team/PyBaMM/pull/3494))
- Fixed a bug where the JaxSolver would fails when using GPU support with no input parameters ([#3423](https://github.com/pybamm-team/PyBaMM/pull/3423))

# [v23.9rc0](https://github.com/pybamm-team/PyBaMM/tree/v23.9rc0) - 2023-10-31

Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
"navbar_end": ["theme-switcher", "navbar-icon-links"],
# add Algolia to the persistent navbar, this removes the default search icon
"navbar_persistent": "algolia-searchbox",
"navigation_with_keys": False,
"use_edit_page_button": True,
"analytics": {
"plausible_analytics_domain": "docs.pybamm.org",
Expand Down
2 changes: 1 addition & 1 deletion pybamm/solvers/jax_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def _integrate(self, model, t_eval, inputs=None):

y = []
platform = jax.lib.xla_bridge.get_backend().platform.casefold()
if platform.startswith("cpu"):
if len(inputs) <= 1 or platform.startswith("cpu"):
# cpu execution runs faster when multithreaded
async def solve_model_for_inputs():
async def solve_model_async(inputs_v):
Expand Down
8 changes: 8 additions & 0 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extend-include = ["*.ipynb"]
extend-exclude = ["__init__.py"]

[lint]
ignore = ["E741"]

[lint.per-file-ignores]
"**.ipynb" = ["E402", "E703"]

0 comments on commit 2b86a0a

Please sign in to comment.