-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/default/pdm-nox' into 'branch/default'
PDM, Nox, Meson, doc, ... See merge request fluiddyn/fluidimage!59
- Loading branch information
Showing
205 changed files
with
5,627 additions
and
2,436 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flake8] | ||
ignore = E501,E225,E226,E303,E201,E202,E203,W503 |
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,9 @@ | ||
# GitHub syntax highlighting | ||
pixi.lock linguist-language=YAML | ||
|
||
.gitattributes export-ignore | ||
.hgignore export-ignore | ||
|
||
old export-ignore | ||
./try export-ignore | ||
./bench export-ignore |
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,44 @@ | ||
name: CI Linux | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11"] | ||
|
||
steps: | ||
- name: Install apt packages | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install xvfb x11-utils libxkbcommon-x11-0 libxcb-icccm4 \ | ||
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \ | ||
libxcb-xinerama0 libxcb-xfixes0 xdotool | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pdm nox | ||
- name: Test with nox | ||
run: | | ||
nox -s test | ||
- name: Upload coverage to codecov | ||
if: ${{ success() }} | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
fail_ci_if_error: false # optional (default = false) | ||
verbose: true # optional (default = false) |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,10 +1,117 @@ | ||
stages: | ||
# - pixi | ||
- image | ||
- lint | ||
- test | ||
- doc | ||
- build | ||
|
||
variables: | ||
CODECOV_TOKEN: 0ac60028-17ba-4383-b4ad-b5ba5ca35f3d | ||
COVERAGE_DIR: .coverage_$CI_COMMIT_SHA | ||
DOCKER_IMAGE_PATH: registry.heptapod.net:443/fluiddyn/fluidimage/ci/default | ||
|
||
image: $DOCKER_IMAGE_PATH:stable | ||
|
||
# ugly workaround https://gitlab.com/gitlab-org/gitlab/-/issues/370052#note_1207556577 | ||
workflow: | ||
rules: | ||
- if: $CI_PIPELINE_SOURCE == "merge_request_event" | ||
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS | ||
when: never | ||
- if: $CI_COMMIT_BRANCH | ||
- if: $CI_COMMIT_TAG | ||
|
||
|
||
# Build an image for the other tasks; this should be a scheduled job, as | ||
# it is quite unnecessary to run on every invocation. | ||
image:build: | ||
stage: image | ||
needs: [] | ||
tags: | ||
- container-registry-push | ||
rules: | ||
- if: '$CI_PIPELINE_SOURCE == "schedule"' | ||
- if: '$CI_BUILD_IMAGES == "1"' | ||
image: | ||
name: gcr.io/kaniko-project/executor:debug | ||
entrypoint: [ "" ] | ||
before_script: | ||
- "" | ||
script: | ||
- | | ||
cat > /kaniko/.docker/config.json <<EOF | ||
{ | ||
"auths": { | ||
"$CI_REGISTRY": { | ||
"username": "$CI_REGISTRY_USER", | ||
"password": "$CI_REGISTRY_PASSWORD" | ||
} | ||
} | ||
} | ||
EOF | ||
- > | ||
/kaniko/executor --context $CI_PROJECT_DIR | ||
--dockerfile $CI_PROJECT_DIR/docker/Dockerfile | ||
--single-snapshot | ||
--cleanup | ||
--destination $DOCKER_IMAGE_PATH:stable | ||
validate_code: | ||
stage: lint | ||
needs: | ||
- job: "image:build" | ||
optional: true | ||
script: | ||
- nox -s validate_code | ||
|
||
|
||
tests: | ||
image: fluiddyn/python3-stable:testing | ||
stage: test | ||
needs: | ||
- job: "image:build" | ||
optional: true | ||
script: | ||
- xvfb-run nox -s test-cov | ||
|
||
|
||
pages: | ||
stage: doc | ||
needs: | ||
- job: "image:build" | ||
optional: true | ||
variables: | ||
FLUIDFFT_TRANSONIC_BACKEND: "python" | ||
script: | ||
- xvfb-run --auto-servernum nox -s doc | ||
- mkdir -p public/$CI_COMMIT_REF_NAME | ||
- rsync -rvc --delete doc/_build/html/* public/$CI_COMMIT_REF_NAME/ | ||
# This directory can become too large leading to error. | ||
# It can be purged with the botton "Clear runner caches" | ||
# in https://foss.heptapod.net/fluiddyn/fluidimage/-/pipelines | ||
- ls public | ||
- echo "CI_COMMIT_REF_NAME="$CI_COMMIT_REF_NAME | ||
- echo See https://fluiddyn.pages.heptapod.net/fluidimage/$CI_COMMIT_REF_NAME | ||
artifacts: | ||
name: "$CI_COMMIT_REF_NAME" | ||
paths: | ||
- public | ||
expire_in: 5 days | ||
when: always | ||
|
||
|
||
build:package: | ||
stage: build | ||
before_script: | ||
- pip install build twine | ||
script: | ||
- python -m venv venv | ||
- source venv/bin/activate | ||
- pip install -U pip nox | ||
- xvfb-run nox -s tests-cov | ||
- rm -rf dist | ||
- python -m build -s | ||
- ls dist | ||
- twine check --strict dist/* | ||
needs: [] | ||
artifacts: | ||
when: always | ||
paths: | ||
- dist | ||
expire_in: 24 hrs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "3.11" | ||
apt_packages: | ||
- graphviz | ||
jobs: | ||
post_create_environment: | ||
- pip install pdm pip -U | ||
post_install: | ||
- pdm use -f $READTHEDOCS_VIRTUALENV_PATH | ||
- pdm sync -G doc -G opencv --no-self | ||
- pip install . -C setup-args=-Dtransonic-backend=python | ||
|
||
sphinx: | ||
configuration: doc/conf.py | ||
|
||
python: | ||
system_packages: true | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- doc |
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Main contributors | ||
|
||
The main contributors are: | ||
|
||
|
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.