From b3251441dfb5cabc6d4c3ad38b89f91570dd89ae Mon Sep 17 00:00:00 2001 From: Paloma Martinez <104762252+paloma-martinez@users.noreply.github.com> Date: Wed, 28 May 2025 16:32:21 +0200 Subject: [PATCH 1/5] Adding script to build all packages --- geos-geomechanics/pyproject.toml | 2 +- geos-posp/pyproject.toml | 4 ++-- geos-timehistory/pyproject.toml | 2 +- install_packages.sh | 17 +++++++++++++++++ 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100755 install_packages.sh diff --git a/geos-geomechanics/pyproject.toml b/geos-geomechanics/pyproject.toml index 16439ad68..2f0f30879 100644 --- a/geos-geomechanics/pyproject.toml +++ b/geos-geomechanics/pyproject.toml @@ -22,7 +22,7 @@ classifiers = [ "Programming Language :: Python" ] dependencies=[ - "geos-utils @ file:./geos-utils", + "geos-utils", "vtk >= 9.3", "numpy >= 2.2", "pandas >= 2.2", diff --git a/geos-posp/pyproject.toml b/geos-posp/pyproject.toml index b51c1ca7e..ff962fe87 100644 --- a/geos-posp/pyproject.toml +++ b/geos-posp/pyproject.toml @@ -34,8 +34,8 @@ keywords = [ requires-python = ">= 3.10" dependencies = [ - "geos-geomechanics @ file:./geos-geomechanics", - "geos-utils @ file:./geos-utils", + "geos-geomechanics", + "geos-utils", "vtk >= 9.3", "numpy >= 2.2", "pandas >= 2.2", diff --git a/geos-timehistory/pyproject.toml b/geos-timehistory/pyproject.toml index d9da1cac4..222c19a92 100644 --- a/geos-timehistory/pyproject.toml +++ b/geos-timehistory/pyproject.toml @@ -21,7 +21,7 @@ dependencies = [ "matplotlib", "h5py", "numpy", - "hdf5-wrapper @ file:./hdf5-wrapper", + "hdf5-wrapper", ] [project.scripts] diff --git a/install_packages.sh b/install_packages.sh new file mode 100755 index 000000000..74238daf0 --- /dev/null +++ b/install_packages.sh @@ -0,0 +1,17 @@ +#!/bin/bash +python -m pip install --upgrade ./geos-utils +python -m pip install --upgrade ./geos-geomechanics +python -m pip install --upgrade ./geos-mesh +python -m pip install --upgrade ./geos-posp +python -m pip install --upgrade ./geos-xml-tools +python -m pip install --upgrade ./geos-xml-viewer +python -m pip install --upgrade ./hdf5-wrapper +python -m pip install --upgrade ./geos-timehistory +python -m pip install --upgrade ./pygeos-tools +python -m pip install --upgrade ./geos-pv +#! trame install requires npm +cd ./geos-trame/vue-components +npm i +npm run build +cd ../../ +python -m pip install ./geos-trame \ No newline at end of file From 0f904aa9a4562a6fe2e8de2c40cdc3729618c960 Mon Sep 17 00:00:00 2001 From: Paloma Martinez <104762252+paloma-martinez@users.noreply.github.com> Date: Wed, 28 May 2025 17:40:22 +0200 Subject: [PATCH 2/5] Update Documentation --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 991e45cd5..7cdc040d8 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ Installation python -m venv .venv source .venv/bin/activate python -m pip install --upgrade pip - python -m pip install ./ + python -m pip install --upgrade ./ ``` You can test installed package by running the commands: @@ -129,8 +129,7 @@ Installation ``` [!WARNING] - Due to local package conflicts with `pip install`, it is recommended either to build the packages one by one, or to inlude only top-level packages (see dependency tree hereabove) in the build list. - + Due to local package conflicts with `pip install`, it is recommended to use the `--upgrade` option when building packages, or to use the script `install_packages.sh` located at the root of the repository. [!NOTE] geos-pv package cannot be build alone, but together with Paraview ([see Paraview compilation guide](https://gitlab.kitware.com/paraview/paraview/-/blob/master/Documentation/dev/build.md)). It is recommended to use Paraview v5.12+, which is based on python 3.10+. Alternatively, plugins from geos-pv/PVplugins can be manually loaded into Paraview ([see documentation](https://docs.paraview.org/en/latest/ReferenceManual/pythonProgrammableFilter.html#python-algorithm)). From 348d2250f29d83ad350211630210e86b7885bd92 Mon Sep 17 00:00:00 2001 From: Paloma Martinez <104762252+paloma-martinez@users.noreply.github.com> Date: Mon, 2 Jun 2025 10:07:05 +0200 Subject: [PATCH 3/5] More documentation --- README.md | 4 ++-- docs/index.rst | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7cdc040d8..4dc52d718 100644 --- a/README.md +++ b/README.md @@ -169,12 +169,12 @@ If you want a package to depend on another GEOS Python package (let's say `geos- ``` dependencies = [ ... - "geos-utils @ file:./geos-utils", + "geos-utils", ] ``` [!IMPORTANT] -geos-pv dependencies are managed using a requirements.txt (together with the setup.py) file where all internal (and external if needed) dependencies are present. It ensures that internal dependency paths are correctly set when plugins are manually loaded into Paraview. +geos-pv dependencies are managed using a `requirements.txt` (together with the `setup.py`) file where all internal (and external if needed) dependencies are present. It ensures that internal dependency paths are correctly set when plugins are manually loaded into Paraview. Release ------- diff --git a/docs/index.rst b/docs/index.rst index 1738c55e8..536616d1a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -51,6 +51,8 @@ To do this, you can clone a copy of the geosPythonPackages repository and instal .. note:: To upgrade an existing installation, the python executable in the above command should correspond to the version you indicated in your host config. If you have previously built the tools, this version will be linked in the build directory: `build_dir/bin/python`. +.. Important:: + Due to local package dependencies, it is advised to always use the `--upgrade` option when building with the `pip install` option. Development & Debugging --------------------------- From d77b899c70f25f33dc1c147a521a50c67796dd87 Mon Sep 17 00:00:00 2001 From: Paloma Martinez <104762252+paloma-martinez@users.noreply.github.com> Date: Mon, 2 Jun 2025 14:40:48 +0200 Subject: [PATCH 4/5] Fix ci --- .github/workflows/python-package.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 03f65e102..bc1c07c17 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -42,6 +42,7 @@ jobs: python-version: ["3.10", "3.11", "3.12"] package-name: - geos-ats + - geos-geomechanics - geos-mesh - geos-posp - geos-timehistory @@ -52,8 +53,14 @@ jobs: - hdf5-wrapper - pygeos-tools include: + - package-name: geos-mesh + dependencies: "geos-utils geos-geomechanics" + - package-name: geos-posp + dependencies: "geos-utils geos-mesh geos-geomechanics" - package-name: pygeos-tools dependencies: "geos-utils geos-mesh" + - package-name: geos-timehistory + dependencies: "hdf5-wrapper" steps: - uses: actions/checkout@v4 - uses: mpi4py/setup-mpi@v1 From 81ba1022c5e2b913aa8ba4ea60fa91b45059a891 Mon Sep 17 00:00:00 2001 From: Paloma Martinez <104762252+paloma-martinez@users.noreply.github.com> Date: Mon, 2 Jun 2025 14:46:28 +0200 Subject: [PATCH 5/5] Missing geos-geomechanics dependency in ci --- .github/workflows/python-package.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index bc1c07c17..8ae0563e8 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -53,6 +53,8 @@ jobs: - hdf5-wrapper - pygeos-tools include: + - package-name: geos-geomechanics + dependencies: "geos-utils" - package-name: geos-mesh dependencies: "geos-utils geos-geomechanics" - package-name: geos-posp