You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,7 +85,7 @@ We use [black](https://black.readthedocs.io/en/stable/) to automatically configu
85
85
black {source_file_or_directory}
86
86
```
87
87
88
-
2. Editor: black can be [configured](https://test-black.readthedocs.io/en/latest/editor_integration.html) to automatically reformat a python script each time the script is saved in an editor.
88
+
2. Editor: black can be [configured](https://test-black.readthedocs.io/en/latest/editor_integration.html) to automatically reformat a Python script each time the script is saved in an editor.
89
89
90
90
If you want to use black in your editor, you may need to change the max line length in your editor settings.
91
91
@@ -214,7 +214,7 @@ This also means that, if you can't fix the bug yourself, it will be much easier
214
214
215
215
or by just commenting out all the tests you don't want to run.
216
216
217
-
2. Set break points, either in your IDE or using the python debugging module. To use the latter, add the following line where you want to set the break point
217
+
2. Set break points, either in your IDE or using the Python debugging module. To use the latter, add the following line where you want to set the break point
218
218
219
219
```python
220
220
import ipdb; ipdb.set_trace()
@@ -257,7 +257,7 @@ This also means that, if you can't fix the bug yourself, it will be much easier
257
257
258
258
You can then step through the expression tree, using the `children` attribute, to pinpoint exactly where a bug is coming from. For example, if`expression_tree.jac(y)`is failing, you can check `expression_tree.children[0].jac(y)`, then `expression_tree.children[0].children[0].jac(y)`, etc.
259
259
260
-
3. To isolate whether a bug isin a model, its jacobianor its simplified version, you can set the `use_jacobian`and/or`use_simplify` attributes of the model to `False` (they are both `True` by default for most models).
260
+
3. To isolate whether a bug isin a model, its Jacobianor its simplified version, you can set the `use_jacobian`and/or`use_simplify` attributes of the model to `False` (they are both `True` by default for most models).
261
261
4. If a model isn't giving the answer you expect, you can try comparing it to other models. For example, you can investigate parameter limits in which two models should give the same answer by setting some parameters to be small or zero. The `StandardOutputComparison` class can be used to compare some standard outputs from battery models.
262
262
5. To get more information about what is going on under the hood, and hence understand what is causing the bug, you can set the [logging](https://realpython.com/python-logging/) level to `DEBUG` by adding the following line to your test or script:
263
263
@@ -340,9 +340,9 @@ Adding the command
340
340
pybamm.print_citations()
341
341
```
342
342
343
-
to the end of a script will printall citations that were used by that script. This will printbibtex information to the terminal; passing a filename to `print_citations` will print the bibtex information to the specified file instead.
343
+
to the end of a script will printall citations that were used by that script. This will printBibTeX information to the terminal; passing a filename to `print_citations` will print the BibTeX information to the specified file instead.
344
344
345
-
When you contribute code to PyBaMM, you can add your own papers that you would like to be cited if that code is used. First, add the bibtexfor your paper to [CITATIONS.txt](pybamm/CITATIONS.txt). Then, add the line
345
+
When you contribute code to PyBaMM, you can add your own papers that you would like to be cited if that code is used. First, add the BibTeXfor your paper to [CITATIONS.txt](pybamm/CITATIONS.txt). Then, add the line
@@ -368,7 +368,7 @@ Note that this file must be kept in sync with the version number in [pybamm/**in
368
368
369
369
Each change pushed to the PyBaMM GitHub repository will trigger the test and benchmark suites to be run, using [GitHub actions](https://github.com/features/actions).
370
370
371
-
Tests are run for different operating systems, andforallpython versions officially supported by PyBaMM. If you opened a Pull Request, feedback is directly available on the corresponding page. If all tests pass, a green tick will be displayed next to the corresponding test run. If one or more test(s) fail, a red cross will be displayed instead.
371
+
Tests are run for different operating systems, andforallPython versions officially supported by PyBaMM. If you opened a Pull Request, feedback is directly available on the corresponding page. If all tests pass, a green tick will be displayed next to the corresponding test run. If one or more test(s) fail, a red cross will be displayed instead.
372
372
373
373
Similarly, the benchmark suite is automatically run for the most recently pushed commit. Benchmark results are compared to the results available for the latest commit on the `develop` branch. Should any significant performance regression be found, a red cross will be displayed next to the benchmark run.
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,7 @@ If you use PyBaMM in your work, please cite our paper
111
111
112
112
> Sulzer, V., Marquis, S. G., Timms, R., Robinson, M., & Chapman, S. J. (2021). Python Battery Mathematical Modelling (PyBaMM). _Journal of Open Research Software, 9(1)_.
113
113
114
-
You can use the bibtex
114
+
You can use the BibTeX
115
115
116
116
```
117
117
@article{Sulzer2021,
@@ -133,7 +133,7 @@ We would be grateful if you could also cite the relevant papers. These will chan
133
133
pybamm.print_citations()
134
134
```
135
135
136
-
to the end of your script. This will print bibtex information to the terminal; passing a filename to `print_citations` will print the bibtex information to the specified file instead. A list of all citations can also be found in the [citations file](https://github.com/pybamm-team/PyBaMM/blob/develop/pybamm/CITATIONS.txt). In particular, PyBaMM relies heavily on [CasADi](https://web.casadi.org/publications/).
136
+
to the end of your script. This will print BibTeX information to the terminal; passing a filename to `print_citations` will print the BibTeX information to the specified file instead. A list of all citations can also be found in the [citations file](https://github.com/pybamm-team/PyBaMM/blob/develop/pybamm/CITATIONS.txt). In particular, PyBaMM relies heavily on [CasADi](https://web.casadi.org/publications/).
137
137
See [CONTRIBUTING.md](https://github.com/pybamm-team/PyBaMM/blob/develop/CONTRIBUTING.md#citations) for information on how to add your own citations when you contribute.
Copy file name to clipboardExpand all lines: docs/index.rst
+1-8Lines changed: 1 addition & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,13 +96,6 @@ and run locally using ``jupyter notebook``, or online through
96
96
Contributing
97
97
============
98
98
99
-
There are many ways to contribute to PyBaMM:
100
-
101
-
.. toctree::
102
-
:maxdepth:1
103
-
104
-
tutorials/add-model
105
-
tutorials/add-spatial-method
106
-
tutorials/add-solver
99
+
Contributions to PyBaMM and its development are welcome! If you have ideas for features, bug fixes, models, spatial methods, or solvers, we would love to hear from you.
107
100
108
101
Before contributing, please read the `Contribution Guidelines <https://github.com/pybamm-team/PyBaMM/blob/develop/CONTRIBUTING.md>`_.
Copy file name to clipboardExpand all lines: docs/install/install-from-source.rst
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ Install from source (developer install)
5
5
6
6
This page describes the build and installation of PyBaMM from the source code, available on GitHub. Note that this is **not the recommended approach for most users** and should be reserved to people wanting to participate in the development of PyBaMM, or people who really need to use bleeding-edge feature(s) not yet available in the latest released version. If you do not fall in the two previous categories, you would be better off installing PyBaMM using pip or conda.
7
7
8
-
Lastly, familiarity with the python ecosystem is recommended (pip, virtualenvs).
8
+
Lastly, familiarity with the Python ecosystem is recommended (pip, virtualenvs).
9
9
Here is a gentle introduction/refresher: `Python Virtual Environments: A Primer <https://realpython.com/python-virtual-environments-a-primer/>`_.
10
10
11
11
@@ -26,7 +26,7 @@ or download the source archive on the repository's homepage.
26
26
To install PyBaMM, you will need:
27
27
28
28
- Python 3 (PyBaMM supports versions 3.8 and 3.9)
29
-
- The python headers file for your current python version.
29
+
- The Python headers file for your current Python version.
30
30
- A BLAS library (for instance `openblas <https://www.openblas.net/>`_).
31
31
- A C compiler (ex: ``gcc``).
32
32
- A Fortran compiler (ex: ``gfortran``).
@@ -52,7 +52,7 @@ You can install it with
52
52
53
53
python3.X -m pip install --user "tox<4"
54
54
55
-
Depending on your operating system, you may or may not have ``pip`` installed along python.
55
+
Depending on your operating system, you may or may not have ``pip`` installed along Python.
56
56
If ``pip`` is not found, you probably want to install the ``python3-pip`` package.
57
57
58
58
Installing the build-time requirements
@@ -105,7 +105,7 @@ If you'd rather do things yourself,
105
105
4. Clone the pybind11 repository in the ``PyBaMM/`` directory (make sure the directory is named ``pybind11``).
106
106
107
107
108
-
PyBaMM ships with a python script that automates points 2. and 3. You can run it with
108
+
PyBaMM ships with a Python script that automates points 2. and 3. You can run it with
109
109
110
110
.. code:: bash
111
111
@@ -198,7 +198,7 @@ You can run unit tests for PyBaMM using
198
198
199
199
200
200
The above starts a sub-process using the current python interpreter (i.e. using your current
201
-
python environment) and run the unit tests. This can take a few minutes.
201
+
Python environment) and run the unit tests. This can take a few minutes.
202
202
203
203
You can also use the test runner to run the doctests:
0 commit comments