Skip to content

Commit 630e1ca

Browse files
fix: Update pyproject.yml and add a script for local build (#97)
* Adding script to build all packages * Update Documentation * Fix ci * Missing geos-geomechanics dependency in ci
1 parent 06f477e commit 630e1ca

7 files changed

Lines changed: 36 additions & 9 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
python-version: ["3.10", "3.11", "3.12"]
4343
package-name:
4444
- geos-ats
45+
- geos-geomechanics
4546
- geos-mesh
4647
- geos-posp
4748
- geos-timehistory
@@ -52,8 +53,16 @@ jobs:
5253
- hdf5-wrapper
5354
- pygeos-tools
5455
include:
56+
- package-name: geos-geomechanics
57+
dependencies: "geos-utils"
58+
- package-name: geos-mesh
59+
dependencies: "geos-utils geos-geomechanics"
60+
- package-name: geos-posp
61+
dependencies: "geos-utils geos-mesh geos-geomechanics"
5562
- package-name: pygeos-tools
5663
dependencies: "geos-utils geos-mesh"
64+
- package-name: geos-timehistory
65+
dependencies: "hdf5-wrapper"
5766
steps:
5867
- uses: actions/checkout@v4
5968
- uses: mpi4py/setup-mpi@v1

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Installation
118118
python -m venv .venv
119119
source .venv/bin/activate
120120
python -m pip install --upgrade pip
121-
python -m pip install ./<PACKAGE_NAME>
121+
python -m pip install --upgrade ./<PACKAGE_NAME>
122122
```
123123
124124
You can test installed package by running the commands:
@@ -129,8 +129,7 @@ Installation
129129
```
130130
131131
[!WARNING]
132-
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.
133-
132+
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.
134133
[!NOTE]
135134
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)).
136135
@@ -170,12 +169,12 @@ If you want a package to depend on another GEOS Python package (let's say `geos-
170169
```
171170
dependencies = [
172171
...
173-
"geos-utils @ file:./geos-utils",
172+
"geos-utils",
174173
]
175174
```
176175
177176
[!IMPORTANT]
178-
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.
177+
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.
179178
180179
Release
181180
-------

docs/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ To do this, you can clone a copy of the geosPythonPackages repository and instal
5151
.. note::
5252
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`.
5353

54+
.. Important::
55+
Due to local package dependencies, it is advised to always use the `--upgrade` option when building with the `pip install` option.
5456

5557
Development & Debugging
5658
---------------------------

geos-geomechanics/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ classifiers = [
2222
"Programming Language :: Python"
2323
]
2424
dependencies=[
25-
"geos-utils @ file:./geos-utils",
25+
"geos-utils",
2626
"vtk >= 9.3",
2727
"numpy >= 2.2",
2828
"pandas >= 2.2",

geos-posp/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ keywords = [
3434
requires-python = ">= 3.10"
3535

3636
dependencies = [
37-
"geos-geomechanics @ file:./geos-geomechanics",
38-
"geos-utils @ file:./geos-utils",
37+
"geos-geomechanics",
38+
"geos-utils",
3939
"vtk >= 9.3",
4040
"numpy >= 2.2",
4141
"pandas >= 2.2",

geos-timehistory/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies = [
2121
"matplotlib",
2222
"h5py",
2323
"numpy",
24-
"hdf5-wrapper @ file:./hdf5-wrapper",
24+
"hdf5-wrapper",
2525
]
2626

2727
[project.scripts]

install_packages.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
python -m pip install --upgrade ./geos-utils
3+
python -m pip install --upgrade ./geos-geomechanics
4+
python -m pip install --upgrade ./geos-mesh
5+
python -m pip install --upgrade ./geos-posp
6+
python -m pip install --upgrade ./geos-xml-tools
7+
python -m pip install --upgrade ./geos-xml-viewer
8+
python -m pip install --upgrade ./hdf5-wrapper
9+
python -m pip install --upgrade ./geos-timehistory
10+
python -m pip install --upgrade ./pygeos-tools
11+
python -m pip install --upgrade ./geos-pv
12+
#! trame install requires npm
13+
cd ./geos-trame/vue-components
14+
npm i
15+
npm run build
16+
cd ../../
17+
python -m pip install ./geos-trame

0 commit comments

Comments
 (0)