-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
164 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,3 +167,4 @@ cython_debug/ | |
?.* | ||
*.png | ||
*.pny | ||
_version.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
repos: | ||
|
||
# Empty notebookds | ||
- repo: local | ||
hooks: | ||
- id: clear-notebooks-output | ||
name: clear-notebooks-output | ||
files: tools/.*\.ipynb$ | ||
stages: [commit] | ||
language: python | ||
entry: jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace | ||
additional_dependencies: [jupyter] | ||
|
||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-yaml # Check YAML files for syntax errors only | ||
args: [--unsafe, --allow-multiple-documents] | ||
- id: debug-statements # Check for debugger imports and py37+ breakpoint() | ||
- id: end-of-file-fixer # Ensure files end in a newline | ||
- id: trailing-whitespace # Trailing whitespace checker | ||
- id: no-commit-to-branch # Prevent committing to main / master | ||
- id: check-added-large-files # Check for large files added to git | ||
- id: check-merge-conflict # Check for files that contain merge conflict | ||
|
||
- repo: https://github.com/psf/black-pre-commit-mirror | ||
rev: 24.1.1 | ||
hooks: | ||
- id: black | ||
args: [--line-length=120] | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
args: | ||
- -l 120 | ||
- --force-single-line-imports | ||
- --profile black | ||
|
||
|
||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.3.0 | ||
hooks: | ||
- id: ruff | ||
exclude: '(dev/.*|.*_)\.py$' | ||
args: | ||
- --line-length=120 | ||
- --fix | ||
- --exit-non-zero-on-fix | ||
- --preview | ||
|
||
- repo: https://github.com/sphinx-contrib/sphinx-lint | ||
rev: v0.9.1 | ||
hooks: | ||
- id: sphinx-lint | ||
|
||
# For now, we use it. But it does not support a lot of sphinx features | ||
- repo: https://github.com/dzhu/rstfmt | ||
rev: v0.0.14 | ||
hooks: | ||
- id: rstfmt | ||
|
||
- repo: https://github.com/b8raoult/pre-commit-docconvert | ||
rev: "0.1.4" | ||
hooks: | ||
- id: docconvert | ||
args: ["numpy"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#!/usr/bin/env python | ||
# (C) Copyright 2024 ECMWF. | ||
# | ||
# This software is licensed under the terms of the Apache Licence Version 2.0 | ||
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
# In applying this licence, ECMWF does not waive the privileges and immunities | ||
# granted to it by virtue of its status as an intergovernmental organisation | ||
# nor does it submit to any jurisdiction. | ||
|
||
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ | ||
|
||
[build-system] | ||
requires = [ | ||
"setuptools>=60", | ||
"setuptools-scm>=8", | ||
] | ||
|
||
[project] | ||
name = "ai-models-graphcast" | ||
|
||
description = "An ai-models plugin to run Deepmind's graphcast model" | ||
keywords = [ | ||
"ai", | ||
"tools", | ||
] | ||
|
||
license = { file = "LICENSE" } | ||
authors = [ | ||
{ name = "European Centre for Medium-Range Weather Forecasts (ECMWF)", email = "[email protected]" }, | ||
] | ||
|
||
requires-python = ">=3.10" | ||
|
||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
] | ||
|
||
dynamic = [ | ||
"version", | ||
] | ||
|
||
# JAX requirements are in requirements.txt | ||
|
||
dependencies = [ | ||
"ai-models>=0.4.0", | ||
"dm-tree", | ||
"dm-haiku==0.0.10", | ||
] | ||
|
||
optional-dependencies.dev = [ | ||
"pre-commit", | ||
] | ||
urls.Repository = "https://github.com/ecmwf-lab/ai-models-graphcast" | ||
entry-points."ai_models.model".graphcast = "ai_models_graphcast.model:model" | ||
|
||
[tool.setuptools_scm] | ||
version_file = "src/ai_models_graphcast/_version.py" |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.