Skip to content

Commit

Permalink
Merge pull request #11 from tourniert/add_github_workflows
Browse files Browse the repository at this point in the history
Add GitHub workflow
  • Loading branch information
colon3ltocard authored Sep 6, 2024
2 parents bc0cdfd + a098da7 commit 78f971b
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

permissions:
contents: read

jobs:
tests:
env:
PYTHONPATH: '.'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements_dev.txt
- name: Lint with ruff
run: |
ruff check py4cast
- name: Integration Test with pytest
run: |
coverage run -p -m pytest tests/
coverage run -p bin/train.py --model halfunet --model_conf config/models/halfunet32.json --dataset dummy --epochs 1 --batch_size 1 --num_pred_steps_train 1 --limit_train_batches 1
coverage run -p bin/train.py --model hilam --dataset dummy --epochs 1 --batch_size 1 --num_pred_steps_train 1 --limit_train_batches 1
coverage combine
coverage report --fail-under=60
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# PY4CAST

![Unit Tests](https://github.com/meteofrance/py4cast/actions/workflows/tests.yml/badge.svg)

This project, built using **PyTorch** and **PyTorch-lightning**, is designed to train a variety of Neural Network architectures (GNNs, CNNs, Vision Transformers, ...) on various weather forecasting datasets. This is a **Work in Progress**, intended to share ideas and design concepts with partners.

Developped at Météo-France by **DSM/AI Lab** and **CNRM/GMAP/PREV**.
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ einops==0.7.0
torchinfo==1.8.0
tabulate==0.9.0
pytest==8.1.1
coverage==7.6.1
onnx==1.16.1
onnxruntime==1.18.1
onnxruntime-gpu==1.18.1
Expand Down

0 comments on commit 78f971b

Please sign in to comment.