From 096b4948c753d815834e793ef1825da645f8899e Mon Sep 17 00:00:00 2001 From: Julian Giordani Date: Thu, 14 Nov 2024 20:57:16 +1100 Subject: [PATCH] Rename ressources -> resources in UWGeodynamics The path ressources is still symlinked for backwards compatibility. --- MANIFEST.in | 9 +++++---- .../tutorials/Tutorial_11_Coupling_with_Badlands.ipynb | 2 +- docs/development/docs_generator/UWGeoUserGuide.rst | 10 +++++----- src/underworld/UWGeodynamics/_material.py | 2 +- src/underworld/UWGeodynamics/_melt.py | 4 ++-- src/underworld/UWGeodynamics/_rheology.py | 4 ++-- .../{ressources => resources}/Liquidus.json | 0 .../{ressources => resources}/Materials.json | 0 .../{ressources => resources}/PlasticRheologies.json | 0 .../{ressources => resources}/Solidus.json | 0 .../{ressources => resources}/ViscousRheologies.json | 0 src/underworld/UWGeodynamics/ressources | 1 + 12 files changed, 17 insertions(+), 15 deletions(-) rename src/underworld/UWGeodynamics/{ressources => resources}/Liquidus.json (100%) rename src/underworld/UWGeodynamics/{ressources => resources}/Materials.json (100%) rename src/underworld/UWGeodynamics/{ressources => resources}/PlasticRheologies.json (100%) rename src/underworld/UWGeodynamics/{ressources => resources}/Solidus.json (100%) rename src/underworld/UWGeodynamics/{ressources => resources}/ViscousRheologies.json (100%) create mode 120000 src/underworld/UWGeodynamics/ressources diff --git a/MANIFEST.in b/MANIFEST.in index 42610476f..208b5689a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,9 +1,10 @@ +recursive-include src/underworld *py +recursive-include src/underworld/UWGeodynamics/resources *.json +recursive-include src/underworld/UWGeodynamics/uwgeo-data * + # recursive-include src/underworld *i # recursive-include src/underworld *c # recursive-include src/underworld *cpp # recursive-include src/underworld *h # recursive-include src/underworld *hpp -#recursive-include src/underworld CMakeLists* -recursive-include src/underworld *py -recursive-include src/underworld/UWGeodynamics/ressources *.json -recursive-include src/underworld/UWGeodynamics/uwgeo-data * +# recursive-include src/underworld CMakeLists* diff --git a/docs/UWGeodynamics/tutorials/Tutorial_11_Coupling_with_Badlands.ipynb b/docs/UWGeodynamics/tutorials/Tutorial_11_Coupling_with_Badlands.ipynb index b55d4f690..eb382683e 100644 --- a/docs/UWGeodynamics/tutorials/Tutorial_11_Coupling_with_Badlands.ipynb +++ b/docs/UWGeodynamics/tutorials/Tutorial_11_Coupling_with_Badlands.ipynb @@ -398,7 +398,7 @@ "outputs": [], "source": [ "Model.surfaceProcesses = GEO.surfaceProcesses.Badlands(airIndex=[stickyAir.index, air.index], sedimentIndex=sediment.index,\n", - " XML=\"ressources/badlands.xml\", resolution=1. * u.kilometer, \n", + " XML=\"resources/badlands.xml\", resolution=1. * u.kilometer, \n", " checkpoint_interval=0.01 * u.megayears)" ] }, diff --git a/docs/development/docs_generator/UWGeoUserGuide.rst b/docs/development/docs_generator/UWGeoUserGuide.rst index 1f3343a5a..8b3d20339 100644 --- a/docs/development/docs_generator/UWGeoUserGuide.rst +++ b/docs/development/docs_generator/UWGeoUserGuide.rst @@ -322,7 +322,7 @@ MaterialRegistry object: from a json file by passing its path as argument. The `default json`__ file can be used as an example. -.. _default json: https://github.com/underworldcode/UWGeodynamics/blob/master/UWGeodynamics/ressources/Materials.json_ +.. _default json: https://github.com/underworldcode/UWGeodynamics/blob/master/UWGeodynamics/resources/Materials.json_ @@ -779,7 +779,7 @@ These can be accessed using the `GEO.ViscousCreepRegistry`: from a json file by passing its path as argument. The `default json`__ file can be find here and can be used as an example. -__ https://github.com/underworldcode/UWGeodynamics/blob/master/UWGeodynamics/ressources/ViscousRheologies.json_ +__ https://github.com/underworldcode/UWGeodynamics/blob/master/UWGeodynamics/resources/ViscousRheologies.json_ **Example:** @@ -917,7 +917,7 @@ They can be accessed using the `GEO.PlasticityRegistry` registry. from a json file by passing its path as argument. The `default json`__ file can be find here and can be used as an example. -__ https://github.com/underworldcode/UWGeodynamics/blob/master/UWGeodynamics/ressources/PlasticRheologies.json_ +__ https://github.com/underworldcode/UWGeodynamics/blob/master/UWGeodynamics/resources/PlasticRheologies.json_ Users can define their own parametres: @@ -1792,7 +1792,7 @@ UWGeodynamics provides a way to couple an Underworld model to Badlands_. >>> sediment = GEO.Material() >>> Model.surfaceProcesses = GEO.surfaceProcesses.Badlands( ... airIndex=[air.index], sedimentIndex=sediment.index, - ... XML="ressources/badlands.xml", resolution=1. * u.kilometre, + ... XML="resources/badlands.xml", resolution=1. * u.kilometre, ... checkpoint_interval=0.01 * u.megayears) This will allow communication between the *UWGeodynamics* model and the *Badlands* @@ -1823,7 +1823,7 @@ model than in the thermo-mechanical model. .. _documentation: https://github.com/badlands-model/badlands -.. _XML example: ressources/badlands.xml +.. _XML example: resources/badlands.xml Deforming Mesh -------------- diff --git a/src/underworld/UWGeodynamics/_material.py b/src/underworld/UWGeodynamics/_material.py index 2b6e83f88..7cc4bfcd9 100644 --- a/src/underworld/UWGeodynamics/_material.py +++ b/src/underworld/UWGeodynamics/_material.py @@ -304,7 +304,7 @@ def __init__(self, filename=None): if not filename: filename = pkg_resources.resource_filename( - __name__, "ressources/Materials.json") + __name__, "resources/Materials.json") def get_value(item): value = item["value"] diff --git a/src/underworld/UWGeodynamics/_melt.py b/src/underworld/UWGeodynamics/_melt.py index a9920aebd..71cd4df0c 100644 --- a/src/underworld/UWGeodynamics/_melt.py +++ b/src/underworld/UWGeodynamics/_melt.py @@ -64,7 +64,7 @@ def __init__(self, filename=None): if not filename: import pkg_resources filename = pkg_resources.resource_filename( - __name__, "ressources/Solidus.json") + __name__, "resources/Solidus.json") with open(filename, "r") as infile: _solidii = json.load(infile) @@ -111,7 +111,7 @@ def __init__(self, filename=None): if not filename: import pkg_resources filename = pkg_resources.resource_filename( - __name__, "ressources/Liquidus.json") + __name__, "resources/Liquidus.json") with open(filename, "r") as infile: _liquidii = json.load(infile) diff --git a/src/underworld/UWGeodynamics/_rheology.py b/src/underworld/UWGeodynamics/_rheology.py index 55f99283e..070629a98 100644 --- a/src/underworld/UWGeodynamics/_rheology.py +++ b/src/underworld/UWGeodynamics/_rheology.py @@ -634,7 +634,7 @@ def __init__(self, filename=None): if not filename: import pkg_resources filename = pkg_resources.resource_filename( - __name__, "ressources/ViscousRheologies.json") + __name__, "resources/ViscousRheologies.json") with open(filename, "r") as infile: self._viscousLaws = json.load(infile) @@ -686,7 +686,7 @@ def __init__(self, filename=None): if not filename: import pkg_resources filename = pkg_resources.resource_filename( - __name__, "ressources/PlasticRheologies.json") + __name__, "resources/PlasticRheologies.json") with open(filename, "r") as infile: _plasticLaws = json.load(infile) diff --git a/src/underworld/UWGeodynamics/ressources/Liquidus.json b/src/underworld/UWGeodynamics/resources/Liquidus.json similarity index 100% rename from src/underworld/UWGeodynamics/ressources/Liquidus.json rename to src/underworld/UWGeodynamics/resources/Liquidus.json diff --git a/src/underworld/UWGeodynamics/ressources/Materials.json b/src/underworld/UWGeodynamics/resources/Materials.json similarity index 100% rename from src/underworld/UWGeodynamics/ressources/Materials.json rename to src/underworld/UWGeodynamics/resources/Materials.json diff --git a/src/underworld/UWGeodynamics/ressources/PlasticRheologies.json b/src/underworld/UWGeodynamics/resources/PlasticRheologies.json similarity index 100% rename from src/underworld/UWGeodynamics/ressources/PlasticRheologies.json rename to src/underworld/UWGeodynamics/resources/PlasticRheologies.json diff --git a/src/underworld/UWGeodynamics/ressources/Solidus.json b/src/underworld/UWGeodynamics/resources/Solidus.json similarity index 100% rename from src/underworld/UWGeodynamics/ressources/Solidus.json rename to src/underworld/UWGeodynamics/resources/Solidus.json diff --git a/src/underworld/UWGeodynamics/ressources/ViscousRheologies.json b/src/underworld/UWGeodynamics/resources/ViscousRheologies.json similarity index 100% rename from src/underworld/UWGeodynamics/ressources/ViscousRheologies.json rename to src/underworld/UWGeodynamics/resources/ViscousRheologies.json diff --git a/src/underworld/UWGeodynamics/ressources b/src/underworld/UWGeodynamics/ressources new file mode 120000 index 000000000..07cf8016c --- /dev/null +++ b/src/underworld/UWGeodynamics/ressources @@ -0,0 +1 @@ +resources/ \ No newline at end of file