Skip to content
Open
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
3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
- [ ] I have performed a self-review of my code
- [ ] For any new/modified functions/classes I have added docstrings that clearly describe its purpose, expected inputs and returned values
- [ ] I have placed in-line comments to clarify the intent of any hard-to-understand passages of my code
- [ ] I have updated the [README](README.MD) to cover introduced code changes
- [ ] I have updated the [README](../README.md) to cover introduced code changes
- [ ] If this PR changes contributor workflow, I've updated CONTRIBUTING.md / AGENTS.md
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have given the PR a name that clearly describes the change, written in imperative form ([context](https://www.gitkraken.com/learn/git/best-practices/git-commit-message#using-imperative-verb-form)).
- [ ] I have requested a reviewer and an assignee (assignee is responsible for merging). This applies only if you have write access to the repo, otherwise feel free to tag a maintainer to add a reviewer and assignee.
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,14 @@ repos:
- id: codespell
description: Check for spelling errors

- repo: https://github.com/lycheeverse/lychee
rev: lychee-v0.24.2
hooks:
- id: lychee
description: Check Markdown links
args: ["--config", "lychee.toml"]
types: [markdown]

- repo: https://github.com/psf/black
rev: 25.11.0
hooks:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Maintenance

- Add a lychee pre-commit hook for Markdown links and a PR-template reminder to keep contributor workflow docs current [#655](https://github.com/mllam/neural-lam/issues/655) @beanscg

- Add comprehensive type hints to GraphLAM in `neural_lam/models/step_predictors/graph/graph_lam.py` [\#669](https://github.com/mllam/neural-lam/pull/669) @GiGiKoneti

- Add comprehensive type hints to ARForecaster in `neural_lam/models/forecasters/autoregressive.py` [\#663](https://github.com/mllam/neural-lam/pull/663) @GiGiKoneti
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ in neural-lam, are done in a separate package called
[mllam-data-prep](https://github.com/mllam/mllam-data-prep) rather than in
neural-lam itself.
Specifically, the `mllam-data-prep` datastore configuration (for example
[danra.datastore.yaml](tests/datastore_examples/mdp/danra.datastore.yaml))
[danra.datastore.yaml](tests/datastore_examples/mdp/danra_100m_winds/danra.datastore.yaml))
specifies a) what source datasets to read from, b) what variables to select, c)
what transformations of dimensions and variables to make, d) what statistics to
calculate (for normalisation) and e) how to split the data into training,
Expand Down
8 changes: 8 additions & 0 deletions lychee.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
include_fragments = "full"
timeout = 20

exclude = [
"^https://join\\.slack\\.com/t/ml-lam/shared_invite/",
"^https://kutt\\.to/mllam$",
"^https://pyg\\.org/?$",
]
Comment on lines +1 to +8

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two small asks here.

Could we move this to .github/lychee.toml to keep the repo root tidy, and update the pre-commit --config path to match?

And on speed: lychee is the slowest hook, almost all of it CHANGELOG.md, where 142 of 199 links are mllam/neural-lam/(pull|issues)/N self-references re-checked on every PR. They are auto-generated and always resolve, so I suggest to exclude them. That takes CHANGELOG from ~15s to ~0.4s:

Suggested change
include_fragments = "full"
timeout = 20
exclude = [
"^https://join\\.slack\\.com/t/ml-lam/shared_invite/",
"^https://kutt\\.to/mllam$",
"^https://pyg\\.org/?$",
]
include_fragments = "full"
timeout = 20
exclude = [
"^https://join\\.slack\\.com/t/ml-lam/shared_invite/",
"^https://kutt\\.to/mllam$",
"^https://pyg\\.org/?$",
"^https://github\\.com/mllam/neural-lam/(issues|pull)/\\d+/?$",
]

Loading