Skip to content

Commit

Permalink
Merge branch 'topic/default/pdm-nox' into 'branch/default'
Browse files Browse the repository at this point in the history
PDM, Nox, Meson, doc, ...

See merge request fluiddyn/fluidimage!59
  • Loading branch information
paugier committed Feb 16, 2024
2 parents d92a117 + 62b4e49 commit 57b73f9
Show file tree
Hide file tree
Showing 205 changed files with 5,627 additions and 2,436 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
ignore = E501,E225,E226,E303,E201,E202,E203,W503
9 changes: 9 additions & 0 deletions .gitattributes
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
44 changes: 44 additions & 0 deletions .github/workflows/ci-linux.yaml
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)
51 changes: 0 additions & 51 deletions .github/workflows/ci.yaml

This file was deleted.

119 changes: 113 additions & 6 deletions .gitlab-ci.yml
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
13 changes: 9 additions & 4 deletions .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ fluidimage/_hg_rev.py

**/.vscode/*

venv/*
.nox/*
.venv
.nox

.pdm-python

*.swp
*.swo
Expand All @@ -21,6 +23,8 @@ venv/*

*build/*
**/__pythran__
**/__python__
**/__numba__
.tox/*

*.so
Expand Down Expand Up @@ -59,7 +63,8 @@ doc/ipynb/*.nbconvert.ipynb
doc/ipynb/**.png
doc/examples/oar_launcher*
doc/examples/topo.dot
*/.ipynb_checkpoints/*
**/.ipynb_checkpoints/*
doc/_jupyter_cache

fluidimage/post_proc/*.h5

Expand All @@ -69,7 +74,7 @@ image_samples/*/*.piv
image_samples/*/*/log_*.txt
image_samples/*/*/params_*.xml
image_samples/*/Images.bench
image_samples/4th_PIV-Challenge_Case_E/E_Calibration_Images/Camera_0*/calib*.npy
image_samples/4th_PIV-Challenge_Case_E/E_Calibration_Images/Camera_0*/calib*.npz
image_samples/Milestone/Images_many*

image_samples/Karman/Images.civ/*
Expand Down
21 changes: 9 additions & 12 deletions .readthedocs.yml
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
1 change: 1 addition & 0 deletions AUTHORS.rst → AUTHORS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Main contributors

The main contributors are:

Expand Down
42 changes: 19 additions & 23 deletions CHANGES.rst → CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,41 @@
# Release notes

0.1.5_ (2023-02-15)
-------------------
See also the
[unreleased changes](https://foss.heptapod.net/fluiddyn/fluidimage/-/compare/0.1.5...branch%2Fdefault).

# [0.1.5] (2023-02-15)

- Requires Python 3.9
- Improves legend, warnings, error log and documentation

0.1.4_ (2022-12-13)
-------------------
# [0.1.4] (2022-12-13)

- Support Python 3.10
- Avoid a bug with pyfftw 0.13

0.1.3_ (2021-09-29)
-------------------
# [0.1.3] (2021-09-29)

- Many bugfixes!
- Improve VectorFieldOnGrid and ArrayOfVectorFieldsOnGrid
- UVmat compatibility
- Fix incompatibility OpenCV and PyQt5

0.1.2_ (2019-06-05)
-------------------
# [0.1.2] (2019-06-05)

- Bugfix install Windows

0.1.1_ (2019-05-23)
-------------------
# [0.1.1] (2019-05-23)

- Optical flow computation
- Bugfixes + internal code improvements

0.1.0 (2018-10-03)
------------------
# 0.1.0 (2018-10-03)

- New topologies and executors with Trio!
- Much better coverage & many bugfixes!
- Better surface tracking

0.0.3 (2018-08-29)
------------------
# 0.0.3 (2018-08-29)

- Requirement Python >= 3.6
- Surface tracking
Expand All @@ -49,22 +46,21 @@
- fluidimslideshow-pg and fluidimviewer-pg (based on PyQtgraph)
- OpenCV backend for preprocessing

0.0.2 (2017-04-13)
------------------
# 0.0.2 (2017-04-13)

- Bug fixes and documentation changes.
- Continuous integration (python 2.7 and 3.5) with bitbucket pipelines
(`coverage ~40% <https://codecov.io/gh/fluiddyn/fluidimage>`_)
([coverage ~40%](https://codecov.io/gh/fluiddyn/fluidimage))
- Preprocessing of images.
- First simple GUI (`fluidimviewer` and `fluidimlauncher`).

0.0.1b (2016-05-31)
-------------------
# 0.0.1b (2016-05-31)

- Topology and waiting queues classes to run work in parallel.
- PIV work and topology (multipass, different correlation methods).

.. _0.1.3: https://foss.heptapod.net/fluiddyn/fluidimage/-/compare/0.1.3...0.1.4
.. _0.1.3: https://foss.heptapod.net/fluiddyn/fluidimage/-/compare/0.1.2...0.1.3
.. _0.1.2: https://foss.heptapod.net/fluiddyn/fluidimage/-/compare/0.1.1...0.1.2
.. _0.1.1: https://foss.heptapod.net/fluiddyn/fluidimage/-/compare/0.1.0...0.1.1
[0.1.1]: https://foss.heptapod.net/fluiddyn/fluidimage/-/compare/0.1.0...0.1.1
[0.1.2]: https://foss.heptapod.net/fluiddyn/fluidimage/-/compare/0.1.1...0.1.2
[0.1.3]: https://foss.heptapod.net/fluiddyn/fluidimage/-/compare/0.1.2...0.1.3
[0.1.4]: https://foss.heptapod.net/fluiddyn/fluidimage/-/compare/0.1.3...0.1.4
[0.1.5]: https://foss.heptapod.net/fluiddyn/fluidimage/-/compare/0.1.4...0.1.5
Loading

0 comments on commit 57b73f9

Please sign in to comment.