From 1d123bc7a22e5fa5b5bee46e51acf983188f2d38 Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Tue, 21 May 2024 13:07:55 +1000 Subject: [PATCH 01/15] fix: adding get item for config datastructure --- map2loop/config.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/map2loop/config.py b/map2loop/config.py index 21d9e536..5207483f 100644 --- a/map2loop/config.py +++ b/map2loop/config.py @@ -71,6 +71,26 @@ def __init__(self): "objectid_column": "ID", } + def __getitem__(self, key): + """ + Get the value of a key in the config + + Args: + key (str): The key to get the value of + + Returns: + dict: The value of the key + """ + if key == "structure": + return self.structure_config + if key == "geology": + return self.geology_config + if key == "fault": + return self.fault_config + if key == "fold": + return self.fold_config + return None + def to_dict(self): """ Convert the config dictionary to a dictionary From f495ffee47988e8da82d61619736edf178484fe7 Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Tue, 21 May 2024 13:09:06 +1000 Subject: [PATCH 02/15] fix: adding __json__ attribute to samplers and calculators these should provide a description of the algorithm and any information about parameters that can be used by the front end to update the visualisation. --- map2loop/fault_orientation.py | 9 +++++++++ map2loop/sampler.py | 14 ++++++++++++++ map2loop/sorter.py | 10 ++++++++++ map2loop/thickness_calculator.py | 20 ++++++++++++++++++++ map2loop/throw_calculator.py | 8 ++++++++ 5 files changed, 61 insertions(+) diff --git a/map2loop/fault_orientation.py b/map2loop/fault_orientation.py index 16692a19..1370eae9 100644 --- a/map2loop/fault_orientation.py +++ b/map2loop/fault_orientation.py @@ -92,3 +92,12 @@ def calculate( orientations.loc[i, "Y"] = p.y return orientations.drop(columns="geometry") + + +__json__ = [ + { + 'classname': "FaultOrientationNearest", + 'description': 'Assigns the nearest fault orientation to a fault', + 'parameters': [], + } +] diff --git a/map2loop/sampler.py b/map2loop/sampler.py index 31a82311..5f9a5559 100644 --- a/map2loop/sampler.py +++ b/map2loop/sampler.py @@ -170,3 +170,17 @@ def sample( df.reset_index(drop=True, inplace=True) return df + + +__json__ = [ + { + 'classname': "SamplerDecimator", + 'description': 'Sample by decimation', + 'parameters': [{'name': 'decimation', 'type': 'number', 'value': 1}], + }, + { + 'classname': 'SamplerSpacing', + 'description': 'Sample using a fixed spacing along a line or polygon', + 'parameters': [{'name': 'spacing', 'type': 'number', 'value': 50.0}], + }, +] diff --git a/map2loop/sorter.py b/map2loop/sorter.py index 2d6e05b5..6f5ba774 100644 --- a/map2loop/sorter.py +++ b/map2loop/sorter.py @@ -510,3 +510,13 @@ def sort( dd.add_node(edge[1]) dd.add_edge(edge[0], edge[1]) return list(nx.dfs_preorder_nodes(dd, source=list(dd.nodes())[0])) + + +__json__ = [ + {'classname': "SorterUseHint", 'decription': '', 'parameters': []}, + {'classname': "SorterUseNetworkX", 'decription': '', 'parameters': []}, + {'classname': 'SorterAgedBased', 'decription': '', 'parameters': []}, + {'classname': 'SorterAlpha', 'decription': '', 'parameters': []}, + {'classname': 'SorterMaximiseContacts', 'decription': '', 'parameters': []}, + {'classname': 'SorterObservationProjections', 'decription': '', 'parameters': []}, +] diff --git a/map2loop/thickness_calculator.py b/map2loop/thickness_calculator.py index 423f8681..1ea7560f 100644 --- a/map2loop/thickness_calculator.py +++ b/map2loop/thickness_calculator.py @@ -617,3 +617,23 @@ def compute( output_units.loc[output_units["name"] == unit, "ThicknessStdDev"] = -1 return output_units + + +__json__ = [ + { + 'classname': "ThicknessCalculatorAlpha", + 'description': 'Calculate thickness using shortest map distance between basal contacts', + 'parameters': [], + }, + { + 'classname': "InterpolatedStructure", + 'description': 'Calculate thickness by interpolating structures and projecting map distance into 3d', + 'parameters': [], + }, + { + 'classname': "StructuralPoint", + 'description': 'Calculates thickness for each structural measurement by projecting a line across\n' + + 'stratigraphy and projecting the map thickness using the dip', + 'parameters': [], + }, +] diff --git a/map2loop/throw_calculator.py b/map2loop/throw_calculator.py index 96ca4605..762ecb60 100644 --- a/map2loop/throw_calculator.py +++ b/map2loop/throw_calculator.py @@ -97,3 +97,11 @@ def compute( lambda row: 100 if row["avgDisplacement"] == -1 else row["avgDisplacement"], axis=1 ) return faults + + +__json__ = [ + { + 'classname': "ThrowCalculatorAlpha", + 'description': "ThrowCalculator class which estimates fault throw values based on units, basal_contacts and stratigraphic order", + } +] From 450009ebcab020af43e9b67b507c947f393abe03 Mon Sep 17 00:00:00 2001 From: AngRodrigues Date: Thu, 9 May 2024 16:18:47 +1000 Subject: [PATCH 03/15] fix: update doc deploy --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 79612ece..c8ecc1fd 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -147,7 +147,7 @@ jobs: run: | ls -l docs - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@4 + uses: JamesIves/github-pages-deploy-action@v4 with: branch: gh-pages # The branch the action should deploy to. folder: docs # The folder the action should deploy. \ No newline at end of file From 84a4cce4e5b3badf6ee210278ea54366625a9973 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 9 May 2024 06:37:44 +0000 Subject: [PATCH 04/15] chore(master): release 3.1.2 --- CHANGELOG.md | 7 +++++++ map2loop/version.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9df75906..12ac2de7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.1.2](https://github.com/Loop3D/map2loop/compare/v3.1.1...v3.1.2) (2024-05-09) + + +### Bug Fixes + +* update doc deploy ([cf0de5b](https://github.com/Loop3D/map2loop/commit/cf0de5b937c251ac71522488392f7ba7d65d78c6)) + ## [3.1.1](https://github.com/Loop3D/map2loop/compare/v3.1.0...v3.1.1) (2024-05-09) diff --git a/map2loop/version.py b/map2loop/version.py index d539d50c..911557b8 100644 --- a/map2loop/version.py +++ b/map2loop/version.py @@ -1 +1 @@ -__version__ = "3.1.1" +__version__ = "3.1.2" From 94b9a2b5602a869d55aa3762ac67c29017bd96e7 Mon Sep 17 00:00:00 2001 From: AngRodrigues Date: Tue, 14 May 2024 11:09:01 +1000 Subject: [PATCH 05/15] docs: remove lavavu; no need for 3D vis for the examples --- docs/Dockerfile | 5 +---- docs/source/conf.py | 24 +++++++++++------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/docs/Dockerfile b/docs/Dockerfile index 0fb83117..c3165b30 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -27,12 +27,9 @@ RUN conda install -c conda-forge --file ./docs/requirements.txt -y RUN pip install . -# RUN pip install lavavu-osmesa==1.8.45 -ENV LD_LIBRARY_PATH=/opt/conda/lib/python3.10/site-packages/lavavu_osmesa.libs - ENV TINI_VERSION v0.19.0 ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini RUN chmod +x /tini -# ENTRYPOINT ["/tini", "--"] +ENTRYPOINT ["/tini", "--"] WORKDIR / \ No newline at end of file diff --git a/docs/source/conf.py b/docs/source/conf.py index afc40e0d..ce0bf2d7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -105,19 +105,17 @@ # Sphinx gallery examples -try: - from LoopStructural.visualisation.sphinx_scraper import Scraper as LoopScraper - from sphinx_gallery.sorting import ExampleTitleSortKey - - sphinx_gallery_conf = { - "examples_dirs": ["../examples/"], - "gallery_dirs": ["_auto_examples/"], # path to where to save gallery generated output - "image_scrapers": ("matplotlib", LoopScraper()), - "within_subsection_order": ExampleTitleSortKey, - "reference_url": {"LoopStructural": None}, - } -except ImportError: - pass + +# from LoopStructural.visualisation.sphinx_scraper import Scraper as LoopScraper +from sphinx_gallery.sorting import ExampleTitleSortKey + +sphinx_gallery_conf = { + "examples_dirs": ["../examples/"], + "gallery_dirs": ["_auto_examples/"], # path to where to save gallery generated output + "image_scrapers": ("matplotlib"), + "within_subsection_order": ExampleTitleSortKey, + "reference_url": {"LoopStructural": None}, +} # def setup(app): # app.add_stylesheet('custom.css') From b896913095d321ca3fe6ccdc9cfb63c5fd504028 Mon Sep 17 00:00:00 2001 From: AngRodrigues Date: Tue, 14 May 2024 01:09:23 +0000 Subject: [PATCH 06/15] style: style fixes by ruff and autoformatting by black --- docs/source/conf.py | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index ce0bf2d7..e5edd5e6 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -105,7 +105,6 @@ # Sphinx gallery examples - # from LoopStructural.visualisation.sphinx_scraper import Scraper as LoopScraper from sphinx_gallery.sorting import ExampleTitleSortKey From 8921ba27bf47d157b4cf108f1dfb977b6142190d Mon Sep 17 00:00:00 2001 From: AngRodrigues Date: Tue, 14 May 2024 13:14:39 +1000 Subject: [PATCH 07/15] fix: remove tini from docker --- docs/Dockerfile | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/Dockerfile b/docs/Dockerfile index c3165b30..86879a31 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -27,9 +27,4 @@ RUN conda install -c conda-forge --file ./docs/requirements.txt -y RUN pip install . -ENV TINI_VERSION v0.19.0 -ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini -RUN chmod +x /tini -ENTRYPOINT ["/tini", "--"] - WORKDIR / \ No newline at end of file From dc5fbb8ee8a5f45e1f707b117134e3565c2b546c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 04:48:56 +0000 Subject: [PATCH 08/15] chore(master): release 3.1.3 --- CHANGELOG.md | 12 ++++++++++++ map2loop/version.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12ac2de7..edd4dba1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [3.1.3](https://github.com/Loop3D/map2loop/compare/v3.1.2...v3.1.3) (2024-05-14) + + +### Bug Fixes + +* remove tini from docker ([89fd60f](https://github.com/Loop3D/map2loop/commit/89fd60f35445f96894c153d3f8c5f6451bcbf0ed)) + + +### Documentation + +* remove lavavu; no need for 3D vis for the examples ([e8b1ada](https://github.com/Loop3D/map2loop/commit/e8b1ada0345cfebef114be555e770fd594155b16)) + ## [3.1.2](https://github.com/Loop3D/map2loop/compare/v3.1.1...v3.1.2) (2024-05-09) diff --git a/map2loop/version.py b/map2loop/version.py index 911557b8..f7493720 100644 --- a/map2loop/version.py +++ b/map2loop/version.py @@ -1 +1 @@ -__version__ = "3.1.2" +__version__ = "3.1.3" From d0496f8d29ccb97fa88e3c8e1c5457c9285652b3 Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Tue, 21 May 2024 13:07:55 +1000 Subject: [PATCH 09/15] fix: adding get item for config datastructure --- map2loop/config.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/map2loop/config.py b/map2loop/config.py index 21d9e536..5207483f 100644 --- a/map2loop/config.py +++ b/map2loop/config.py @@ -71,6 +71,26 @@ def __init__(self): "objectid_column": "ID", } + def __getitem__(self, key): + """ + Get the value of a key in the config + + Args: + key (str): The key to get the value of + + Returns: + dict: The value of the key + """ + if key == "structure": + return self.structure_config + if key == "geology": + return self.geology_config + if key == "fault": + return self.fault_config + if key == "fold": + return self.fold_config + return None + def to_dict(self): """ Convert the config dictionary to a dictionary From 36fa2bc150c5ff9e19c5cb22106b8943cd3f2af2 Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Tue, 21 May 2024 13:09:06 +1000 Subject: [PATCH 10/15] fix: adding __json__ attribute to samplers and calculators these should provide a description of the algorithm and any information about parameters that can be used by the front end to update the visualisation. --- map2loop/fault_orientation.py | 9 +++++++++ map2loop/sampler.py | 14 ++++++++++++++ map2loop/sorter.py | 10 ++++++++++ map2loop/thickness_calculator.py | 20 ++++++++++++++++++++ map2loop/throw_calculator.py | 8 ++++++++ 5 files changed, 61 insertions(+) diff --git a/map2loop/fault_orientation.py b/map2loop/fault_orientation.py index 16692a19..1370eae9 100644 --- a/map2loop/fault_orientation.py +++ b/map2loop/fault_orientation.py @@ -92,3 +92,12 @@ def calculate( orientations.loc[i, "Y"] = p.y return orientations.drop(columns="geometry") + + +__json__ = [ + { + 'classname': "FaultOrientationNearest", + 'description': 'Assigns the nearest fault orientation to a fault', + 'parameters': [], + } +] diff --git a/map2loop/sampler.py b/map2loop/sampler.py index 31a82311..5f9a5559 100644 --- a/map2loop/sampler.py +++ b/map2loop/sampler.py @@ -170,3 +170,17 @@ def sample( df.reset_index(drop=True, inplace=True) return df + + +__json__ = [ + { + 'classname': "SamplerDecimator", + 'description': 'Sample by decimation', + 'parameters': [{'name': 'decimation', 'type': 'number', 'value': 1}], + }, + { + 'classname': 'SamplerSpacing', + 'description': 'Sample using a fixed spacing along a line or polygon', + 'parameters': [{'name': 'spacing', 'type': 'number', 'value': 50.0}], + }, +] diff --git a/map2loop/sorter.py b/map2loop/sorter.py index 2d6e05b5..6f5ba774 100644 --- a/map2loop/sorter.py +++ b/map2loop/sorter.py @@ -510,3 +510,13 @@ def sort( dd.add_node(edge[1]) dd.add_edge(edge[0], edge[1]) return list(nx.dfs_preorder_nodes(dd, source=list(dd.nodes())[0])) + + +__json__ = [ + {'classname': "SorterUseHint", 'decription': '', 'parameters': []}, + {'classname': "SorterUseNetworkX", 'decription': '', 'parameters': []}, + {'classname': 'SorterAgedBased', 'decription': '', 'parameters': []}, + {'classname': 'SorterAlpha', 'decription': '', 'parameters': []}, + {'classname': 'SorterMaximiseContacts', 'decription': '', 'parameters': []}, + {'classname': 'SorterObservationProjections', 'decription': '', 'parameters': []}, +] diff --git a/map2loop/thickness_calculator.py b/map2loop/thickness_calculator.py index 423f8681..1ea7560f 100644 --- a/map2loop/thickness_calculator.py +++ b/map2loop/thickness_calculator.py @@ -617,3 +617,23 @@ def compute( output_units.loc[output_units["name"] == unit, "ThicknessStdDev"] = -1 return output_units + + +__json__ = [ + { + 'classname': "ThicknessCalculatorAlpha", + 'description': 'Calculate thickness using shortest map distance between basal contacts', + 'parameters': [], + }, + { + 'classname': "InterpolatedStructure", + 'description': 'Calculate thickness by interpolating structures and projecting map distance into 3d', + 'parameters': [], + }, + { + 'classname': "StructuralPoint", + 'description': 'Calculates thickness for each structural measurement by projecting a line across\n' + + 'stratigraphy and projecting the map thickness using the dip', + 'parameters': [], + }, +] diff --git a/map2loop/throw_calculator.py b/map2loop/throw_calculator.py index 96ca4605..762ecb60 100644 --- a/map2loop/throw_calculator.py +++ b/map2loop/throw_calculator.py @@ -97,3 +97,11 @@ def compute( lambda row: 100 if row["avgDisplacement"] == -1 else row["avgDisplacement"], axis=1 ) return faults + + +__json__ = [ + { + 'classname': "ThrowCalculatorAlpha", + 'description': "ThrowCalculator class which estimates fault throw values based on units, basal_contacts and stratigraphic order", + } +] From e0553b09ac6bad3ab1f5e4244a8a5efa0f125ca7 Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Tue, 21 May 2024 13:07:55 +1000 Subject: [PATCH 11/15] fix: adding get item for config datastructure --- map2loop/config.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/map2loop/config.py b/map2loop/config.py index 21d9e536..5207483f 100644 --- a/map2loop/config.py +++ b/map2loop/config.py @@ -71,6 +71,26 @@ def __init__(self): "objectid_column": "ID", } + def __getitem__(self, key): + """ + Get the value of a key in the config + + Args: + key (str): The key to get the value of + + Returns: + dict: The value of the key + """ + if key == "structure": + return self.structure_config + if key == "geology": + return self.geology_config + if key == "fault": + return self.fault_config + if key == "fold": + return self.fold_config + return None + def to_dict(self): """ Convert the config dictionary to a dictionary From 239191baf126a411a308d4b0ea2a88926698f1b0 Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Tue, 21 May 2024 13:09:06 +1000 Subject: [PATCH 12/15] fix: adding __json__ attribute to samplers and calculators these should provide a description of the algorithm and any information about parameters that can be used by the front end to update the visualisation. --- map2loop/fault_orientation.py | 9 +++++++++ map2loop/sampler.py | 14 ++++++++++++++ map2loop/sorter.py | 10 ++++++++++ map2loop/thickness_calculator.py | 20 ++++++++++++++++++++ map2loop/throw_calculator.py | 8 ++++++++ 5 files changed, 61 insertions(+) diff --git a/map2loop/fault_orientation.py b/map2loop/fault_orientation.py index 16692a19..1370eae9 100644 --- a/map2loop/fault_orientation.py +++ b/map2loop/fault_orientation.py @@ -92,3 +92,12 @@ def calculate( orientations.loc[i, "Y"] = p.y return orientations.drop(columns="geometry") + + +__json__ = [ + { + 'classname': "FaultOrientationNearest", + 'description': 'Assigns the nearest fault orientation to a fault', + 'parameters': [], + } +] diff --git a/map2loop/sampler.py b/map2loop/sampler.py index 9d97d73d..209e72ca 100644 --- a/map2loop/sampler.py +++ b/map2loop/sampler.py @@ -174,3 +174,17 @@ def sample( df.reset_index(drop=True, inplace=True) return df + + +__json__ = [ + { + 'classname': "SamplerDecimator", + 'description': 'Sample by decimation', + 'parameters': [{'name': 'decimation', 'type': 'number', 'value': 1}], + }, + { + 'classname': 'SamplerSpacing', + 'description': 'Sample using a fixed spacing along a line or polygon', + 'parameters': [{'name': 'spacing', 'type': 'number', 'value': 50.0}], + }, +] diff --git a/map2loop/sorter.py b/map2loop/sorter.py index 2d6e05b5..6f5ba774 100644 --- a/map2loop/sorter.py +++ b/map2loop/sorter.py @@ -510,3 +510,13 @@ def sort( dd.add_node(edge[1]) dd.add_edge(edge[0], edge[1]) return list(nx.dfs_preorder_nodes(dd, source=list(dd.nodes())[0])) + + +__json__ = [ + {'classname': "SorterUseHint", 'decription': '', 'parameters': []}, + {'classname': "SorterUseNetworkX", 'decription': '', 'parameters': []}, + {'classname': 'SorterAgedBased', 'decription': '', 'parameters': []}, + {'classname': 'SorterAlpha', 'decription': '', 'parameters': []}, + {'classname': 'SorterMaximiseContacts', 'decription': '', 'parameters': []}, + {'classname': 'SorterObservationProjections', 'decription': '', 'parameters': []}, +] diff --git a/map2loop/thickness_calculator.py b/map2loop/thickness_calculator.py index af016800..beb1245a 100644 --- a/map2loop/thickness_calculator.py +++ b/map2loop/thickness_calculator.py @@ -615,3 +615,23 @@ def compute( output_units.loc[output_units["name"] == unit, "ThicknessStdDev"] = -1 return output_units + + +__json__ = [ + { + 'classname': "ThicknessCalculatorAlpha", + 'description': 'Calculate thickness using shortest map distance between basal contacts', + 'parameters': [], + }, + { + 'classname': "InterpolatedStructure", + 'description': 'Calculate thickness by interpolating structures and projecting map distance into 3d', + 'parameters': [], + }, + { + 'classname': "StructuralPoint", + 'description': 'Calculates thickness for each structural measurement by projecting a line across\n' + + 'stratigraphy and projecting the map thickness using the dip', + 'parameters': [], + }, +] diff --git a/map2loop/throw_calculator.py b/map2loop/throw_calculator.py index 96ca4605..762ecb60 100644 --- a/map2loop/throw_calculator.py +++ b/map2loop/throw_calculator.py @@ -97,3 +97,11 @@ def compute( lambda row: 100 if row["avgDisplacement"] == -1 else row["avgDisplacement"], axis=1 ) return faults + + +__json__ = [ + { + 'classname': "ThrowCalculatorAlpha", + 'description': "ThrowCalculator class which estimates fault throw values based on units, basal_contacts and stratigraphic order", + } +] From d7869c6ff615cf753d4edec16abea7406cdfabed Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Fri, 14 Jun 2024 15:43:24 +1000 Subject: [PATCH 13/15] fix: force upper case for state choice --- map2loop/project.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/map2loop/project.py b/map2loop/project.py index 02630ebc..6b57efeb 100644 --- a/map2loop/project.py +++ b/map2loop/project.py @@ -170,8 +170,17 @@ def __init__( # Assign filenames if use_australian_state_data != "": # Sanity check on state string - if use_australian_state_data in ["WA", "SA", "QLD", "NSW", "TAS", "VIC", "ACT", "NT"]: - self.map_data.set_filenames_from_australian_state(use_australian_state_data) + if use_australian_state_data.upper() in [ + "WA", + "SA", + "QLD", + "NSW", + "TAS", + "VIC", + "ACT", + "NT", + ]: + self.map_data.set_filenames_from_australian_state(use_australian_state_data.upper()) else: raise ValueError( f"Australian state {use_australian_state_data} not in state url database" From b9ca06f9ec232c8084a09441f12e93743925460e Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Fri, 14 Jun 2024 15:43:37 +1000 Subject: [PATCH 14/15] fix: add parameters for throw calculator --- map2loop/throw_calculator.py | 1 + 1 file changed, 1 insertion(+) diff --git a/map2loop/throw_calculator.py b/map2loop/throw_calculator.py index 762ecb60..3ff049dd 100644 --- a/map2loop/throw_calculator.py +++ b/map2loop/throw_calculator.py @@ -103,5 +103,6 @@ def compute( { 'classname': "ThrowCalculatorAlpha", 'description': "ThrowCalculator class which estimates fault throw values based on units, basal_contacts and stratigraphic order", + 'parameters': [], } ] From 1eaca4026629e86dab3b3958913f6e2fa8de3c08 Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Fri, 14 Jun 2024 15:43:59 +1000 Subject: [PATCH 15/15] fix: allow int or float for sampler --- map2loop/sampler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/map2loop/sampler.py b/map2loop/sampler.py index 209e72ca..3b290625 100644 --- a/map2loop/sampler.py +++ b/map2loop/sampler.py @@ -6,7 +6,7 @@ import numpy from .m2l_enums import Datatype from .mapdata import MapData -from typing import Optional +from typing import Optional, Union class Sampler(ABC): @@ -101,7 +101,7 @@ class SamplerSpacing(Sampler): """ @beartype.beartype - def __init__(self, spacing: float = 50.0): + def __init__(self, spacing: Union[float, int] = 50.0): """ Initialiser for spacing sampler