Skip to content

Commit

Permalink
Update from main
Browse files Browse the repository at this point in the history
  • Loading branch information
samkellerhals committed Dec 11, 2024
2 parents c68b970 + 9888905 commit c9c5c8e
Show file tree
Hide file tree
Showing 337 changed files with 23,563 additions and 13,695 deletions.
24 changes: 24 additions & 0 deletions .devcontainer/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File (just my code)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "Python: Current File (all)",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
}
]
}
5 changes: 5 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM mcr.microsoft.com/devcontainers/python:1-3.10-bookworm
RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive && apt-get install -y libboost-dev \
&& apt-get clean && rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/*
RUN curl -LsSf https://astral.sh/uv/install.sh | env UV_INSTALL_DIR="/bin" sh
49 changes: 49 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"build": {
"dockerfile": "Dockerfile"
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bash .devcontainer/setup.sh",

"containerEnv": {
"PRE_COMMIT_HOME": "/workspaces/gt4py/.caches/pre-commit"
},

// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"python.formatting.provider": "ruff",
"python.testing.pytestEnabled": true,
"python.defaultInterpreterPath": "/workspaces/gt4py/.venv/bin/python",
"files.insertFinalNewline": true,
"python.terminal.activateEnvironment": true,
"cmake.ignoreCMakeListsMissing": true
},
"extensions": [
"charliermarsh.ruff",
"donjayamanne.githistory",
"github.vscode-github-actions",
"lextudio.restructuredtext",
"ms-python.python",
"ms-vsliveshare.vsliveshare",
"swyddfa.esbonio"
]
}
}
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
10 changes: 10 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

ln -sfn /workspaces/gt4py/.devcontainer/.vscode /workspaces/gt4py/.vscode
uv venv .venv
source .venv/bin/activate
uv pip install -r requirements-dev.txt
uv pip install -e .
uv pip install -i https://test.pypi.org/simple/ atlas4py
pre-commit install --install-hooks
deactivate
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Delete this comment and add a proper description of the changes contained in thi
- test: Adding missing tests or correcting existing tests
<scope>: cartesian | eve | next | storage
# ONLY if changes are limited to a specific subsytem
# ONLY if changes are limited to a specific subsystem
- PR Description:
Expand All @@ -27,7 +27,7 @@ Delete this comment and add a proper description of the changes contained in thi
## Requirements

- [ ] All fixes and/or new features come with corresponding tests.
- [ ] Important design decisions have been documented in the approriate ADR inside the [docs/development/ADRs/](docs/development/ADRs/Index.md) folder.
- [ ] Important design decisions have been documented in the appropriate ADR inside the [docs/development/ADRs/](docs/development/ADRs/Index.md) folder.

If this PR contains code authored by new contributors please make sure:

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: 'pip'
cache-dependency-path: |
**/pyproject.toml
**/constraints.txt
**/requirements-dev.txt
- uses: pre-commit/[email protected].0
- uses: pre-commit/[email protected].1
4 changes: 2 additions & 2 deletions .github/workflows/daily-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install C++ libraries
if: ${{ matrix.os == 'macos-latest' }}
shell: bash
Expand All @@ -42,7 +42,7 @@ jobs:
mv boost_1_76_0/boost boost/include/
echo "BOOST_ROOT=${PWD}/boost" >> $GITHUB_ENV
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
name: Build Python distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install pypa/build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-cartesian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]
tox-factor: [internal, dace]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install boost
shell: bash
run: |
Expand All @@ -40,7 +40,7 @@ jobs:
mv boost_1_76_0/boost boost/include/
echo "BOOST_ROOT=${PWD}/boost" >> $GITHUB_ENV
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-eve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install C++ libraries
if: ${{ matrix.os == 'macos-latest' }}
shell: bash
Expand All @@ -39,7 +39,7 @@ jobs:
run: |
sudo apt install libboost-dev
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,5 +159,5 @@ venv.bak/

### Others ###
.obsidian

