Skip to content

fix: Update pyproject.yml and add a script for local build #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Installation
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install ./<PACKAGE_NAME>
python -m pip install --upgrade ./<PACKAGE_NAME>
```

You can test installed package by running the commands:
Expand All @@ -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)).

Expand Down Expand Up @@ -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
-------
Expand Down
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
---------------------------
Expand Down
2 changes: 1 addition & 1 deletion geos-geomechanics/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions geos-posp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion geos-timehistory/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies = [
"matplotlib",
"h5py",
"numpy",
"hdf5-wrapper @ file:./hdf5-wrapper",
"hdf5-wrapper",
]

[project.scripts]
Expand Down
17 changes: 17 additions & 0 deletions install_packages.sh
Original file line number Diff line number Diff line change
@@ -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