Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#92)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.6 → v0.3.2](astral-sh/ruff-pre-commit@v0.1.6...v0.3.2)
- [github.com/psf/black: 23.11.0 → 24.2.0](psf/black@23.11.0...24.2.0)
- [github.com/pre-commit/mirrors-prettier: v3.1.0 → v4.0.0-alpha.8](pre-commit/mirrors-prettier@v3.1.0...v4.0.0-alpha.8)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update .ruff.toml

* Update .ruff.toml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jacob Bieker <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and jacobbieker authored Mar 14, 2024
1 parent 967cf56 commit bfdea8f
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ repos:
# python code formatting/linting
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.1.6"
rev: "v0.3.2"
hooks:
- id: ruff
args: [--fix]
- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.2.0
hooks:
- id: black
args: [--line-length, "100"]
# yaml formatting
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types: [yaml]
5 changes: 1 addition & 4 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
target-version = "py311"
fix = false
# Group violations by containing file.
format = "github"
output-format = "github"
ignore-init-module-imports = true

[format]
docstring-code-format = true

[mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
Expand Down
1 change: 1 addition & 0 deletions graph_weather/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
"""Main import for the complete models"""

from .models.analysis import GraphWeatherAssimilator
from .models.forecast import GraphWeatherForecaster
1 change: 1 addition & 0 deletions graph_weather/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Models"""

from .layers.assimilator_decoder import AssimilatorDecoder
from .layers.assimilator_encoder import AssimilatorEncoder
from .layers.decoder import Decoder
Expand Down
1 change: 1 addition & 0 deletions graph_weather/models/analysis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Model for forecasting weather from NWP states"""

import torch
from huggingface_hub import PyTorchModelHubMixin

Expand Down
1 change: 1 addition & 0 deletions graph_weather/models/forecast.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Model for forecasting weather from NWP states"""

from typing import Optional

import torch
Expand Down
1 change: 1 addition & 0 deletions graph_weather/models/layers/assimilator_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
more complex dynamics)
"""

import einops
import h3
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions graph_weather/models/layers/assimilator_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"""

from typing import Tuple

import einops
Expand Down
1 change: 1 addition & 0 deletions graph_weather/models/layers/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
more complex dynamics)
"""

import torch

from graph_weather.models.layers.assimilator_decoder import AssimilatorDecoder
Expand Down
1 change: 1 addition & 0 deletions graph_weather/models/layers/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"""

from typing import Tuple

import einops
Expand Down
1 change: 1 addition & 0 deletions graph_weather/models/layers/graph_net_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
This code is taken from https://github.com/CCSI-Toolset/MGN which is available under the
US Government License
"""

from typing import Optional, Tuple

import torch
Expand Down
1 change: 1 addition & 0 deletions graph_weather/models/layers/processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
and its immediate neighbors. There are residual connections between each round of processing.
"""

import torch

from graph_weather.models.layers.graph_net_block import GraphProcessor
Expand Down
1 change: 1 addition & 0 deletions graph_weather/models/losses.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Weather loss functions"""

import numpy as np
import torch

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Setup"""

from pathlib import Path

from setuptools import find_packages, setup
Expand Down
1 change: 1 addition & 0 deletions train/pl_graph_weather.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""PyTorch Lightning training script for the weather forecasting model"""

import click
import datasets
import numpy as np
Expand Down
1 change: 1 addition & 0 deletions train/run_fulll.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Training script for training the weather forecasting model"""

import json
import os
import sys
Expand Down

0 comments on commit bfdea8f

Please sign in to comment.