From 62b4e49d11bc769ada4b2f41cce4c83f1739a5b7 Mon Sep 17 00:00:00 2001 From: paugier Date: Fri, 16 Feb 2024 10:18:21 +0100 Subject: [PATCH] Finalize PDM/Nox/Meson merge request --- .gitlab-ci.yml | 5 +-- create_meson_files.py | 42 ------------------- docker/Makefile | 2 +- src/fluidimage/calibration/test_calib_cv.py | 1 - src/fluidimage/topologies/surface_tracking.py | 6 +-- try/experimental/topology/piv.py | 6 +-- try/experimental/topology/piv_2.py | 6 +-- try/experimental/topology/socket_asycncio.py | 6 +-- .../topo_old/surface_tracking.py | 6 +-- 9 files changed, 9 insertions(+), 71 deletions(-) delete mode 100644 create_meson_files.py diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 564194f2..114b3d09 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,4 @@ stages: - # - image-pixi # - pixi - image - lint @@ -89,10 +88,10 @@ pages: - 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/fluidsim/-/pipelines + # 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/fluidsim/$CI_COMMIT_REF_NAME + - echo See https://fluiddyn.pages.heptapod.net/fluidimage/$CI_COMMIT_REF_NAME artifacts: name: "$CI_COMMIT_REF_NAME" paths: diff --git a/create_meson_files.py b/create_meson_files.py deleted file mode 100644 index 161435cd..00000000 --- a/create_meson_files.py +++ /dev/null @@ -1,42 +0,0 @@ -from pathlib import Path - - -template = """ -python_sources = [ -{sources} -] - -py.install_sources( - python_sources, - subdir: '{subdir}' -) - -""" - - -def process_directory(path_dir): - - print(f"Process {path_dir}") - - names_py = sorted(path.name for path in path_dir.glob("*.py")) - print(f"{names_py = }") - paths_subdirs = [ - path - for path in path_dir.glob("*") - if path.is_dir() and not path.name.startswith("__") - ] - - names_subdirs = sorted(path.name for path in paths_subdirs) - print(f"{names_subdirs = }") - - code = template.format(sources="\n".join(f" '{name}'," for name in names_py), subdir=path_dir) - code += "\n".join(f"subdir('{name}')" for name in names_subdirs) + "\n" - - with open(path_dir / "meson.build", "w", encoding="utf-8") as file: - file.write(code) - - for path_subdir in paths_subdirs: - process_directory(path_subdir) - - -process_directory(Path("fluidimage")) diff --git a/docker/Makefile b/docker/Makefile index 3674aaa8..4f081828 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -1,4 +1,4 @@ -image := image-fluidsim +image := image-fluidimage tag := $(shell date -I'date'| tr -d "[:punct:]") define STR_HELP diff --git a/src/fluidimage/calibration/test_calib_cv.py b/src/fluidimage/calibration/test_calib_cv.py index b854915e..aac52c2a 100644 --- a/src/fluidimage/calibration/test_calib_cv.py +++ b/src/fluidimage/calibration/test_calib_cv.py @@ -42,7 +42,6 @@ def test_interpolate(self): self.calib_cache.get_rotation(2) self.calib_cache.get_translate(-2) - # @unittest.expectedFailure def test_calibrate(self): """Tests construct_object_points and CalibCV methods.""" path_input = pathbase / "cam0" / "0mm_cam0.tif" diff --git a/src/fluidimage/topologies/surface_tracking.py b/src/fluidimage/topologies/surface_tracking.py index 1ab6d74c..603207fe 100644 --- a/src/fluidimage/topologies/surface_tracking.py +++ b/src/fluidimage/topologies/surface_tracking.py @@ -53,11 +53,7 @@ class TopologySurfaceTracking(TopologyBase): @classmethod def create_default_params(cls): - """Class method returning the default parameters. - - For developers: cf. fluidsim.base.params - - """ + """Class method returning the default parameters.""" params = ParamContainer(tag="params") WorkSurfaceTracking._complete_params_with_default(params) diff --git a/try/experimental/topology/piv.py b/try/experimental/topology/piv.py index dbd792d0..2fc27516 100644 --- a/try/experimental/topology/piv.py +++ b/try/experimental/topology/piv.py @@ -47,11 +47,7 @@ class TopologyPIV(TopologyBase): @classmethod def create_default_params(cls): - """Class method returning the default parameters. - - For developers: cf. fluidsim.base.params - - """ + """Class method returning the default parameters.""" params = ParamContainer(tag="params") params._set_child( diff --git a/try/experimental/topology/piv_2.py b/try/experimental/topology/piv_2.py index 975196df..693de289 100644 --- a/try/experimental/topology/piv_2.py +++ b/try/experimental/topology/piv_2.py @@ -47,11 +47,7 @@ class TopologyPIV(TopologyBase): @classmethod def create_default_params(cls): - """Class method returning the default parameters. - - For developers: cf. fluidsim.base.params - - """ + """Class method returning the default parameters.""" params = ParamContainer(tag="params") params._set_child( diff --git a/try/experimental/topology/socket_asycncio.py b/try/experimental/topology/socket_asycncio.py index 47a9a856..6bd345c1 100644 --- a/try/experimental/topology/socket_asycncio.py +++ b/try/experimental/topology/socket_asycncio.py @@ -20,12 +20,10 @@ # # # await loop.sock_sendall(client, response.encode('utf8')) # client.close() -def create_default_params(): - """Class method returning the default parameters. - For developers: cf. fluidsim.base.params - """ +def create_default_params(): + """Class method returning the default parameters.""" params = ParamContainer(tag="params") params._set_child( diff --git a/try/surface_tracking/topo_old/surface_tracking.py b/try/surface_tracking/topo_old/surface_tracking.py index 92d107bd..19135377 100644 --- a/try/surface_tracking/topo_old/surface_tracking.py +++ b/try/surface_tracking/topo_old/surface_tracking.py @@ -56,11 +56,7 @@ class TopologySurfaceTracking(TopologyBase): @classmethod def create_default_params(cls): - """Class method returning the default parameters. - - For developers: cf. fluidsim.base.params - - """ + """Class method returning the default parameters.""" params = ParamContainer(tag="params") params._set_child(