Skip to content

Commit 4318383

Browse files
Merge branch 'develop' into fix-submesh-equation
2 parents a4984e0 + c9e2a45 commit 4318383

File tree

329 files changed

+1820
-885
lines changed

Some content is hidden

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

329 files changed

+1820
-885
lines changed

.all-contributorsrc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,18 @@
550550
"avatar_url": "https://avatars.githubusercontent.com/u/112731474?v=4",
551551
"profile": "https://github.com/iatzak",
552552
"contributions": [
553-
"doc"
553+
"doc",
554+
"bug",
555+
"code"
556+
]
557+
},
558+
{
559+
"login": "ayeankit",
560+
"name": "Ankit Kumar",
561+
"avatar_url": "https://avatars.githubusercontent.com/u/72691866?v=4",
562+
"profile": "https://github.com/ayeankit",
563+
"contributions": [
564+
"code"
554565
]
555566
}
556567
],

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Please add a line in the relevant section of [CHANGELOG.md](https://github.com/p
1414

1515
# Key checklist:
1616

17-
- [ ] No style issues: `$ flake8`
17+
- [ ] No style issues: `$ pre-commit run`
1818
- [ ] All tests pass: `$ python run-tests.py --unit`
1919
- [ ] The documentation builds: `$ cd docs` and then `$ make clean; make html`
2020

.github/workflows/test_on_push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ jobs:
3636

3737
- name: Check style
3838
run: |
39-
python -m pip install "tox<4"
40-
tox -e flake8
39+
python -m pip install pre-commit
40+
pre-commit run ruff
4141
4242
build:
4343
needs: style

.github/workflows/url_checker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v3
1515
- name: URLs-checker
16-
uses: urlstechie/urlchecker-action@0.0.31
16+
uses: urlstechie/urlchecker-action@master
1717
with:
1818
# A comma-separated list of file types to cover in the URL checks
1919
file_types: .rst,.md,.py,.ipynb

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*.DS_Store
77
*.mat
88
*.csv
9+
*.hidden
910

1011
# don't ignore important .txt and .csv files
1112
!requirements*
@@ -61,9 +62,6 @@ dist/
6162
coverage.xml
6263
htmlcov/
6364

64-
# black setup file seems to make Travis CI fail
65-
pyproject.toml
66-
6765
# virtual enviroment
6866
env/
6967
venv/

.pre-commit-config.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ repos:
1010
exclude: assets/js/webapp\.js
1111

1212
- repo: https://github.com/psf/black
13-
rev: 22.12.0
13+
rev: 23.1.0
1414
hooks:
1515
- id: black
1616

17-
- repo: https://github.com/PyCQA/flake8
18-
rev: 6.0.0
17+
- repo: https://github.com/charliermarsh/ruff-pre-commit
18+
rev: "v0.0.246"
1919
hooks:
20-
- id: flake8
20+
- id: ruff
21+
args: [--ignore=E741, --exclude=__init__.py]

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,25 @@
22

33
## Features
44

5-
- Steps in `Experiment` can now be tagged and cycle numbers be searched based on those tags ([#2593](https://github.com/pybamm-team/PyBaMM/pull/2593)).
5+
- Added temperature control to experiment class. ([#2518])(https://github.com/pybamm-team/PyBaMM/pull/2518)
6+
- 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)).
7+
8+
## Bug fixes
9+
10+
- Fixed the length scaling for the first dimension of r-R plots ([#2663](https://github.com/pybamm-team/PyBaMM/pull/2663)).
11+
12+
# [v23.1](https://github.com/pybamm-team/PyBaMM/tree/v23.1) - 2023-01-31
13+
14+
## Features
15+
16+
- Changed linting from `flake8` to `ruff` ([#2630](https://github.com/pybamm-team/PyBaMM/pull/2630)).
17+
- Changed docs theme to pydata theme and start to improve docs in general ([#2618](https://github.com/pybamm-team/PyBaMM/pull/2618)).
618
- New `contact resistance` option, new parameter `Contact resistance [Ohm]` and new variable `Contact overpotential [V]` ([#2598](https://github.com/pybamm-team/PyBaMM/pull/2598)).
19+
- Steps in `Experiment` can now be tagged and cycle numbers be searched based on those tags ([#2593](https://github.com/pybamm-team/PyBaMM/pull/2593)).
720

821
## Bug fixes
922

23+
- Fixed a bug where the solid phase conductivity was double-corrected for tortuosity when loading parameters from a BPX file ([#2638](https://github.com/pybamm-team/PyBaMM/pull/2638)).
1024
- Changed termination from "success" to "final time" for algebraic solvers to match ODE/DAE solvers ([#2613](https://github.com/pybamm-team/PyBaMM/pull/2613)).
1125

1226
# [v22.12](https://github.com/pybamm-team/PyBaMM/tree/v22.12) - 2022-12-31

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ keywords:
2424
- "expression tree"
2525
- "python"
2626
- "symbolic differentiation"
27-
version: "22.12"
27+
version: "23.1"
2828
repository-code: "https://github.com/pybamm-team/PyBaMM"
2929
title: "Python Battery Mathematical Modelling (PyBaMM)"

CONTRIBUTING.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,18 @@ Finally, if you really, really, _really_ love developing PyBaMM, have a look at
6363

6464
PyBaMM follows the [PEP8 recommendations](https://www.python.org/dev/peps/pep-0008/) for coding style. These are very common guidelines, and community tools have been developed to check how well projects implement them. We recommend using pre-commit hooks to check your code before committing it. See [installing and using pre-commit](https://github.com/pybamm-team/PyBaMM/blob/develop/CONTRIBUTING.md#installing-and-using-pre-commit) section for more details.
6565

66-
### Flake8
66+
### Ruff
6767

68-
We use [flake8](http://flake8.pycqa.org/en/latest/) to check our PEP8 adherence. To try this on your system, navigate to the PyBaMM directory in a console and type
68+
We use [ruff](https://github.com/charliermarsh/ruff) to check our PEP8 adherence. To try this on your system, navigate to the PyBaMM directory in a console and type
6969

7070
```bash
71-
flake8
71+
python -m pip install pre-commit
72+
pre-commit run ruff
7273
```
7374

74-
Flake8 is configured inside the file `tox.ini`, under the section `[flake8]`, allowing us to ignore some errors. If you think this should be added or removed, please submit an [issue](#issues)
75+
ruff is configured inside the file `pre-commit-config.yaml`, allowing us to ignore some errors. If you think this should be added or removed, please submit an [issue](#issues)
7576

76-
When you commit your changes they will be checked against flake8 automatically (see [infrastructure](#infrastructure)).
77+
When you commit your changes they will be checked against ruff automatically (see [infrastructure](#infrastructure)).
7778

7879
### Black
7980

@@ -89,7 +90,7 @@ black {source_file_or_directory}
8990

9091
If you want to use black in your editor, you may need to change the max line length in your editor settings.
9192

92-
Even when code has been formatted by black, you should still make sure that it adheres to the PEP8 standard set by [Flake8](#flake8).
93+
Even when code has been formatted by black, you should still make sure that it adheres to the PEP8 standard set by [ruff](#ruff).
9394

9495
### Naming
9596

@@ -111,7 +112,7 @@ On the other hand... We _do_ want to compare several tools, to generate document
111112
1. Core PyBaMM: A minimal set, including things like NumPy, SciPy, etc. All infrastructure should run against this set of dependencies, as well as any numerical methods we implement ourselves.
112113
2. Extras: Other inference packages and their dependencies. Methods we don't want to implement ourselves, but do want to provide an interface to can have their dependencies added here.
113114
3. Documentation generating code: Everything you need to generate and work on the docs.
114-
4. Development code: Everything you need to do PyBaMM development (so all of the above packages, plus flake8 and other testing tools).
115+
4. Development code: Everything you need to do PyBaMM development (so all of the above packages, plus ruff and other testing tools).
115116

116117
Only 'core pybamm' is installed by default. The others have to be specified explicitly when running the installation command.
117118

GOVERNANCE.md

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# PyBaMM Governance
2+
3+
The following contains the formal governance structure of the PyBaMM
4+
project. This document clarifies how decisions are made with respect
5+
to community interactions, including the relationship between
6+
open source development and work that may be funded by for-profit
7+
and non-profit entities.
8+
9+
## Code of Conduct
10+
11+
The PyBaMM community strongly values inclusivity and diversity. Everyone
12+
should treat others with the utmost respect. Everyone in the community
13+
must adhere to the
14+
[Code of Conduct](https://github.com/pybamm-team/PyBaMM/blob/develop/CODE-OF-CONDUCT.md) which
15+
reflects the values of our community. Violations of the code should be
16+
reported to members of the steering council, where the offenses will be
17+
handled on a case-by-case basis.
18+
19+
## Current Steering Council
20+
21+
- [Ferran Brosa Planella](https://www.brosaplanella.xyz)
22+
- [Saransh Chopra](https://saransh-cpp.github.io)
23+
- Scott Marquis
24+
- [Gregory Offer](https://www.imperial.ac.uk/people/gregory.offer)
25+
- [Valentin Sulzer](https://sites.google.com/view/valentinsulzer)
26+
27+
## Advisory Committee
28+
29+
TBA
30+
31+
# Governing Rules and Duties
32+
33+
## Steering Council
34+
35+
The Project has a Steering Council that consists of Project
36+
Contributors who have produced contributions that are substantial in
37+
quality and quantity, and sustained over at least one year. The role
38+
of the Council is to provide active leadership for the Project in
39+
making everyday decisions on technical and administrative issues,
40+
through working with and taking input from the Community.
41+
42+
During the everyday project activities, Council Members participate in
43+
all discussions, code review and other project activities as peers
44+
with all other Contributors and the Community. In these everyday
45+
activities, Council Members do not have any special power or privilege
46+
through their membership on the Council. However, it is expected that
47+
because of the quality and quantity of their contributions and their
48+
expert knowledge of the Project Software and Services that Council
49+
Members will provide useful guidance, both technical and in terms of
50+
project direction, to potentially less experienced Contributors.
51+
52+
The Steering Council and its Members play a special role in certain
53+
situations. In particular, the Council may:
54+
55+
- Make decisions about the overall scope, vision and direction of
56+
the project.
57+
- Make decisions about strategic collaborations with other
58+
organizations or individuals.
59+
- Make decisions about specific technical issues, features, bugs and
60+
pull requests. They are the primary mechanism of guiding the code
61+
review process and merging pull requests.
62+
- Make decisions about the Services that are run by the Project and
63+
manage those Services for the benefit of the Project and Community.
64+
- Make decisions when regular community discussion does not produce
65+
consensus on an issue in a reasonable time frame.
66+
67+
Steering Council decisions are taken by simple majority, with the
68+
exception of changes to the Governance Documents which follow the
69+
procedure in the section 'Changing the Governance Documents'.
70+
71+
### Steering Council membership
72+
73+
To become eligible for being a Steering Council Member, an individual
74+
must be a Project Contributor who has produced contributions that are
75+
substantial in quality and quantity, and sustained over at least one
76+
year. Potential Council Members are nominated by existing Council
77+
Members or by the Community and voted upon by the existing Council
78+
after asking if the potential Member is interested and willing to
79+
serve in that capacity.
80+
81+
When considering potential Members, the Council will look at
82+
candidates with a comprehensive view of their contributions. This will
83+
include but is not limited to code, code review, infrastructure work,
84+
mailing list and chat participation, community help/building,
85+
education and outreach, design work, etc. We deliberately do not
86+
set arbitrary quantitative metrics to avoid encouraging behavior
87+
that plays to the metrics rather than the project's overall well-being.
88+
We want to encourage a diverse array of backgrounds, viewpoints and
89+
talents in our team, which is why we explicitly do not define code as
90+
the sole metric on which Council membership will be evaluated.
91+
92+
If a Council Member becomes inactive in the project for a period of
93+
one year, they will be considered for removal from the Council. Before
94+
removal, the inactive Member will be approached by another Council
95+
member to ask if they plan on returning to active participation. If
96+
not they will be removed immediately upon a Council vote. If they plan
97+
on returning to active participation soon, they will be given a grace
98+
period of one year. If they do not return to active participation
99+
within that time period they will be removed by vote of the Council
100+
without further grace period. All former Council members can be
101+
considered for membership again at any time in the future, like any
102+
other Project Contributor. Retired Council members will be listed on
103+
the project website, acknowledging the period during which they were
104+
active in the Council.
105+
106+
The Council reserves the right to eject current Members if they are
107+
deemed to be actively harmful to the Project's well-being, and
108+
attempts at communication and conflict resolution have failed.
109+
110+
## Fiscal Decisions
111+
112+
All fiscal decisions are made by the steering council to ensure any
113+
funds are spent in a manner that furthers the mission of the Project.
114+
Fiscal decisions require majority approval by acting steering council
115+
members.
116+
117+
## Advisory Committee
118+
119+
The Project will consider setting up an Advisory Committee that works to ensure the long-term
120+
well-being of the Project. The role of the Committee will be to advise the Steering Council.
121+
122+
## Conflict of interest
123+
124+
It is expected that Steering Council and Advisory Committee Members
125+
will be employed at a wide range of companies, universities and non-profit
126+
organizations. Because of this, it is possible that Members will have
127+
conflicts of interest. Such conflicts of interest include, but are not
128+
limited to:
129+
130+
- Financial interests, such as investments, employment or contracting
131+
work, outside of the Project that may influence their work on the
132+
Project.
133+
- Access to proprietary information of their employer that could
134+
potentially leak into their work with the Project.
135+
136+
All members of the Council and Committee shall disclose any conflict of
137+
interest they may have. Members with a conflict of interest in a
138+
particular issue may participate in Council discussions on that issue,
139+
but must recuse themselves from voting on the issue.

0 commit comments

Comments
 (0)