diff --git a/.github/workflows/links.yml b/.github/workflows/links.yml deleted file mode 100644 index 7bc23a4..0000000 --- a/.github/workflows/links.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Check URLs with Lychee - -on: - push: - branches: - - main - pull_request: - schedule: - - cron: "0 3 * * *" - -jobs: - Check-URLs: - runs-on: ubuntu-latest - steps: - - - name: Restore Lychee cache - uses: actions/cache@v4 - with: - path: .lycheecache - key: cache-lychee-${{ github.sha }} - restore-keys: cache-lychee- - - - uses: actions/checkout@v4 - - - name: Link checker - id: lychee - uses: lycheeverse/lychee-action@f796c8b7d468feb9b8c0a46da3fac0af6874d374 - with: - # Same as those in the PyBaMM repository - args: | - --cache - --max-cache-age 3d . - --verbose - --no-progress - --timeout 10 - --max-retries 5 - --skip-missing - --exclude-loopback - --exclude https://twitter.com/* - --exclude "https://doi\.org|www.sciencedirect\.com/*" - --exclude https://plausible.io/pybamm.org - --accept 200,429,999 - format: markdown - jobSummary: true - fail: true - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - - # TBD: automatically open an issue if any links fail diff --git a/.gitignore b/.gitignore index e858068..7d4281c 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,6 @@ __pycache__/ # env Folder env/ + +# Lychee pre-commit hook +.lycheecache diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6adaddb..6495aab 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,29 +7,63 @@ ci: # Standard hooks repos: -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - - id: check-added-large-files - - id: mixed-line-ending + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files + - id: mixed-line-ending + # Lychee: check links + - repo: https://github.com/lycheeverse/lychee.git + rev: v0.15.1 + hooks: + - id: lychee + pass_filenames: false + args: + - . + - --verbose + - --no-progress + - --timeout + - "10" + - --max-retries + - "5" + - --skip-missing + - --exclude-loopback + - --exclude + - https://twitter.com/* + - --exclude + - https://doi\.org|www.sciencedirect\.com/* + - --exclude + - https://plausible.io/pybamm.org + # Exclude the theme submodule and the built files. The latter are + # generated from the build and we don't bother with them because + # their links are either not relevant or are already checked. + - --exclude-path + - themes/ + - --exclude-path + - static/ + - --exclude-path + - public/ + - --exclude-path + - resources/ + - --accept + - 200,429,999 # Python files -- repo: https://github.com/astral-sh/ruff-pre-commit + - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.8.4 hooks: - - id: ruff + - id: ruff args: ["--fix", "--show-fixes"] - -# Spelling errors and typos -- repo: https://github.com/codespell-project/codespell + # Spelling errors and typos + - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: - - id: codespell + - id: codespell exclude: content/gsoc/2024/ankit-meda.md args: - "-Lrecuse,Meda" diff --git a/README.md b/README.md index 8532bf9..d3c9004 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ # pybamm.org [![Netlify](https://api.netlify.com/api/v1/badges/c4c60d47-1de1-4d0a-8a25-726d3cf100c8/deploy-status)](https://app.netlify.com/sites/pybamm-developer-preview/deploys) -[![Links](https://github.com/pybamm-team/pybamm.org/actions/workflows/links.yml/badge.svg)](https://github.com/pybamm-team/pybamm.org/actions/workflows/links.yml) [![pre-commit.ci](https://results.pre-commit.ci/badge/github/pybamm-team/pybamm.org/main.svg)](https://results.pre-commit.ci/latest/github/pybamm-team/pybamm.org/main) [![Gitpod](https://img.shields.io/badge/open%20in-Gitpod-blue?logo=gitpod)](https://gitpod.io/#https://github.com/pybamm-team/pybamm.org/) diff --git a/content/about/index.md b/content/about/index.md index 41ab7e0..2338d75 100644 --- a/content/about/index.md +++ b/content/about/index.md @@ -26,7 +26,7 @@ donations and how you can support, please see the [Donate](/donate/) page. [Ionworks](https://ionworks.com/) is a company founded by members of the PyBaMM core development team to ensure [PyBaMM's long-term success](https://ionworks.com/blog/our-relationship-with-pybamm). Ionworks provides support and custom feature development for PyBaMM, as well as software to make modeling easier and faster. For companies who want to leverage the power, flexibility, and openness of the Python ecosystem for their battery simulation needs, Ionworks is the go-to partner. -[Contact Ionworks](https://ionworks.com/contact-us) to find out more. +[Contact Ionworks](https://ionworks.com/) to find out more. {{< figure >}} src = '/images/logos/ionworks-logo.png' diff --git a/content/community.md b/content/community.md index 8acf9a5..dee6cff 100644 --- a/content/community.md +++ b/content/community.md @@ -34,7 +34,7 @@ For general inquiries, other than topics listed above, you can contact us by ema [Ionworks](https://ionworks.com/) is a company founded by members of the PyBaMM core development team to ensure [PyBaMM's long-term success](https://ionworks.com/blog/our-relationship-with-pybamm). Ionworks provides support and custom feature development for PyBaMM, as well as software to make modeling easier and faster. For companies who want to leverage the power, flexibility, and openness of the Python ecosystem for their battery simulation needs, Ionworks is the go-to partner. -[Contact Ionworks](https://ionworks.com/contact-us) to find out more. +[Contact Ionworks](mailto:info@ionworks.com) to find out more. ## Governance diff --git a/content/learn.md b/content/learn.md index a3a2894..0a72fac 100644 --- a/content/learn.md +++ b/content/learn.md @@ -50,4 +50,4 @@ We regularly hold PyBaMM workshops. You can find a list of the workshops we have ## Get help -You can get help by posting questions on the [PyBaMM Slack channels](https://pybamm.org/slack/) or preferably in [GitHub discussions](https://github.com/pybamm-team/PyBaMM/discussions). You can also get paid support from [Ionworks](https://ionworks.com/contact-us). +You can get help by posting questions on the [PyBaMM Slack channels](https://pybamm.org/slack/) or preferably in [GitHub discussions](https://github.com/pybamm-team/PyBaMM/discussions). You can also get paid support from [Ionworks](https://ionworks.com/).