Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
SF-N committed Dec 30, 2024
2 parents 7b39f2a + 77cad7c commit 4de666e
Show file tree
Hide file tree
Showing 221 changed files with 11,665 additions and 9,851 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
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
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
}
]
}
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,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.7.2
rev: v0.8.2
##[[[end]]]
hooks:
# Run the linter.
Expand Down Expand Up @@ -97,22 +96,23 @@ repos:
- boltons==24.1.0
- cached-property==2.0.1
- click==8.1.7
- cmake==3.30.5
- 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
- filelock==3.16.1
- frozendict==2.4.6
- gridtools-cpp==2.3.6
- gridtools-cpp==2.3.8
- importlib-resources==6.4.5
- jinja2==3.1.4
- lark==1.2.2
- mako==1.3.6
- nanobind==2.2.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
- packaging==24.2
- pybind11==2.13.6
- setuptools==75.3.0
- tabulate==0.9.0
Expand Down
10 changes: 6 additions & 4 deletions ci/base.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ARG CUDA_VERSION=12.5.0
FROM docker.io/nvidia/cuda:${CUDA_VERSION}-devel-ubuntu20.04
ARG CUDA_VERSION=12.6.2
ARG UBUNTU_VERSION=22.04
FROM docker.io/nvidia/cuda:${CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION}
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8

Expand All @@ -22,7 +23,7 @@ RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends \
tk-dev \
libffi-dev \
liblzma-dev \
python-openssl \
$( [ "${UBUNTU_VERSION}" = "20.04" ] && echo "python-openssl" || echo "python3-openssl" ) \
libreadline-dev \
git \
rustc \
Expand Down Expand Up @@ -55,4 +56,5 @@ RUN pyenv update && \
ENV PATH="/root/.pyenv/shims:${PATH}"

ARG CUPY_PACKAGE=cupy-cuda12x
RUN pip install --upgrade pip setuptools wheel tox ${CUPY_PACKAGE}==12.3.0
ARG CUPY_VERSION=13.3.0
RUN pip install --upgrade pip setuptools wheel tox ${CUPY_PACKAGE}==${CUPY_VERSION}
10 changes: 7 additions & 3 deletions ci/cscs-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,21 @@ stages:
DOCKERFILE: ci/base.Dockerfile
# change to 'always' if you want to rebuild, even if target tag exists already (if-not-exists is the default, i.e. we could also skip the variable)
CSCS_REBUILD_POLICY: if-not-exists
DOCKER_BUILD_ARGS: '["CUDA_VERSION=$CUDA_VERSION", "CUPY_PACKAGE=$CUPY_PACKAGE", "PYVERSION=$PYVERSION", "CI_PROJECT_DIR=$CI_PROJECT_DIR"]'
DOCKER_BUILD_ARGS: '["CUDA_VERSION=$CUDA_VERSION", "CUPY_PACKAGE=$CUPY_PACKAGE", "CUPY_VERSION=$CUPY_VERSION", "UBUNTU_VERSION=$UBUNTU_VERSION", "PYVERSION=$PYVERSION", "CI_PROJECT_DIR=$CI_PROJECT_DIR"]'
.build_baseimage_x86_64:
extends: [.container-builder-cscs-zen2, .build_baseimage]
variables:
CUDA_VERSION: 11.2.2
CUDA_VERSION: 11.4.3
CUPY_PACKAGE: cupy-cuda11x
CUPY_VERSION: 12.3.0 # latest version that supports cuda 11
UBUNTU_VERSION: 20.04 # 22.04 hangs on daint in some tests for unknown reasons.
.build_baseimage_aarch64:
extends: [.container-builder-cscs-gh200, .build_baseimage]
variables:
CUDA_VERSION: 12.4.1
CUDA_VERSION: 12.6.2
CUPY_PACKAGE: cupy-cuda12x
CUPY_VERSION: 13.3.0
UBUNTU_VERSION: 22.04
# TODO: enable CI job when Todi is back in operational state
when: manual

Expand Down
Loading

0 comments on commit 4de666e

Please sign in to comment.