Skip to content

Commit 01a96db

Browse files
AngRodrigueslachlangrosegithub-actions[bot]rabii-chaaraniRoyThomsonMonash
committed
feat: v3.2 (#153)
* Update issue templates * feat: added issue_templates * fix: add pull request template * fix: few typos grammar * fix: tests should be with pytest * Revert "Update issue templates" * fix: trigger build * style: style fixes by ruff and autoformatting by black * chore(master): release 3.1.1 * fix: update doc deploy * chore(master): release 3.1.2 * docs: remove lavavu; no need for 3D vis for the examples * style: style fixes by ruff and autoformatting by black * fix: remove tini from docker * chore(master): release 3.1.3 * Update issue templates * feat: added issue_templates edit dddf70b chore: added issue_templates * fix: add pull request template * fix: few typos grammar * fix: tests should be with pytest * Revert "Update issue templates" * fix: add issue templates back * fix: correct grammar for clarity * fix: squashed commits of: - fixing the non-use of minimum_fault_length, - use tmpfile to create temporary files, - added random test for mapdata functions:get/set working projection, - added functionality and comments to basal_contacts_build * tests: add more functionality * fix: leave as is for now * fix: finalise the thickness calculator outputs * fix: Remove hjson and rely on json only * fix: update tests/ small fixes * fix: make sure dependencies are right * fix: linting issue * fix: try again * fix: update thickness tests//fix minor typos * fix: correct some typos/update tests * fix: typo in tests * Update README.md * fix: add the basal_contacts_abnormal_check * fix: add error handles for json, url, filenotfound * fix: remove typo * fix: remove tqdm * fix: added check for collocated points * fix: upd gdal as per master * fix: remove test from server * fix: issue 122 * fix: update str format * fix: now use DBSCAN to aggregate collocated poins * fix: removed addition * fix: added warning when collocated points detected * fix: add str for paths - gdal does not accept pathlibs * fix: update minimum_fault_length as per code review * fix: add pathlibs where possible in m2model_wrapper * fix: add pathlib in mapdata.py * fix: revert pathlib in map2model.run * fix: proj should not have temp files * fix: update the minimum_fault_length * tests: add tests for minimum_fault_length * fix: remove redundancy from project.py * fix: update calculate minimum_fault_length for 5% of the map area * fix: linting * fix: typo * fix: remove repetitive print stat * fix: adjust thickness_calc workflow for modularity * fix: remove unnecessary fields * fix: update thickness tests * fix: add ignore_fault_codes and tests for ignore_lithology_code and ignore_fault_code * fix: try relative path ../_datasets * fix: use only path instead of pkg_resources * fix: try full path * fix: load only using path /hamersley * fix: try ./map2loop/_datasets/geodata_files/ * fix: use correct path * refactor: back to original code * fix: add the whole hamersley folder * fix: update docker for docs * fix: update the docs-deploy for master branch only * fix: update CI to build on master only * fix: remove redundancy * fix: update the server test and handle timeout properly * fix: updated ReadMe to have the right install steps (temporary measure) * fix: update CI - test wheels on master only * fix: add test to sdist build in CI to ensure tests are run in the non-master branches * fix: update pytest in ci * fix: revert ci * fix: add pytest in the right place * fix: update pytest location * fix: manifest update * fix: update ci again * investigate * find the install folder * try again * update ci * fix: add checkout step to build sdist * fix: run pytest with test sdist action * fix: revert CI and let tests only run on main branch * fix: add version check new class to check install of dependencies.txt; includes version number check * fix: organise manifest * fix: linting fixes from merges * fix: update CI to run all jobs on branch * fix: update map2model paths * fix: update LPF to install from branch * fix: update install from branch * fix: update the lpf to branch in wheel testing * fix: build the docs on this branch * fix: keep docs separate * fix: pypi and conda upld runs only on master * fix: test the docs on the branch too * fix: update docs docker to build lpf from branch * fix: install sphinx with apt-get? * docs: change sphinx build path * fix: update build path docs * docs: update build requirements * fix: add beartype * docs: typo in docker? * fix: remove redundant beartpe install * chore: typo * fix: simplify issue templates * chore: hjson not in 3.2 * fix: remove hjson from dependencies as not in 3.2 * doc: removing min fault length attribute docstring * fix: adding min fault length setter back to project. Linking to config attribute * fix: min fault length setter/getter for mapdata uses config attribute * No data min fault length is -1 * chore: test unpin gdal from ci * fix: remove sphinx from docs docker build * chore: try again * fix: map2model fault fault relationships (#140) * fix: fault topology merge was using incorrect lookups * fix: run map2model for user defined stratigraphic column * removing logger from this pr * fix: use fault id not Fault_{id} * feat: make map2model optional using geopandas spatial joins as a replacement (#154) * fix: stratigraphic alpha sorter was inverted, reverse sorter * ignore units without contact for max contact length sorter * updated orientation sorter to use correct trigonometry for strike/dip lines. also change to using all intersections along line not only the first intersection. perhaps this should be a different sorter? * revert back to original orientation sorter * style: black * updating WA json to work * remove unused argument documentation * only run doc build on master * use geopandas to produce topology graphs instead of map2model. Basically just using sjoins and buffers. Returns the same for faults and contacts but we have some differences for fault-unit intersections. * update sorter to not use stratigraphic order hint and deprecate hint sorter * update deformation history to use eventId not name for merging * bipass old map2model run * use property accessor to make sure that variables are up to date * remove sorted units from sorter call * removing comment and condaforge channel * fix: remove map2model call from map2loop this is a quick fix, and needs to be cleaned up as the tmp files for map2model are still being created and the old code is just commented * update networkx sorter to have a name2index map * fix: add mode to choose betweeen m2m and geopandas * remove gdal fix * linting * style: black formatting * fix: make the minimum_fault_length updatable through project * fix: add libgdal to docs docker * typo * fix: try other gdal on docs * more gdal issues * fix: revert the gdal pin removal to see if that's the issue * fix: use minimum fault length from project * fix: use separate thickness table in LPF & add active thickness to project (#157) * fix: use separate thickness table in LPF * docs: remove unused docstring * fix: min fault length can be int * fix: bug in output of StructuralPoint * fix: add the active_thickness_flag --------- Co-authored-by: AngRodrigues <angela.rodrigues@monash.edu> * feat: do not accept any legacy files * chore: small typo * remove legacy format arguments * add config file path back * fix: allow json files, check for old keys * chore: add/fix/update logger outputs * chore: more logging * chore: update tests to not rely on warnings * chore: proper string formatting * fix: small fixes for deprecation/linting warnings in test sessions * chore: update actions from deprecation * fix: issue 155 (#158) * fix: simple fix for #155 * fix: decimation factor allows floats * fix: decimation int * fix: remove print statement left behind * chore: update docstrings * fix: gdal: test if conda issue * fix: revert * remove gdal pin?? * fix: keep gdal pin for now * fix: add debug info to thickness calculators (#161) * fix: initial commit * fix: add debug info and warning for bad calculations * fix: add line length control to thickness calculators * fix: refactor to avoid repetitive code * fix: typo * fix: remove list comprehension - wky * fix list to df * fix: revert to lst comprehension * fix: make line length attribute of the TC class * fix: typos * fix: syntax * fix: add location tracking * fix: init commit to remove lst comprehension * chore: empty commit to trigger ci run * chore: update typing to avoid deprecation * fix: update ubuntu * ci: small updates * fix: dependencies updated * fix: update LPF dependency * fix: update linting and release-please * ci: typos * ci: keep release-please separate from linting * ci: update testing * ci: add pytest * ci: update testing workflow * ci: update linting action * chore: upd conda meta * style: style fixes by ruff and autoformatting by black * ci: add conda & pypi * ci: add docs * ci: update to ubuntu24.04 * ci: force docs to branch gh ref * chore: add testing badge to readme * chore: add release badge * Update README.md * Update README.md * fix: update conda and pip builds * ci: add classic solver * ci: add extra action to test conda build and install * ci update * ci: update * gdal pin? * add libmamba * chore: typos * Fix: update gdal install in actions (#163) * ci: remove the build test for now --------- Co-authored-by: Lachlan Grose <lachlan.grose@monash.edu> Co-authored-by: lachlangrose <lachlangrose@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: AngRodrigues <AngRodrigues@users.noreply.github.com> Co-authored-by: Rabii Chaarani <50892556+rabii-chaarani@users.noreply.github.com> Co-authored-by: rabii-chaarani <rabii.chaarani@monash.edu> Co-authored-by: RoyThomsonMonash <roy.thomson@monash.edu>
1 parent 6572937 commit 01a96db

File tree

11 files changed

+116
-1
lines changed

11 files changed

+116
-1
lines changed

.github/workflows/conda.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
os: ${{ fromJSON(vars.BUILD_OS)}}
14+
<<<<<<< HEAD
1415
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS) }}
16+
=======
17+
python-version: ${{ fromJSON(vars.PYTHON_VERSIONS)}}
18+
>>>>>>> 7978841 (feat: v3.2 (#153))
1519
steps:
1620
- uses: conda-incubator/setup-miniconda@v3
1721
with:
@@ -27,6 +31,7 @@ jobs:
2731
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
2832
shell: bash -l {0}
2933
run: |
34+
<<<<<<< HEAD
3035
conda config --env --add channels conda-forge
3136
conda config --env --add channels loop3d
3237
conda config --env --set channel_priority strict
@@ -35,6 +40,12 @@ jobs:
3540
conda build --output-folder conda conda --python ${{matrix.python-version}}
3641
anaconda upload --label main conda/*/*.tar.bz2
3742

43+
=======
44+
conda install -c conda-forge conda-build scikit-build-core numpy anaconda-client conda-libmamba-solver -y
45+
conda build -c conda-forge -c loop3d --output-folder conda conda --python ${{matrix.python-version}}
46+
anaconda upload --label main conda/*/*.tar.bz2
47+
48+
>>>>>>> 7978841 (feat: v3.2 (#153))
3849
- name: upload artifacts
3950
uses: actions/upload-artifact@v4
4051
with:

.github/workflows/linting_and_testing.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ jobs:
1818
- uses: stefanzweifel/git-auto-commit-action@v5
1919
with:
2020
commit_message: "style: style fixes by ruff and autoformatting by black"
21+
<<<<<<< HEAD
2122

2223

24+
=======
25+
26+
>>>>>>> 7978841 (feat: v3.2 (#153))
2327
testing:
2428
name: Testing
2529
runs-on: ubuntu-24.04

.github/workflows/pypi.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ jobs:
66

77
sdist:
88
name: Build sdist
9+
<<<<<<< HEAD
910
runs-on: ubuntu-latest
11+
=======
12+
runs-on: ubuntu-24.04
13+
>>>>>>> 7978841 (feat: v3.2 (#153))
1014
steps:
1115
- uses: actions/checkout@v4
1216
- uses: actions/setup-python@v5
@@ -23,7 +27,11 @@ jobs:
2327

2428
publish:
2529
name: Publish wheels to pypi
30+
<<<<<<< HEAD
2631
runs-on: ubuntu-latest
32+
=======
33+
runs-on: ubuntu-24.04
34+
>>>>>>> 7978841 (feat: v3.2 (#153))
2735
permissions:
2836
# IMPORTANT: this permission is mandatory for trusted publishing
2937
id-token: write

MANIFEST.in

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
include LICENSE
2+
include README.md
3+
14
include map2loop/_datasets/clut_files/*.csv
25
include map2loop/_datasets/config_files/*.json
3-
include map2loop/_datasets/geodata_files/hamersley/*
6+
<<<<<<< HEAD
7+
include map2loop/_datasets/geodata_files/hamersley/*
8+
=======
9+
include map2loop/_datasets/geodata_files/hamersley/*
10+
11+
recursive-include tests *.py
12+
>>>>>>> 7978841 (feat: v3.2 (#153))

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
![GitHub Release](https://img.shields.io/github/v/release/loop3d/map2loop)
22
<<<<<<< HEAD
33
<<<<<<< HEAD
4+
<<<<<<< HEAD
45
[![DOI](https://img.shields.io/static/v1?label=DOI&message=10.5194/gmd-14-5063-2021&color=blue)](https://doi.org/10.5194/gmd-14-5063-2021)
56
=======
67
>>>>>>> 7978841 (feat: v3.2 (#153))
78
=======
89
[![DOI](https://img.shields.io/static/v1?label=DOI&message=10.5194/gmd-14-5063-2021&color=blue)](https://doi.org/10.5194/gmd-14-5063-2021)
910
>>>>>>> c1060e5 (chore: update readme)
11+
=======
12+
>>>>>>> 7978841 (feat: v3.2 (#153))
1013
![License](https://img.shields.io/github/license/loop3d/map2loop)
1114
![PyPI - Downloads](https://img.shields.io/pypi/dm/map2loop?label=pip%20downloads)
1215
![Conda Downloads](https://img.shields.io/conda/dn/loop3d/map2loop?label=Conda%20downloads)
1316
[![Testing](https://github.com/Loop3D/map2loop/actions/workflows/linting_and_testing.yml/badge.svg)](https://github.com/Loop3D/map2loop/actions/workflows/linting_and_testing.yml)
1417
[![Build and Deploy Documentation](https://github.com/Loop3D/map2loop/actions/workflows/documentation.yml/badge.svg)](https://github.com/Loop3D/map2loop/actions/workflows/documentation.yml)
1518

19+
<<<<<<< HEAD
1620
<<<<<<< HEAD
1721
<<<<<<< HEAD
1822

@@ -24,6 +28,9 @@
2428

2529
# Map2Loop 3.2
2630
>>>>>>> c1060e5 (chore: update readme)
31+
=======
32+
# Map2Loop 3.1
33+
>>>>>>> 7978841 (feat: v3.2 (#153))
2734
2835
Generate 3D geological model inputs from geological maps — a high-level implementation and extension of the original map2loop code developed by Prof. Mark Jessell at UWA. To see an example interactive model built with map2loop and LoopStructural, follow this link:
2936

@@ -76,12 +83,20 @@ conda install -c loop3d -c conda-forge --file dependencies.txt
7683
pip install .
7784
```
7885

86+
<<<<<<< HEAD
7987
#### Option 4: From source & developer mode:
88+
=======
89+
### Run
90+
91+
To just use map2loop, issue the following. <sup>*</sup>
92+
93+
>>>>>>> 7978841 (feat: v3.2 (#153))
8094
```bash
8195
git clone https://github.com/Loop3D/map2loop.git
8296

8397
cd map2loop
8498

99+
<<<<<<< HEAD
85100
conda install gdal
86101

87102
conda install -c loop3d -c conda-forge --file dependencies.txt
@@ -115,6 +130,14 @@ conda install -c loop3d -c conda-forge --file dependencies.txt
115130
pip install -e .
116131
```
117132
>>>>>>> c1060e5 (chore: update readme)
133+
=======
134+
conda install -c loop3d --file dependencies.txt
135+
136+
pip install .
137+
```
138+
139+
<p><sup>*</sup> We're actively working towards a better approach - stay tuned! </p>
140+
>>>>>>> 7978841 (feat: v3.2 (#153))
118141
119142
### Documentation
120143

conda/conda_build_config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
python:
2+
- 3.8
3+
- 3.9
4+
- 3.10
5+
- 3.11
6+
- 3.12

conda/meta.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ package:
77
source:
88
git_url: https://github.com/Loop3D/map2loop
99

10+
1011
build:
1112
number: 0
13+
<<<<<<< HEAD
14+
=======
15+
script: "{{ PYTHON }} -m pip install . --no-deps"
16+
>>>>>>> 7978841 (feat: v3.2 (#153))
1217

1318
requirements:
1419
host:
@@ -18,17 +23,26 @@ requirements:
1823
run:
1924
- loopprojectfile ==0.2.2
2025
- gdal
26+
<<<<<<< HEAD
27+
=======
28+
- map2model
29+
- beartype
30+
>>>>>>> 7978841 (feat: v3.2 (#153))
2131
- python
2232
- numpy
2333
- scipy
2434
- geopandas
2535
- shapely
2636
- networkx
2737
- owslib
38+
<<<<<<< HEAD
2839
- map2model
2940
- beartype
3041
- pytest
3142
- scikit-learn
43+
=======
44+
45+
>>>>>>> 7978841 (feat: v3.2 (#153))
3246

3347
about:
3448
home: "https://github.com/Loop3D/map2loop"

dependencies.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
numpy
23
scipy
34
geopandas

map2loop/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ class DependencyChecker:
3030

3131
def __init__(self, package_name, dependency_file="dependencies.txt"):
3232
self.package_name = package_name
33+
<<<<<<< HEAD
3334
self.dependency_file = pathlib.Path(__file__).parent / dependency_file
35+
=======
36+
self.dependency_file = pathlib.Path(__file__).parent.parent / dependency_file
37+
>>>>>>> 7978841 (feat: v3.2 (#153))
3438
self.required_version = self.get_required_version()
3539
self.installed_version = self.get_installed_version()
3640

@@ -93,7 +97,11 @@ def check_version(self):
9397

9498

9599
def check_all_dependencies(dependency_file="dependencies.txt"):
100+
<<<<<<< HEAD
96101
dependencies_path = pathlib.Path(__file__).parent / dependency_file
102+
=======
103+
dependencies_path = pathlib.Path(__file__).parent.parent / dependency_file
104+
>>>>>>> 7978841 (feat: v3.2 (#153))
97105
try:
98106
with dependencies_path.open("r") as file:
99107
for line in file:
@@ -108,7 +116,10 @@ def check_all_dependencies(dependency_file="dependencies.txt"):
108116

109117
checker = DependencyChecker(package_name, dependency_file=dependency_file)
110118
checker.check_version()
119+
<<<<<<< HEAD
111120

121+
=======
122+
>>>>>>> 7978841 (feat: v3.2 (#153))
112123
except FileNotFoundError:
113124
warnings.warn(
114125
f"{dependency_file} not found. No dependencies checked for map2loop.",

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,15 @@ version = { attr = "map2loop.version.__version__" }
3838
[tool.setuptools.packages.find]
3939
include = ['map2loop', 'map2loop.*']
4040

41+
<<<<<<< HEAD
4142
[tool.setuptools.package-data]
4243
map2loop = [
4344
"dependencies.txt",
4445
"_datasets/geodata_files/hamersley/*"
4546
]
47+
=======
48+
49+
>>>>>>> 7978841 (feat: v3.2 (#153))
4650

4751
[tool.black]
4852
line-length = 100

0 commit comments

Comments
 (0)