diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..b4bf15ea --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,52 @@ +## Describe your changes + +< Summary of the changes.> + +< Please also include relevant motivation and context. > + +< List any dependencies that are required for this change. > + +## Issue Link + +< Link to the relevant issue or task. > (e.g. `closes #00` or `solves #00`) + +## Type of change + +- [ ] 🐛 Bug fix (non-breaking change that fixes an issue) +- [ ] ✨ New feature (non-breaking change that adds functionality) +- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] 📖 Documentation (Addition or improvements to documentation) + +## Checklist before requesting a review + +- [ ] My branch is up-to-date with the target branch - if not update your fork with the changes from the target branch (use `pull` with `--rebase` option if possible). +- [ ] 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 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) + +## Checklist for reviewers + +Each PR comes with its own improvements and flaws. The reviewer should check the following: +- [ ] the code is readable +- [ ] the code is well tested +- [ ] the code is documented (including return types and parameters) +- [ ] the code is easy to maintain + +## Author checklist after completed review + +- [ ] I have added a line to the CHANGELOG describing this change, in a section + reflecting type of change (add section where missing): + - *added*: when you have added new functionality + - *changed*: when default behaviour of the code has been changed + - *fixes*: when your contribution fixes a bug + +## Checklist for assignee + +- [ ] PR is up to date with the base branch +- [ ] the tests pass +- [ ] author has added an entry to the changelog (and designated the change as *added*, *changed* or *fixed*) +- Once the PR is ready to be merged, squash commits and merge the PR. diff --git a/.github/workflows/ci-pdm-install-and-test-gpu.yml b/.github/workflows/ci-pdm-install-and-test-gpu.yml index f9060361..94e740ce 100644 --- a/.github/workflows/ci-pdm-install-and-test-gpu.yml +++ b/.github/workflows/ci-pdm-install-and-test-gpu.yml @@ -24,17 +24,18 @@ jobs: - name: Create venv run: | + pdm config venv.in_project False + pdm config venv.location /opt/dlami/nvme/venv pdm venv create --with-pip - pdm use --venv in-project - name: Install torch (GPU CUDA 12.1) run: | - python -m pip install torch --index-url https://download.pytorch.org/whl/cu121 + pdm run python -m pip install torch --index-url https://download.pytorch.org/whl/cu121 - name: Print and check torch version run: | - python -c "import torch; print(torch.__version__)" - python -c "import torch; assert not torch.__version__.endswith('+cpu')" + pdm run python -c "import torch; print(torch.__version__)" + pdm run python -c "import torch; assert not torch.__version__.endswith('+cpu')" - name: Install package (including dev dependencies) run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 34a8e0e4..5d2d3410 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [\#6](https://github.com/joeloskarsson/neural-lam/pull/6), [\#8](https://github.com/joeloskarsson/neural-lam/pull/8) @sadamov, @joeloskarsson +- added github pull-request template to ease contribution and review process + [\#53](https://github.com/mllam/neural-lam/pull/53), @leifdenby + +- ci/cd setup for running both CPU and GPU-based testing both with pdm and pip based installs [\#37](https://github.com/mllam/neural-lam/pull/37), @khintz, @leifdenby + ### Changed Optional multi-core/GPU support for statistics calculation in `create_parameter_weights.py` @@ -85,6 +90,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [\#52](https://github.com/mllam/neural-lam/pull/52) @joeloskarsson +- Cap numpy version to < 2.0.0 + [\#68](https://github.com/mllam/neural-lam/pull/68) + @joeloskarsson + ## [v0.1.0](https://github.com/joeloskarsson/neural-lam/releases/tag/v0.1.0) First tagged release of `neural-lam`, matching Oskarsson et al 2023 publication diff --git a/README.md b/README.md index 8d5d2c5b..81ec2766 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ ![Linting](https://github.com/mllam/neural-lam/actions/workflows/pre-commit.yml/badge.svg?branch=main) -![Automatic tests](https://github.com/mllam/neural-lam/actions/workflows/run_tests.yml/badge.svg?branch=main) +[![test (pdm install, gpu)](https://github.com/mllam/neural-lam/actions/workflows/ci-pdm-install-and-test-gpu.yml/badge.svg)](https://github.com/mllam/neural-lam/actions/workflows/ci-pdm-install-and-test-gpu.yml) +[![test (pdm install, cpu)](https://github.com/mllam/neural-lam/actions/workflows/ci-pdm-install-and-test-cpu.yml/badge.svg)](https://github.com/mllam/neural-lam/actions/workflows/ci-pdm-install-and-test-cpu.yml)
@@ -58,27 +59,35 @@ Below follows instructions on how to use Neural-LAM to train and evaluate models
## Installation
-The dependencies in `neural-lam` is handled with [pdm](https://pdm.fming.dev/), but you can still install `neural-lam` directly with pip if you prefer. The benefits of using `pdm` are that [pyproject.toml](pyproject.toml) is automatically updated when you add/remove dependencies (with `pdm add