Skip to content

Commit 18aac33

Browse files
Merge branch 'develop' into patch-2
2 parents 5272b4c + 7ff45ec commit 18aac33

File tree

190 files changed

+710
-712
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+710
-712
lines changed

.all-contributorsrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,9 @@
579579
"avatar_url": "https://avatars.githubusercontent.com/u/83979298?v=4",
580580
"profile": "https://github.com/jeromtom",
581581
"contributions": [
582-
"doc"
582+
"doc",
583+
"code",
584+
"test"
583585
]
584586
},
585587
{
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Check URLs with Lychee
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
schedule:
10+
# Run everyday at 3 am UTC
11+
- cron: "0 3 * * *"
12+
13+
jobs:
14+
linkChecker:
15+
runs-on: ubuntu-latest
16+
steps:
17+
18+
# cache Lychee results to avoid hitting rate limits
19+
- name: Restore lychee cache
20+
uses: actions/cache@v3
21+
with:
22+
path: .lycheecache
23+
key: cache-lychee-${{ github.sha }}
24+
restore-keys: cache-lychee-
25+
26+
# check URLs with Lychee
27+
- uses: actions/checkout@v3
28+
29+
# use stable version for now to avoid breaking changes
30+
- name: Lychee URL checker
31+
uses: lycheeverse/[email protected]
32+
with:
33+
# arguments with file types to check
34+
args: >-
35+
--cache
36+
--no-progress
37+
--max-cache-age 2d
38+
--timeout 10
39+
--max-retries 5
40+
--skip-missing
41+
--exclude-loopback
42+
--exclude https://twitter.com/pybamm_
43+
--exclude "https://doi\.org|www.sciencedirect\.com/*"
44+
--accept 200,429
45+
--exclude-path ./CHANGELOG.md
46+
--exclude-path ./scripts/update_version.py
47+
'./**/*.rst'
48+
'./**/*.md'
49+
'./**/*.py'
50+
'./**/*.ipynb'
51+
# fail the action on broken links
52+
fail: true
53+
env:
54+
# to be used in case rate limits are surpassed
55+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/url_checker.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ dist/
6262
coverage.xml
6363
htmlcov/
6464

65-
# virtual enviroment
65+
# virtual environment
6666
env/
6767
venv/
6868
venv3.5/
@@ -74,6 +74,7 @@ lib64
7474
share/
7575
pyvenv.cfg
7676
.vscode
77+
.ruff_cache/
7778

7879
# sundials
7980
sundials

.lycheeignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# a list of links/files to be ignored by lychee link checker (see workflow file)
2+
3+
# Errors in docs/source/user_guide/getting_started.md
4+
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/api_docs
5+
6+
# Errors in docs/source/user_guide/fundamentals/index.md
7+
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/fundamentals/base_battery_model
8+
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/fundamentals/parameter_sets
9+
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/fundamentals/quick_plot
10+
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/fundamentals/plot_voltage_components
11+
12+
# Errors in docs/source/user_guide/index.md
13+
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/api_docs
14+
15+
# Errors in examples/notebooks/README.md
16+
file:///home/runner/work/PyBaMM/PyBaMM/examples/notebooks/using-submodels.ipynb
17+
file:///home/runner/work/PyBaMM/PyBaMM/examples/notebooks/create-model.ipynb

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
- id: black
1010

1111
- repo: https://github.com/charliermarsh/ruff-pre-commit
12-
rev: "v0.0.253"
12+
rev: "v0.0.255"
1313
hooks:
1414
- id: ruff
1515
args: [--ignore=E741, --exclude=__init__.py]

CHANGELOG.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,38 @@
22

33
## Features
44

5-
- Renamed "Terminal voltage [V]" to just "Voltage [V]". "Terminal voltage [V]" can still be used and will return the same value as "Voltage [V]".
5+
- Renamed "Terminal voltage [V]" to just "Voltage [V]". "Terminal voltage [V]" can still be used and will return the same value as "Voltage [V]". ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
66
- Added "Negative electrode surface potential difference at separator interface [V]", which is the value of the surface potential difference (`phi_s - phi_e`) at the anode/separator interface, commonly controlled in fast-charging algorithms to avoid plating. Also added "Positive electrode surface potential difference at separator interface [V]". ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
77
- Added "Open-circuit voltage [V]", which is the open-circuit voltage as calculated from the bulk particle concentrations. The old variable "Measured open circuit voltage [V]", which referred to the open-circuit potential as calculated from the surface particle concentrations, has been renamed to "Surface open-circuit voltage [V]". ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
88
- Added an example for `plot_voltage_components`, explaining what the different voltage components are. ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
9+
- Added method to calculate maximum theoretical energy. ([#2777](https://github.com/pybamm-team/PyBaMM/pull/2777)) and add to summary variables ([#2781](https://github.com/pybamm-team/PyBaMM/pull/2781))
910

1011
## Bug fixes
1112

13+
- Fixed electrolyte conservation in the case of concentration-dependent transference number ([#2758](https://github.com/pybamm-team/PyBaMM/pull/2758))
1214
- Fixed `plot_voltage_components` so that the sum of overpotentials is now equal to the voltage ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
1315

16+
## Optimizations
17+
18+
- Migrated to [Lychee](https://github.com/lycheeverse/lychee-action) workflow for checking URLs ([#2734](https://github.com/pybamm-team/PyBaMM/pull/2734))
19+
1420
## Breaking changes
1521

22+
- `ElectrodeSOH.solve` now returns a `{str: float}` dict instead of a `pybamm.Solution` object (to avoid having to do `.data[0]` every time). In any code that uses `sol = ElectrodeSOH.solve()`, `sol[key].data[0]` should be replaced with `sol[key]`. ([#2779](https://github.com/pybamm-team/PyBaMM/pull/2779))
23+
- Removed "... cation signed stoichiometry" and "... electrons in reaction" parameters, they are now hardcoded. ([#2778](https://github.com/pybamm-team/PyBaMM/pull/2778))
24+
- When using `solver.step()`, the first time point in the step is shifted by `pybamm.settings.step_start_offset` (default 1 ns) to avoid having duplicate times in the solution steps from the end of one step and the start of the next. ([#2773](https://github.com/pybamm-team/PyBaMM/pull/2773))
1625
- Renamed "Measured open circuit voltage [V]" to "Surface open-circuit voltage [V]". This variable was calculated from surface particle concentrations, and hence "hid" the overpotential from particle gradients. The new variable "Open-circuit voltage [V]" is calculated from bulk particle concentrations instead. ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
1726
- Renamed all references to "open circuit" to be "open-circuit" instead. ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
27+
- Renamed parameter "1 + dlnf/dlnc" to "Thermodynamic factor". ([#2727](https://github.com/pybamm-team/PyBaMM/pull/2727))
1828
- All PyBaMM models are now dimensional. This has been benchmarked against dimensionless models and found to give around the same solve time. Implementing dimensional models greatly reduces the barrier to entry for adding new models. However, this comes with several breaking changes: (i) the `timescale` and `length_scales` attributes of a model have been removed (they are no longer needed) (ii) several dimensionless variables are no longer defined, but the corresponding dimensional variables can still be accessed by adding the units to the name (iii) some parameters used only for non-dimensionalization, such as "Typical current [A]", have been removed ([#2419](https://github.com/pybamm-team/PyBaMM/pull/2419))
1929

2030
# [v23.2](https://github.com/pybamm-team/PyBaMM/tree/v23.2) - 2023-02-28
2131

2232
## Features
2333

24-
- Added an option for using a banded jacobian and sundials banded solvers for the IDAKLU solve [#2677](https://github.com/pybamm-team/PyBaMM/pull/2677)
25-
- The "particle size" option can now be a tuple to allow different behaviour in each electrode([#2672](https://github.com/pybamm-team/PyBaMM/pull/2672)).
26-
- Added temperature control to experiment class. [#2518](https://github.com/pybamm-team/PyBaMM/pull/2518)
34+
- Added an option for using a banded jacobian and sundials banded solvers for the IDAKLU solve ([#2677](https://github.com/pybamm-team/PyBaMM/pull/2677))
35+
- The "particle size" option can now be a tuple to allow different behaviour in each electrode ([#2672](https://github.com/pybamm-team/PyBaMM/pull/2672)).
36+
- Added temperature control to experiment class. ([#2518](https://github.com/pybamm-team/PyBaMM/pull/2518))
2737

2838
## Bug fixes
2939

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ Editable notebooks are made available using [Google Colab](https://colab.researc
400400
GitHub does some magic with particular filenames. In particular:
401401

402402
- The first page people see when they go to [our GitHub page](https://github.com/pybamm-team/PyBaMM) displays the contents of [README.md](README.md), which is written in the [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) format. Some guidelines can be found [here](https://help.github.com/articles/about-readmes/).
403-
- The license for using PyBaMM is stored in [LICENSE](LICENSE), and [automatically](https://help.github.com/articles/adding-a-license-to-a-repository/) linked to by GitHub.
403+
- The license for using PyBaMM is stored in [LICENSE](LICENSE.txt), and [automatically](https://help.github.com/articles/adding-a-license-to-a-repository/) linked to by GitHub.
404404
- This file, [CONTRIBUTING.md](CONTRIBUTING.md) is recognised as the contribution guidelines and a link is [automatically](https://github.com/blog/1184-contributing-guidelines) displayed when new issues or pull requests are created.
405405

406406
## Acknowledgements

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
247247
<tr>
248248
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ayeankit"><img src="https://avatars.githubusercontent.com/u/72691866?v=4?s=100" width="100px;" alt="Ankit Kumar"/><br /><sub><b>Ankit Kumar</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/commits?author=ayeankit" title="Code">💻</a></td>
249249
<td align="center" valign="top" width="14.28%"><a href="https://aniketsinghrawat.vercel.app/"><img src="https://avatars.githubusercontent.com/u/31622972?v=4?s=100" width="100px;" alt="Aniket Singh Rawat"/><br /><sub><b>Aniket Singh Rawat</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/commits?author=dikwickley" title="Code">💻</a></td>
250-
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jeromtom"><img src="https://avatars.githubusercontent.com/u/83979298?v=4?s=100" width="100px;" alt="Jerom Palimattom Tom"/><br /><sub><b>Jerom Palimattom Tom</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/commits?author=jeromtom" title="Documentation">📖</a></td>
250+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jeromtom"><img src="https://avatars.githubusercontent.com/u/83979298?v=4?s=100" width="100px;" alt="Jerom Palimattom Tom"/><br /><sub><b>Jerom Palimattom Tom</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/commits?author=jeromtom" title="Documentation">📖</a> <a href="https://github.com/pybamm-team/PyBaMM/commits?author=jeromtom" title="Code">💻</a> <a href="https://github.com/pybamm-team/PyBaMM/commits?author=jeromtom" title="Tests">⚠️</a></td>
251251
<td align="center" valign="top" width="14.28%"><a href="http://bradyplanden.github.io"><img src="https://avatars.githubusercontent.com/u/55357039?v=4?s=100" width="100px;" alt="Brady Planden"/><br /><sub><b>Brady Planden</b></sub></a><br /><a href="#example-BradyPlanden" title="Examples">💡</a></td>
252252
</tr>
253253
</tbody>

docs/conf.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"sphinx_design",
5151
"sphinx_copybutton",
5252
"myst_parser",
53+
"sphinx_extend_parent",
5354
]
5455

5556

@@ -135,12 +136,14 @@
135136
"url": "https://github.com/pybamm-team/PyBaMM/tree/develop/CONTRIBUTING.md",
136137
},
137138
],
138-
# Add light/dark mode and documentation version switcher:
139-
# "navbar_end": ["theme-switcher", "version-switcher", "navbar-icon-links"],
140-
# "switcher": {
141-
# "version_match": switcher_version,
142-
# "json_url": "https://numpy.org/doc/_static/versions.json",
143-
# },
139+
"switcher": {
140+
"version_match": release,
141+
"json_url": "https://pybamm.readthedocs.io/en/latest/_static/versions.json", # noqa: E501
142+
},
143+
# turn to False to not fail build if json_url is not found
144+
"check_switcher": True,
145+
# for dark mode toggle, version switcher, and social media links
146+
"navbar_end": ["theme-switcher", "version-switcher", "navbar-icon-links"],
144147
"use_edit_page_button": True,
145148
}
146149

0 commit comments

Comments
 (0)