Skip to content

Commit c89e190

Browse files
committed
Merge branch 'develop' of github.com:kratman/PyBaMM into feat/removeIDAKLU
2 parents 90ee509 + 4223be8 commit c89e190

File tree

20 files changed

+452
-19
lines changed

20 files changed

+452
-19
lines changed

.github/workflows/lychee_url_checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828

2929
# use stable version for now to avoid breaking changes
3030
- name: Lychee URL checker
31-
uses: lycheeverse/lychee-action@v2.0.2
31+
uses: lycheeverse/lychee-action@v2.1.0
3232
with:
3333
# arguments with file types to check
3434
args: >-

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,6 @@ jobs:
6868
# Upload the results to GitHub's code scanning dashboard (optional).
6969
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7070
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
71+
uses: github/codeql-action/upload-sarif@4f3212b61783c3c68e8309a0f18a699764811cda # v3.27.1
7272
with:
7373
sarif_file: results.sarif

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ input/*
4646

4747
# simulation outputs
4848
out/
49-
config.py
5049
matplotlibrc
5150
*.pickle
5251
*.sav

.lycheeignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/fundamentals/pybam
1515

1616
# Errors in docs/source/user_guide/index.md
1717
file:///home/runner/work/PyBaMM/PyBaMM/docs/source/user_guide/api_docs
18+
19+
# Telemetry
20+
https://us.i.posthog.com

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ci:
44

55
repos:
66
- repo: https://github.com/astral-sh/ruff-pre-commit
7-
rev: "v0.7.2"
7+
rev: "v0.7.3"
88
hooks:
99
- id: ruff
1010
args: [--fix, --show-fixes]

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

33
## Features
44

5+
- Added `CoupledVariable` which provides a placeholder variable whose equation can be elsewhere in the model. ([#4556](https://github.com/pybamm-team/PyBaMM/pull/4556))
56
- Adds support to `pybamm.Experiment` for the `output_variables` option in the `IDAKLUSolver`. ([#4534](https://github.com/pybamm-team/PyBaMM/pull/4534))
67
- Adds an option "voltage as a state" that can be "false" (default) or "true". If "true" adds an explicit algebraic equation for the voltage. ([#4507](https://github.com/pybamm-team/PyBaMM/pull/4507))
78
- Improved `QuickPlot` accuracy for simulations with Hermite interpolation. ([#4483](https://github.com/pybamm-team/PyBaMM/pull/4483))
89
- Added Hermite interpolation to the (`IDAKLUSolver`) that improves the accuracy and performance of post-processing variables. ([#4464](https://github.com/pybamm-team/PyBaMM/pull/4464))
10+
- Added basic telemetry to record which functions are being run. See [Telemetry section in the User Guide](https://docs.pybamm.org/en/latest/source/user_guide/index.html#telemetry) for more information. ([#4441](https://github.com/pybamm-team/PyBaMM/pull/4441))
911
- Added `BasicDFN` model for sodium-ion batteries ([#4451](https://github.com/pybamm-team/PyBaMM/pull/4451))
1012
- Added sensitivity calculation support for `pybamm.Simulation` and `pybamm.Experiment` ([#4415](https://github.com/pybamm-team/PyBaMM/pull/4415))
1113
- Added OpenMP parallelization to IDAKLU solver for lists of input parameters ([#4449](https://github.com/pybamm-team/PyBaMM/pull/4449))
12-
- Added phase-dependent particle options to LAM
13-
([#4369](https://github.com/pybamm-team/PyBaMM/pull/4369))
14+
- Added phase-dependent particle options to LAM ([#4369](https://github.com/pybamm-team/PyBaMM/pull/4369))
1415
- Added a lithium ion equivalent circuit model with split open circuit voltages for each electrode (`SplitOCVR`). ([#4330](https://github.com/pybamm-team/PyBaMM/pull/4330))
1516
- Added the `pybamm.DiscreteTimeSum` expression node to sum an expression over a sequence of data times, and accompanying `pybamm.DiscreteTimeData` class to store the data times and values ([#4501](https://github.com/pybamm-team/PyBaMM/pull/4501))
1617

@@ -21,6 +22,8 @@
2122
- Removed the `start_step_offset` setting and disabled minimum `dt` warnings for drive cycles with the (`IDAKLUSolver`). ([#4416](https://github.com/pybamm-team/PyBaMM/pull/4416))
2223

2324
## Bug Fixes
25+
- Added error for binary operators on two concatenations with different numbers of children. Previously, the extra children were dropped. Also fixed bug where Q_rxn was dropped from the total heating term in half-cell models. ([#4562](https://github.com/pybamm-team/PyBaMM/pull/4562))
26+
- Fixed bug where Q_rxn was set to 0 for the negative electrode in half-cell models. ([#4557](https://github.com/pybamm-team/PyBaMM/pull/4557))
2427
- Fixed bug in post-processing solutions with infeasible experiments using the (`IDAKLUSolver`). ([#4541](https://github.com/pybamm-team/PyBaMM/pull/4541))
2528
- Disabled IREE on MacOS due to compatibility issues and added the CasADI
2629
path to the environment to resolve issues on MacOS and Linux. Windows

conftest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,8 @@ def set_random_seed():
5151
@pytest.fixture(autouse=True)
5252
def set_debug_value():
5353
pybamm.settings.debug_mode = True
54+
55+
56+
@pytest.fixture(autouse=True)
57+
def disable_telemetry():
58+
pybamm.telemetry.disable()

docs/source/user_guide/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,12 @@ glob:
7373
../examples/notebooks/creating_models/5-half-cell-model.ipynb
7474
../examples/notebooks/creating_models/6-a-simple-SEI-model.ipynb
7575
```
76+
77+
# Telemetry
78+
79+
PyBaMM optionally collects anonymous usage data to help improve the library. This telemetry is opt-in and can be easily disabled. Here's what you need to know:
80+
81+
- **What is collected**: Basic usage information like PyBaMM version, Python version, and which functions are run.
82+
- **Why**: To understand how PyBaMM is used and prioritize development efforts.
83+
- **Opt-out**: To disable telemetry, set the environment variable `PYBAMM_DISABLE_TELEMETRY=true` (or any value other than `false`) or use `pybamm.telemetry.disable()` in your code.
84+
- **Privacy**: No personal information (name, email, etc) or sensitive information (parameter values, simulation results, etc) is ever collected.

docs/source/user_guide/installation/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ Package Minimum supp
7171
`typing-extensions <https://pypi.org/project/typing-extensions/>`__ 4.10.0
7272
`pandas <https://pypi.org/project/pandas/>`__ 1.5.0
7373
`pooch <https://www.fatiando.org/pooch/>`__ 1.8.1
74+
`posthog <https://posthog.com/>`__ 3.6.5
7475
=================================================================== ==========================
7576

7677
.. _install.optional_dependencies:

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,17 @@ classifiers = [
2929
"Topic :: Scientific/Engineering",
3030
]
3131
dependencies = [
32+
"pybammsolvers",
3233
"numpy>=1.23.5,<2.0.0",
3334
"scipy>=1.11.4",
34-
"casadi>=3.6.6",
35+
"casadi>=3.6.7",
3536
"xarray>=2022.6.0",
3637
"anytree>=2.8.0",
3738
"sympy>=1.12",
3839
"typing-extensions>=4.10.0",
3940
"pandas>=1.5.0",
4041
"pooch>=1.8.1",
41-
"pybammsolvers",
42+
"posthog",
4243
]
4344

4445
[project.urls]

0 commit comments

Comments
 (0)