From 28c1de6e431f97e2ab18c454a937f04e5d1f73fd Mon Sep 17 00:00:00 2001 From: Priyanshu Agarwal Date: Wed, 27 Jan 2021 20:34:48 +0530 Subject: [PATCH 1/9] add link_checker --- .github/workflows/link_checker.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/link_checker.yml diff --git a/.github/workflows/link_checker.yml b/.github/workflows/link_checker.yml new file mode 100644 index 0000000000..79c523517b --- /dev/null +++ b/.github/workflows/link_checker.yml @@ -0,0 +1,21 @@ +name: Check Docs links + +on: + push: + pull_request: + schedule: + # Run everyday at 3 am UTC + - cron: 0 3 * * * + +jobs: + markdown-link-check: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + - name: Run link check + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-quiet-mode: 'yes' + use-verbose-mode: 'yes' + file-extension: '.rst, .md' From 26dbb0f92f2af1238dd39ae8dcd74666e517bbd2 Mon Sep 17 00:00:00 2001 From: Priyanshu Agarwal Date: Wed, 27 Jan 2021 21:29:17 +0530 Subject: [PATCH 2/9] add docs link checker in CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e41a668482..293aa41f94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ ## Optimizations +- Add docs link checker in workflows ([#1347](https://github.com/pybamm-team/PyBaMM/pull/1347)) - The `Solution` class now only creates the concatenated `y` when the user asks for it. This is an optimization step as the concatenation can be slow, especially with larger experiments ([#1331](https://github.com/pybamm-team/PyBaMM/pull/1331)) - If solver method `solve()` is passed a list of inputs as the `inputs` keyword argument, the resolution of the model for each input set is spread across several Python processes, usually running in parallel on different processors. The default number of processes is the number of processors available. `solve()` takes a new keyword argument `nproc` which can be used to set this number a manually. - Variables are now post-processed using CasADi ([#1316](https://github.com/pybamm-team/PyBaMM/pull/1316)) From 62498e068f7be636f57c573f0e60eb0247b3f0ec Mon Sep 17 00:00:00 2001 From: Priyanshu Agarwal Date: Thu, 28 Jan 2021 09:33:32 +0530 Subject: [PATCH 3/9] add url_checker --- .github/workflows/url_checker.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/url_checker.yml diff --git a/.github/workflows/url_checker.yml b/.github/workflows/url_checker.yml new file mode 100644 index 0000000000..7dacef4c7b --- /dev/null +++ b/.github/workflows/url_checker.yml @@ -0,0 +1,29 @@ +name: Check URLs + +on: + push: + pull_request: + schedule: + # Run everyday at 3 am UTC + - cron: 0 3 * * * + +jobs: + urlchecks: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: URLs-checker + uses: urlstechie/urlchecker-action@master + with: + # A comma-separated list of file types to cover in the URL checks + file_types: .rst,.md,.py,.ipynb + + # Choose whether to include file with no URLs in the prints. + print_all: false + + # Timeout in 10 seconds if url is not reached + timeout: 10 + + # How many times to retry a failed request (each is logged, defaults to 1) + retry_count: 3 \ No newline at end of file From 58bd67cd2e08f159838ba10f73022eededab87c7 Mon Sep 17 00:00:00 2001 From: Priyanshu Agarwal Date: Thu, 28 Jan 2021 09:39:07 +0530 Subject: [PATCH 4/9] add url_checker in CHANGELOG --- .github/workflows/link_checker.yml | 21 --------------------- CHANGELOG.md | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 .github/workflows/link_checker.yml diff --git a/.github/workflows/link_checker.yml b/.github/workflows/link_checker.yml deleted file mode 100644 index 79c523517b..0000000000 --- a/.github/workflows/link_checker.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Check Docs links - -on: - push: - pull_request: - schedule: - # Run everyday at 3 am UTC - - cron: 0 3 * * * - -jobs: - markdown-link-check: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@master - - name: Run link check - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - use-quiet-mode: 'yes' - use-verbose-mode: 'yes' - file-extension: '.rst, .md' diff --git a/CHANGELOG.md b/CHANGELOG.md index 293aa41f94..56832775ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ ## Optimizations -- Add docs link checker in workflows ([#1347](https://github.com/pybamm-team/PyBaMM/pull/1347)) +- Add URLs checker in workflows ([#1347](https://github.com/pybamm-team/PyBaMM/pull/1347)) - The `Solution` class now only creates the concatenated `y` when the user asks for it. This is an optimization step as the concatenation can be slow, especially with larger experiments ([#1331](https://github.com/pybamm-team/PyBaMM/pull/1331)) - If solver method `solve()` is passed a list of inputs as the `inputs` keyword argument, the resolution of the model for each input set is spread across several Python processes, usually running in parallel on different processors. The default number of processes is the number of processors available. `solve()` takes a new keyword argument `nproc` which can be used to set this number a manually. - Variables are now post-processed using CasADi ([#1316](https://github.com/pybamm-team/PyBaMM/pull/1316)) From 2158fc508f7e9bcede86898d37a9a3445a6ec787 Mon Sep 17 00:00:00 2001 From: Priyanshu Agarwal Date: Thu, 28 Jan 2021 17:12:08 +0530 Subject: [PATCH 5/9] add exclude_patterns --- .github/workflows/url_checker.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/url_checker.yml b/.github/workflows/url_checker.yml index 7dacef4c7b..339dbda837 100644 --- a/.github/workflows/url_checker.yml +++ b/.github/workflows/url_checker.yml @@ -22,8 +22,11 @@ jobs: # Choose whether to include file with no URLs in the prints. print_all: false - # Timeout in 10 seconds if url is not reached - timeout: 10 + # Timeout in 15 seconds if url is not reached + timeout: 15 # How many times to retry a failed request (each is logged, defaults to 1) - retry_count: 3 \ No newline at end of file + retry_count: 3 + + # A comma separated patterns to exclude during URL checks + exclude_patterns: http://www.w3.org,http://purl.org/dc \ No newline at end of file From efb5aed6edeac6fda66f7d6ba8d29398a9cecf87 Mon Sep 17 00:00:00 2001 From: Priyanshu Agarwal Date: Thu, 28 Jan 2021 17:58:55 +0530 Subject: [PATCH 6/9] add exclude_patterns --- .github/workflows/url_checker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/url_checker.yml b/.github/workflows/url_checker.yml index 339dbda837..3bd98c0913 100644 --- a/.github/workflows/url_checker.yml +++ b/.github/workflows/url_checker.yml @@ -22,8 +22,8 @@ jobs: # Choose whether to include file with no URLs in the prints. print_all: false - # Timeout in 15 seconds if url is not reached - timeout: 15 + # Timeout in 10 seconds if url is not reached + timeout: 10 # How many times to retry a failed request (each is logged, defaults to 1) retry_count: 3 From 8d1aa72b47b7f175238df9b6c682e83929e98d9f Mon Sep 17 00:00:00 2001 From: Priyanshu Agarwal Date: Sun, 31 Jan 2021 21:21:36 +0530 Subject: [PATCH 7/9] fix broken links --- CMakeBuild.py | 2 +- CONTRIBUTING.md | 4 ++-- docs/tutorials/add-model.rst | 4 ++-- docs/tutorials/add-parameter-values.rst | 6 +++--- docs/tutorials/add-solver.rst | 4 ++-- docs/tutorials/add-spatial-method.rst | 4 ++-- examples/notebooks/README.md | 2 +- examples/notebooks/change-input-current.ipynb | 2 +- examples/notebooks/change-settings.ipynb | 2 +- examples/notebooks/compare-comsol-discharge-curve.ipynb | 2 +- examples/notebooks/expression_tree/expression-tree.ipynb | 6 +++--- examples/notebooks/models/SPM.ipynb | 4 ++-- 12 files changed, 21 insertions(+), 21 deletions(-) diff --git a/CMakeBuild.py b/CMakeBuild.py index 1646ec9a3e..be67eb0cbc 100644 --- a/CMakeBuild.py +++ b/CMakeBuild.py @@ -79,7 +79,7 @@ def run(self): "cmake configuration steps encountered errors, and the idaklu module" " could not be built. Make sure dependencies are correctly " "installed. See " - "https://github.com/pybamm-team/PyBaMM/blob/develop/" + "https://github.com/pybamm-team/PyBaMM/tree/develop" "INSTALL-LINUX-MAC.md" ) raise RuntimeError(msg) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a8baba661a..2be69679eb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,7 +28,7 @@ You now have everything you need to start making changes! ### B. Writing your code -5. PyBaMM is developed in [Python](https://en.wikipedia.org/wiki/Python_(programming_language)), and makes heavy use of [NumPy](https://en.wikipedia.org/wiki/NumPy) (see also [NumPy for MatLab users](https://docs.scipy.org/doc/numpy-dev/user/numpy-for-matlab-users.html) and [Python for R users](http://blog.hackerearth.com/how-can-r-users-learn-python-for-data-science)). +5. PyBaMM is developed in [Python](https://en.wikipedia.org/wiki/Python_(programming_language)), and makes heavy use of [NumPy](https://en.wikipedia.org/wiki/NumPy) (see also [NumPy for MatLab users](https://numpy.org/doc/stable/user/numpy-for-matlab-users.html) and [Python for R users](http://blog.hackerearth.com/how-can-r-users-learn-python-for-data-science)). 6. Make sure to follow our [coding style guidelines](#coding-style-guidelines). 7. Commit your changes to your branch with [useful, descriptive commit messages](https://chris.beams.io/posts/git-commit/): Remember these are publicly visible and should still make sense a few months ahead in time. While developing, you can keep using the GitHub issue you're working on as a place for discussion. [Refer to your commits](https://stackoverflow.com/questions/8910271/how-can-i-reference-a-commit-in-an-issue-comment-on-github) when discussing specific lines of code. 8. If you want to add a dependency on another library, or re-use code you found somewhere else, have a look at [these guidelines](#dependencies-and-reusing-code). @@ -300,7 +300,7 @@ And then visit the webpage served at http://127.0.0.1:8000. Each time a change t Major PyBaMM features are showcased in [Jupyter notebooks](https://jupyter.org/) stored in the [examples directory](examples/notebooks). Which features are "major" is of course wholly subjective, so please discuss on GitHub first! -All example notebooks should be listed in [examples/README.md](https://github.com/pybamm-team/PyBaMM/examples/notebooks/README.md). Please follow the (naming and writing) style of existing notebooks where possible. +All example notebooks should be listed in [examples/README.md](https://github.com/pybamm-team/PyBaMM/blob/develop/examples/notebooks/README.md). Please follow the (naming and writing) style of existing notebooks where possible. Where possible, notebooks are tested daily. A list of slow notebooks (which time-out and fail tests) is maintained in `.slow-books`, these notebooks will be excluded from daily testing. diff --git a/docs/tutorials/add-model.rst b/docs/tutorials/add-model.rst index e55c3d0e9d..d61c55a6c8 100644 --- a/docs/tutorials/add-model.rst +++ b/docs/tutorials/add-model.rst @@ -8,12 +8,12 @@ Adding a Model As with any contribution to PyBaMM, please follow the workflow in CONTRIBUTING.md_. In particular, start by creating an issue to discuss what you want to do - this is a good way to avoid wasted coding hours! -We aim here to provide an overview of how a new model is entered into PyBaMM in a form which can be eventually merged into the master branch of the PyBaMM project. However, we recommend that you first read through the notebook: `create a model `_, which goes step-by-step through the procedure for creating a model. Once you understand that procedure, you can then formalise your model following the outline provided here. +We aim here to provide an overview of how a new model is entered into PyBaMM in a form which can be eventually merged into the master branch of the PyBaMM project. However, we recommend that you first read through the notebook: `create a model `_, which goes step-by-step through the procedure for creating a model. Once you understand that procedure, you can then formalise your model following the outline provided here. The role of models ------------------ -One of the main motivations for PyBaMM is to allow for new models of batteries to be easily be added, solved, tested, and compared without requiring a detailed knowledge of sophisticated numerical methods. It has therefore been our focus to make the process of adding a new model as simple as possible. To achieve this, all models in PyBaMM are implemented as `expression trees `_, which abstract away the details of computation. +One of the main motivations for PyBaMM is to allow for new models of batteries to be easily be added, solved, tested, and compared without requiring a detailed knowledge of sophisticated numerical methods. It has therefore been our focus to make the process of adding a new model as simple as possible. To achieve this, all models in PyBaMM are implemented as `expression trees `_, which abstract away the details of computation. The fundamental building blocks of a PyBaMM expression tree are :class:`pybamm.Symbol`. There are different types of :class:`pybamm.Symbol`: :class:`pybamm.Variable`, :class:`pybamm.Parameter`, :class:`pybamm.Addition`, :class:`pybamm.Multiplication`, :class:`pybamm.Gradient` etc which have been created so that each component of a model written out in PyBaMM mirrors exactly the written mathematics. For example, the expression: diff --git a/docs/tutorials/add-parameter-values.rst b/docs/tutorials/add-parameter-values.rst index d72f078dcc..19c52aa28c 100644 --- a/docs/tutorials/add-parameter-values.rst +++ b/docs/tutorials/add-parameter-values.rst @@ -10,7 +10,7 @@ In particular, start by creating an issue to discuss what you want to do - this The role of parameter values ---------------------------- -All models in PyBaMM are implemented as `expression trees `_. +All models in PyBaMM are implemented as `expression trees `_. At the stage of creating a model, we use :class:`pybamm.Parameter` and :class:`pybamm.FunctionParameter` objects to represent parameters and functions respectively. We then create a :class:`ParameterValues` class, using a specific set of parameters, to iterate through the model and replace any :class:`pybamm.Parameter` objects with a :class:`pybamm.Scalar` and any :class:`pybamm.FunctionParameter` objects with a :class:`pybamm.Function`. @@ -154,13 +154,13 @@ or, equivalently in this case (since the only difference from the standard param } ) -See the `"Getting Started" tutorial `_ for examples of setting parameters in action. +See the `"Getting Started" tutorial `_ for examples of setting parameters in action. Unit tests for the new class ---------------------------- You might want to add some unit tests to show that the parameters combine as expected -(see e.g. `lithium-ion parameter tests `_), but this is not crucial. +(see e.g. `lithium-ion parameter tests `_), but this is not crucial. Test on the models ------------------ diff --git a/docs/tutorials/add-solver.rst b/docs/tutorials/add-solver.rst index efd31cd4c3..739bc11266 100644 --- a/docs/tutorials/add-solver.rst +++ b/docs/tutorials/add-solver.rst @@ -10,7 +10,7 @@ In particular, start by creating an issue to discuss what you want to do - this The role of solvers ------------------- -All models in PyBaMM are implemented as `expression trees `_. +All models in PyBaMM are implemented as `expression trees `_. After the model has been created, parameters have been set, and the model has been discretised, the model is now a linear algebra object with the following attributes: model.concatenated_rhs @@ -54,7 +54,7 @@ You can then start implementing the solver by adding the ``integrate`` function For an example of an existing solver implementation, see the Scikits DAE solver `API docs `_ and -`notebook `_. +`notebook `_. Unit tests for the new class ---------------------------- diff --git a/docs/tutorials/add-spatial-method.rst b/docs/tutorials/add-spatial-method.rst index 00cf2ae928..c2326a4099 100644 --- a/docs/tutorials/add-spatial-method.rst +++ b/docs/tutorials/add-spatial-method.rst @@ -10,7 +10,7 @@ In particular, start by creating an issue to discuss what you want to do - this The role of spatial methods --------------------------- -All models in PyBaMM are implemented as `expression trees `_. +All models in PyBaMM are implemented as `expression trees `_. After it has been created and parameters have been set, the model is passed to the :class:`pybamm.Discretisation` class, which converts it into a linear algebra form. For example, the object: @@ -74,7 +74,7 @@ Unit tests for the new class ---------------------------- For the new spatial method to be added to PyBaMM, you must add unit tests to demonstrate that it behaves as expected -(see, for example, the `Finite Volume unit tests `_). +(see, for example, the `Finite Volume unit tests `_). The best way to get started would be to create a file ``test_my_fast_method.py`` in ``tests/unit/test_spatial_methods/`` that performs at least the following checks: diff --git a/examples/notebooks/README.md b/examples/notebooks/README.md index 2873777041..f89ad34938 100644 --- a/examples/notebooks/README.md +++ b/examples/notebooks/README.md @@ -62,7 +62,7 @@ Once you are comfortable with the expression tree structure, a good starting poi - [Full porous-electrode](https://pybamm.readthedocs.io/en/latest/source/models/lead_acid/full.html) - [Leading-Order Quasi-Static](https://pybamm.readthedocs.io/en/latest/source/models/lead_acid/loqs.html) -- [Composite](https://pybamm.readthedocs.io/en/latest/source/models/lead_acid/composite.html) +- [Higher-Order](https://pybamm.readthedocs.io/en/latest/source/models/lead_acid/higher_order.html) ### Spatial Methods diff --git a/examples/notebooks/change-input-current.ipynb b/examples/notebooks/change-input-current.ipynb index f7078ff4d2..767d950ccb 100644 --- a/examples/notebooks/change-input-current.ipynb +++ b/examples/notebooks/change-input-current.ipynb @@ -6,7 +6,7 @@ "source": [ "# Changing the input current when solving PyBaMM models\n", "\n", - "This notebook shows you how to change the input current when solving PyBaMM models. It also explains how to load in current data from a file, and how to add a user-defined current function. For more examples of different drive cycles see [here](https://github.com/pybamm-team/PyBaMM/tree/master/results/drive_cycles).\n", + "This notebook shows you how to change the input current when solving PyBaMM models. It also explains how to load in current data from a file, and how to add a user-defined current function. For more examples of different drive cycles see [here](https://github.com/pybamm-team/PyBaMM/tree/develop/pybamm/input/drive_cycles).\n", "\n", "### Table of Contents\n", "1. [Constant current](#constant)\n", diff --git a/examples/notebooks/change-settings.ipynb b/examples/notebooks/change-settings.ipynb index e3e13f4989..49025e418d 100644 --- a/examples/notebooks/change-settings.ipynb +++ b/examples/notebooks/change-settings.ipynb @@ -477,7 +477,7 @@ "source": [ "## Changing the discretisation \n", "\n", - "The chosen spatial discretisation method to use for each domain is passed into the [`pybamm.Discretisation`](https://pybamm.readthedocs.io/en/latest/source/discretisations/discretisation.html) class as one of its arguments. The default spatial methods for the SPM class are given as:\n" + "The chosen spatial discretisation method to use for each domain is passed into the [`pybamm.Discretisation`](https://pybamm.readthedocs.io/en/latest/source/spatial_methods/discretisation.html) class as one of its arguments. The default spatial methods for the SPM class are given as:\n" ] }, { diff --git a/examples/notebooks/compare-comsol-discharge-curve.ipynb b/examples/notebooks/compare-comsol-discharge-curve.ipynb index 9995ce5435..cc06619470 100644 --- a/examples/notebooks/compare-comsol-discharge-curve.ipynb +++ b/examples/notebooks/compare-comsol-discharge-curve.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "In this notebook we compare the discharge curves obtained by solving the DFN model both in PyBaMM and COMSOL. Results are presented for a range of C-rates, and we see an excellent agreement between the two implementations. If you would like to compare internal variables please see the script [compare_comsol_DFN](https://github.com/pybamm-team/PyBaMM/blob/comsol-voltage-compare/examples/scripts/compare_comsol/compare_comsol_DFN.py) which creates a slider plot comparing potentials and concentrations as functions of time and space for a given C-rate. For more information on the DFN model, see the [DFN notebook](https://github.com/pybamm-team/PyBaMM/blob/master/examples/notebooks/models/DFN.ipynb)." + "In this notebook we compare the discharge curves obtained by solving the DFN model both in PyBaMM and COMSOL. Results are presented for a range of C-rates, and we see an excellent agreement between the two implementations. If you would like to compare internal variables please see the script [compare_comsol_DFN](https://github.com/pybamm-team/PyBaMM/blob/develop/examples/scripts/compare_comsol/compare_comsol_DFN.py) which creates a slider plot comparing potentials and concentrations as functions of time and space for a given C-rate. For more information on the DFN model, see the [DFN notebook](https://github.com/pybamm-team/PyBaMM/blob/master/examples/notebooks/models/DFN.ipynb)." ] }, { diff --git a/examples/notebooks/expression_tree/expression-tree.ipynb b/examples/notebooks/expression_tree/expression-tree.ipynb index 0ff4d2094b..bb5316316b 100644 --- a/examples/notebooks/expression_tree/expression-tree.ipynb +++ b/examples/notebooks/expression_tree/expression-tree.ipynb @@ -126,7 +126,7 @@ "\n", "1. The model is proposed, consisting of equations representing the right-hand-side of an ordinary differential equation (ODE), and/or algebraic equations for a differential algebraic equation (DAE), and also associated boundary condition equations\n", "2. The parameters present in the model are replaced by actual scalar values from a parameter file, using the [`pybamm.ParamterValues`](https://pybamm.readthedocs.io/en/latest/source/parameters/parameter_values.html) class\n", - "3. The equations in the model are discretised onto a mesh, any spatial gradients are replaced with linear algebra expressions and the variables of the model are replaced with state vector slices. This is done using the [`pybamm.Discretisation`](https://pybamm.readthedocs.io/en/latest/source/discretisations/discretisation.html) class.\n", + "3. The equations in the model are discretised onto a mesh, any spatial gradients are replaced with linear algebra expressions and the variables of the model are replaced with state vector slices. This is done using the [`pybamm.Discretisation`](https://pybamm.readthedocs.io/en/latest/source/spatial_methods/discretisation.html) class.\n", "\n", "## Stage 1 - Symbolic Expression Trees\n", "\n", @@ -187,7 +187,7 @@ "\n", "The third and final stage uses the `pybamm.Discretisation` class to discretise the spatial gradients and variables over a given mesh. After this stage the expression tree will encode a linear algebra expression that can be evaluated given the state vector $\\mathbf{y}$ and $t$.\n", "\n", - "**Note:** for demonstration purposes, we use a dummy discretisation below. For a more complete description of the `pybamm.Discretisation` class, see the example notebook [here](https://github.com/pybamm-team/PyBaMM/blob/master/examples/notebooks/discretisations/finite-volumes.ipynb)." + "**Note:** for demonstration purposes, we use a dummy discretisation below. For a more complete description of the `pybamm.Discretisation` class, see the example notebook [here](https://github.com/pybamm-team/PyBaMM/blob/develop/examples/notebooks/spatial_methods/finite-volumes.ipynb)." ] }, { @@ -221,7 +221,7 @@ "source": [ "![](expression_tree5.png)\n", "\n", - "After the third stage, our expression tree is now able to be evaluated by one of the solver classes. Note that we have used a single equation above to illustrate the different types of expression trees in PyBaMM, but any given models will consist of many RHS or algebraic equations, along with boundary conditions. See [here](https://github.com/pybamm-team/PyBaMM/blob/master/examples/notebooks/add-model.ipynb) for more details of PyBaMM models." + "After the third stage, our expression tree is now able to be evaluated by one of the solver classes. Note that we have used a single equation above to illustrate the different types of expression trees in PyBaMM, but any given models will consist of many RHS or algebraic equations, along with boundary conditions. See [here](https://github.com/pybamm-team/PyBaMM/tree/develop/examples/notebooks/Creating%20Models) for more details of PyBaMM models." ] }, { diff --git a/examples/notebooks/models/SPM.ipynb b/examples/notebooks/models/SPM.ipynb index 6375335bb5..2bb0a3b0cc 100644 --- a/examples/notebooks/models/SPM.ipynb +++ b/examples/notebooks/models/SPM.ipynb @@ -95,7 +95,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The model object is a subtype of [`pybamm.BaseModel`](https://pybamm.readthedocs.io/en/latest/source/models/base_model.html), and contains all the equations that define this particular model. For example, the `rhs` dict contained in `model` has a dictionary mapping variables such as $c_n$ to the equation representing its rate of change with time (i.e. $\\partial{c_n}/\\partial{t}$). We can see this explicitly by visualising this entry in the `rhs` dict:" + "The model object is a subtype of [`pybamm.BaseModel`](https://pybamm.readthedocs.io/en/latest/source/models/base_models/base_model.html), and contains all the equations that define this particular model. For example, the `rhs` dict contained in `model` has a dictionary mapping variables such as $c_n$ to the equation representing its rate of change with time (i.e. $\\partial{c_n}/\\partial{t}$). We can see this explicitly by visualising this entry in the `rhs` dict:" ] }, { @@ -281,7 +281,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "The next step is to discretise the model equations using this mesh. We do this using the [`pybamm.Discretisation`](https://pybamm.readthedocs.io/en/latest/source/discretisations/discretisation.html) class, which takes both the mesh we have already created, and a dictionary of spatial methods to use for each geometry domain. For the case of the SPM, we use the following defaults for the spatial discretisation methods:" + "The next step is to discretise the model equations using this mesh. We do this using the [`pybamm.Discretisation`](https://pybamm.readthedocs.io/en/latest/source/spatial_methods/discretisation.html) class, which takes both the mesh we have already created, and a dictionary of spatial methods to use for each geometry domain. For the case of the SPM, we use the following defaults for the spatial discretisation methods:" ] }, { From ffaa4751b4e83590cbdec823b49e1563c7c3245c Mon Sep 17 00:00:00 2001 From: Priyanshu Agarwal Date: Sun, 31 Jan 2021 21:51:21 +0530 Subject: [PATCH 8/9] change workflow inputs --- .github/workflows/url_checker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/url_checker.yml b/.github/workflows/url_checker.yml index 3bd98c0913..97ec0e8348 100644 --- a/.github/workflows/url_checker.yml +++ b/.github/workflows/url_checker.yml @@ -2,7 +2,6 @@ name: Check URLs on: push: - pull_request: schedule: # Run everyday at 3 am UTC - cron: 0 3 * * * @@ -22,11 +21,12 @@ jobs: # Choose whether to include file with no URLs in the prints. print_all: false - # Timeout in 10 seconds if url is not reached - timeout: 10 + # Timeout in 20 seconds if url is not reached + timeout: 20 # How many times to retry a failed request (each is logged, defaults to 1) retry_count: 3 # A comma separated patterns to exclude during URL checks - exclude_patterns: http://www.w3.org,http://purl.org/dc \ No newline at end of file + exclude_patterns: http://www.w3.org,http://purl.org/dc,http://127.0.0.1 + \ No newline at end of file From 389893c83e3b496e25089148acdecc755ef176c2 Mon Sep 17 00:00:00 2001 From: Priyanshu Agarwal Date: Sun, 31 Jan 2021 22:04:08 +0530 Subject: [PATCH 9/9] change workflow inputs --- .github/workflows/url_checker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/url_checker.yml b/.github/workflows/url_checker.yml index 97ec0e8348..a64922daf3 100644 --- a/.github/workflows/url_checker.yml +++ b/.github/workflows/url_checker.yml @@ -21,8 +21,8 @@ jobs: # Choose whether to include file with no URLs in the prints. print_all: false - # Timeout in 20 seconds if url is not reached - timeout: 20 + # Timeout in 10 seconds if url is not reached + timeout: 10 # How many times to retry a failed request (each is logged, defaults to 1) retry_count: 3