Skip to content

Commit d457197

Browse files
authored
Merge pull request #219 from noaa-ocs-modeling/refactor/internal
Remove use of JigsawPy data structure and make Jigsaw optional
2 parents 4355bd8 + 250f126 commit d457197

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+7224
-1816077
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ jobs:
2626
python=3.12
2727
- name: Install dependencies
2828
shell: bash -l {0}
29-
run: |
30-
python ./setup.py install_jigsaw
31-
pip install .[documentation]
29+
run: pip install .[documentation]
3230
- name: Retrieve latest version from Git tags
3331
uses: mtkennerly/dunamai-action@v1
3432
with:

.github/workflows/functional_test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
4444
- name: Install other dependencies
4545
shell: bash -l {0}
46-
run: pip install .
46+
run: pip install .[testing]
4747

4848
- name: Prepare example DEM
4949
if: runner.os != 'Windows'
@@ -112,7 +112,11 @@ jobs:
112112
name: remesh-bydem-results-${{ matrix.python-version }}
113113
path: remeshed.2dm
114114
retention-days: 7
115-
115+
# Ensure engines are installed so tests don't skip
116+
- name: Install Engine Dependencies
117+
shell: bash -l {0}
118+
run: pip install gmsh triangle
119+
116120
- name: Run Python API tests
117121
shell: bash -el {0}
118-
run: python -m unittest discover tests/api -p "*.py"
122+
run: python -m unittest discover tests

.github/workflows/functional_test_2.yml

Lines changed: 0 additions & 133 deletions
This file was deleted.

.github/workflows/pylint.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ jobs:
3434
python=3.12
3535
- name: Install dependencies
3636
shell: bash -l {0}
37-
run: |
38-
python ./setup.py install_jigsaw
39-
pip install .[testing]
37+
run: pip install .[testing]
4038
- name: Analysing the code with pylint
4139
shell: bash -l {0}
4240
run: |

.gitignore

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# CMake build cache for Jigsaw
2-
submodules/jigsaw-python/external/jigsaw/build
3-
4-
# temporary old version of jigsaw
5-
submodules/jigsaw-geo-python
6-
71
# files generated or used by examples
82
examples
93

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
[submodule "submodules/jigsaw-python"]
2-
path = submodules/jigsaw-python
3-
url = https://github.com/dengwirda/jigsaw-python.git

README.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
## OCSMesh
66
OCSMesh is a Python package for processing DEM data into georeferenced
7-
unstructured meshes using the
8-
[jigsaw-python](https://github.com/dengwirda/jigsaw-python) library.
7+
unstructured meshes using different meshing engine libraries.
98

109
### Installation
1110
Two ways of installing OCSMesh are described below:
@@ -16,36 +15,28 @@ use [`conda`](https://docs.conda.io/en/latest/miniconda.html#linux-installers)
1615
with the `environment.yml` file provided in the repo to install
1716
required libraries.
1817

19-
The Jigsaw library and its Python wrapper must be instlled
20-
before OCSMesh can be used. Jigsaw is available on `conda-forge`
21-
channel.
18+
You need to make sure you've installed the mesh engine you'd like to
19+
use (i.e. Jigsaw, Triangle, or Gmsh).
2220

2321
First you need to download the `environment.yml` file.
24-
2522
```
2623
wget https://raw.githubusercontent.com/noaa-ocs-modeling/OCSMesh/main/environment.yml
2724
2825
conda env create -f environment.yml -n your-env-name
2926
conda activate your-env-name
3027
31-
conda install -y -c conda-forge jigsawpy
3228
pip install ocsmesh
3329
```
3430

3531
#### From GitHub repo
36-
OCSMesh can be installed from the GitHub repository as well.
37-
After downloading the repo, you need to first install Jigsaw using
38-
the script provided in OCSMesh repo by calling:
39-
`./setup.py install_jigsaw` in the OCSMesh root directory.
40-
Then OCSMesh can be installed.
32+
You need to make sure you've installed the mesh engine you'd like to
33+
use (i.e. Jigsaw, Triangle, or Gmsh).
4134

35+
OCSMesh can be installed from the GitHub repository as follows:
4236
```
4337
git clone https://github.com/noaa-ocs-modeling/ocsmesh
4438
cd ocsmesh
45-
python ./setup.py install_jigsaw # To install latest Jigsaw from GitHub
46-
python ./setup.py install # Installs the OCSMesh library to the current Python environment
47-
# OR
48-
python ./setup.py develop # Run this if you are a developer.
39+
pip install .[all]
4940
```
5041

5142
#### Requirements
@@ -71,5 +62,3 @@ DOI : http://dx.doi.org/10.2139/ssrn.5226658
7162

7263
## Disclaimer
7364
This repository is a scientific product and is not official communication of the National Oceanic and Atmospheric Administration, or the United States Department of Commerce. All NOAA GitHub project code is provided on an "as is" basis and the user assumes responsibility for its use. Any claims against the Department of Commerce or Department of Commerce bureaus stemming from the use of this GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation or favoring by the Department of Commerce. The Department of Commerce seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by DOC or the United States Government.
74-
75-

0 commit comments

Comments
 (0)