coverage.json
.caches
4 changes: 1 addition & 3 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
FROM gitpod/workspace-python
FROM gitpod/workspace-python-3.11
USER root
RUN apt-get update \
&& apt-get install -y libboost-dev \
&& apt-get clean && rm -rf /var/cache/apt/* && rm -rf /var/lib/apt/lists/* && rm -rf /tmp/*
USER gitpod
RUN pyenv install 3.10.2
RUN pyenv global 3.10.2
13 changes: 11 additions & 2 deletions .gitpod/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,28 @@
"configurations": [
{
"name": "Python: Current File (just my code)",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true
},
{
"name": "Python: Current File (all)",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Python: Debug Tests",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"purpose": ["debug-test"],
"console": "integratedTerminal",
"justMyCode": true
}
]
}
43 changes: 25 additions & 18 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ repos:
exclude: tox.ini
- id: pretty-format-toml
args: [--autofix]
exclude: tach.toml
- id: pretty-format-yaml
args: [--autofix, --preserve-quotes, --indent, "2"]

Expand All @@ -33,7 +34,7 @@ repos:
- id: insert-license
exclude: ^\..*$
types: [python]
args: [--comment-style, "|#|", --license-filepath, ./LICENSE_HEADER.txt, --fuzzy-match-generates-todo]
args: [--comment-style, "|#|", --license-filepath, ./HEADER.txt, --fuzzy-match-generates-todo]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand All @@ -42,15 +43,14 @@ repos:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements

- repo: https://github.com/astral-sh/ruff-pre-commit
##[[[cog
## import re
## version = re.search('ruff==([0-9\.]*)', open("constraints.txt").read())[1]
## print(f"rev: v{version}")
##]]]
rev: v0.6.3
rev: v0.8.2
##[[[end]]]
hooks:
# Run the linter.
Expand All @@ -61,15 +61,20 @@ repos:
# Run the formatter.
- id: ruff-format

- repo: https://github.com/gauge-sh/tach-pre-commit
rev: v0.10.7
hooks:
- id: tach

- repo: https://github.com/pre-commit/mirrors-mypy
##[[[cog
## import re
## version = re.search('mypy==([0-9\.]*)', open("constraints.txt").read())[1]
## print(f"#========= FROM constraints.txt: v{version} =========")
##]]]
#========= FROM constraints.txt: v1.11.2 =========
#========= FROM constraints.txt: v1.13.0 =========
##[[[end]]]
rev: v1.11.2 # MUST match version ^^^^ in constraints.txt (if the mirror is up-to-date)
rev: v1.13.0 # MUST match version ^^^^ in constraints.txt (if the mirror is up-to-date)
hooks:
- id: mypy
additional_dependencies: # versions from constraints.txt
Expand All @@ -88,26 +93,28 @@ repos:
- astunparse==1.6.3
- attrs==24.2.0
- black==24.8.0
- boltons==24.0.0
- cached-property==1.5.2
- boltons==24.1.0
- cached-property==2.0.1
- click==8.1.7
- cmake==3.30.2
- cytoolz==0.12.3
- cmake==3.31.1
- cytoolz==1.0.0
- deepdiff==8.0.1
- devtools==0.12.2
- diskcache==5.6.3
- factory-boy==3.3.1
- frozendict==2.4.4
- gridtools-cpp==2.3.4
- importlib-resources==6.4.4
- filelock==3.16.1
- frozendict==2.4.6
- gridtools-cpp==2.3.8
- importlib-resources==6.4.5
- jinja2==3.1.4
- lark==1.2.2
- mako==1.3.5
- nanobind==2.1.0
- ninja==1.11.1.1
- mako==1.3.8
- nanobind==2.4.0
- ninja==1.11.1.2
- numpy==1.24.4
- packaging==24.1
- pybind11==2.13.5
- setuptools==74.1.0
- packaging==24.2
- pybind11==2.13.6
- setuptools==75.3.0
- tabulate==0.9.0
- typing-extensions==4.12.2
- xxhash==3.0.0
Expand Down
3 changes: 2 additions & 1 deletion AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
- Ehrengruber, Till. ETH Zurich - CSCS
- Elbert, Oliver D. NOAA-GFDL
- Faghih-Naini, Sara. ECMWF
- Farabullini, Nicoletta. ETH Zurich - C2SM
- Farabullini, Nicoletta. ETH Zurich - EXCLAIM
- George, Rhea. Allen Institute for AI
- González Paredes, Enrique. ETH Zurich - CSCS
- Gopal, Abishek. ETH Zurich - EXCLAIM
Expand All @@ -24,6 +24,7 @@
- Madonna, Alberto. ETH Zurich - CSCS
- Mariotti, Kean. ETH Zurich - CSCS
- Müller, Christoph. MeteoSwiss
- Müller, Philip. ETH Zurich - CSCS
- Osuna, Carlos. MeteoSwiss
- Paone, Edoardo. ETH Zurich - CSCS
- Röthlin, Matthias. MeteoSwiss
Expand Down
Loading

0 comments on commit c9c5c8e

Please sign in to comment.