diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 03f65e102..8ae0563e8 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,16 @@ 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 + 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 diff --git a/README.md b/README.md index 991e45cd5..4dc52d718 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)). @@ -170,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 --------------------------- 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