Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Lychee link checking #403

Merged
merged 7 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/workflows/lychee_links.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Lychee Link Checking

name: Links
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
schedule:
- cron: '0 6 * * 0' # Run weekly on Sundays at 06:00 UTC

jobs:
Lychee:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Restore lychee cache
uses: actions/cache@v4
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-

- name: Set up Lychee
uses: lycheeverse/[email protected]
with:
args: >-
--cache
--no-progress
--max-cache-age 2d
--timeout 10
--max-retries 5
--skip-missing
--exclude-loopback
--accept 200,429
--exclude "https://tiles.stadiamaps.com/*|https://b.tile.openstreetmap.org/*"
--exclude "https://cartodb-basemaps-c.global.ssl.fastly.net/*"
--exclude "https://events.mapbox.com/*|https://events.mapbox.cn/*|https://api.mapbox.cn/*"
--exclude "https://github.com/mikolalysenko/glsl-read-float/*"
--exclude "https://fonts.openmaptiles.org/*"
--exclude "https://a.tile.openstreetmap.org/*"
--exclude "https://cdn.plot.ly/*"
--exclude "https://doi.org/*"
--exclude-path ./CHANGELOG.md
--exclude-path asv.conf.json
--exclude-path docs/conf.py
'./**/*.rst'
'./**/*.md'
'./**/*.py'
'./**/*.ipynb'
'./**/*.json'
'./**/*.toml'
fail: true
jobSummary: true
format: markdown
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Features

- [#403](https://github.com/pybop-team/PyBOP/pull/403/) - Adds lychee link checking action.

## Bug Fixes

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You now have everything you need to start making changes!

### B. Writing your code

6. PyBOP 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. PyBOP 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](https://rebeccabarter.com/blog/2023-09-11-from_r_to_python)).
7. Make sure to follow our [coding style guidelines](#coding-style-guidelines).
8. 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.
9. 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).
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![Contributors](https://img.shields.io/github/contributors/pybop-team/PyBOP)](https://github.com/pybop-team/PyBOP/graphs/contributors)
[![Last Commit](https://img.shields.io/github/last-commit/pybop-team/PyBOP/develop?color=purple)](https://github.com/pybop-team/PyBOP/commits/develop)
[![Python Versions from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2Fpybop-team%2FPyBOP%2Fdevelop%2Fpyproject.toml&label=Python)](https://pypi.org/project/pybop/)
[![Forks](https://img.shields.io/github/forks/pybop-team/PyBOP?style=flat)](https://github.com/pybop-team/PyBOPe/network/members)
[![Forks](https://img.shields.io/github/forks/pybop-team/PyBOP?style=flat)](https://github.com/pybop-team/PyBOP/network/members)
[![Stars](https://img.shields.io/github/stars/pybop-team/PyBOP?style=flat&color=gold)](https://github.com/pybop-team/PyBOP/stargazers)
[![Codecov](https://codecov.io/gh/pybop-team/PyBOP/branch/develop/graph/badge.svg)](https://codecov.io/gh/pybop-team/PyBOP)
[![Open Issues](https://img.shields.io/github/issues/pybop-team/PyBOP)](https://github.com/pybop-team/PyBOP/issues/)
Expand Down Expand Up @@ -74,7 +74,7 @@ Additional script-based examples can be found in the [examples directory](https:
- [Unscented Kalman filter parameter identification of a SPM](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/spm_UKF.py)
- [Import and export parameters using Faraday's BPX format](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/BPX_spm.py)
- [Maximum a posteriori parameter identification of a SPM](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/BPX_spm.py)
- [Gradient based parameter identification of a SPM](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/spm_adam.py)
- [Gradient based parameter identification of a SPM](https://github.com/pybop-team/PyBOP/blob/develop/examples/scripts/spm_AdamW.py)

### Supported Methods
The table below lists the currently supported [models](https://github.com/pybop-team/PyBOP/tree/develop/pybop/models), [optimisers](https://github.com/pybop-team/PyBOP/tree/develop/pybop/optimisers), and [cost functions](https://github.com/pybop-team/PyBOP/tree/develop/pybop/costs) in PyBOP.
Expand Down
38 changes: 19 additions & 19 deletions examples/notebooks/LG_M50_ECM/1-single-pulse-circuit-model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"source": [
"## LG M50 Single Pulse Parameter Identification\n",
"\n",
"This example presents an experimental parameter identification method for a two-RC circuit model. The data for this notebook is located within the same directory and was obtained from [[1]](https://github.com/WDWidanage/Simscape-Battery-Library/tree/main/Examples/parameterEstimation_TECMD/Data).\n",
"This example presents an experimental parameter identification method for a two-RC circuit model. The data for this notebook is located within the same directory and was obtained from WDWidanage/Simscape-Battery-Library [[1]](https://github.com/WDWidanage/Simscape-Battery-Library/tree/a3842b91b3ccda006bc9be5d59c8bcbd167ceef7/Examples/parameterEstimation_TECMD/Data).\n",
"\n",
"\n",
"### Setting up the Environment\n",
Expand Down Expand Up @@ -261,7 +261,7 @@
{
"type": "scatter",
"x": [
0.0,
0,
0.01800000004004687,
0.12100000004284084,
0.25100000004749745,
Expand Down Expand Up @@ -571,7 +571,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -607,7 +607,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand All @@ -631,7 +631,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -667,7 +667,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand All @@ -682,7 +682,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -718,7 +718,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand All @@ -745,7 +745,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -781,7 +781,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand All @@ -796,7 +796,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -832,7 +832,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand Down Expand Up @@ -977,7 +977,7 @@
},
"colorscale": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -1013,7 +1013,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
Expand Down Expand Up @@ -1104,7 +1104,7 @@
],
"sequential": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -1140,13 +1140,13 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
],
"sequentialminus": [
[
0.0,
0,
"#0d0887"
],
[
Expand Down Expand Up @@ -1182,7 +1182,7 @@
"#fdca26"
],
[
1.0,
1,
"#f0f921"
]
]
Expand Down Expand Up @@ -1888,7 +1888,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.11.7"
}
},
"nbformat": 4,
Expand Down
283 changes: 90 additions & 193 deletions examples/notebooks/pouch_cell_identification.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/notebooks/spm_electrode_design.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"\n",
"NOTE: This is a brittle example, the classes and methods below will be integrated into PyBOP in a future release.\n",
"\n",
"A design optimisation example loosely based on work by L.D. Couto available at https://doi.org/10.1016/j.energy.2022.125966.\n",
"A design optimisation example loosely based on work by L.D. Couto available at [[1]](https://doi.org/10.1016/j.energy.2022.125966).\n",
"\n",
"The target is to maximise the gravimetric energy density over a range of possible design parameter values, including for example:\n",
"\n",
Expand Down Expand Up @@ -396,7 +396,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
"version": "3.11.7"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Homepage = "https://github.com/pybop-team/PyBOP"
Documentation = "https://pybop-docs.readthedocs.io"
Repository = "https://github.com/pybop-team/PyBOP"
Releases = "https://github.com/pybop-team/PyBOP/releases"
Changelog = "https://github.com/pybop-team/PyBOP/CHANGELOG.md"
Changelog = "https://github.com/pybop-team/PyBOP/blob/develop/CHANGELOG.md"

[tool.pytest.ini_options]
addopts = "--showlocals -v -n auto"
Expand Down
Loading