From 5833357a28877401f5ea6df4ec69eff831d5d12f Mon Sep 17 00:00:00 2001 From: benjamink Date: Wed, 1 Nov 2023 13:54:58 -0700 Subject: [PATCH 01/13] Add license and readme files --- LICENSE.txt | 21 +++++++++++++++++++++ README.md | 31 +++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 LICENSE.txt create mode 100644 README.md diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..63604bb --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Mira Geoscience + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..fc5e30a --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# las-geoh5 + +Import/Export LAS files to/from geoh5 format. + +This package contains three modules for import/export of LAS +files in and out of a geoh5 file. the import/export directories +modules allow export and subsequent re-import of LAS files from +a drillhole group saved in a geoh5 file to a structured set of +directories on disk. The import files module is intended for the +more general case of LAS file import to an existing drillhole +group. + + +### Basic Usage + +The most convenient way to use this package is through +[Geoscience ANALYST Pro](https://mirageoscience.com/mining-industry-software/geoscience-analyst-pro/) where the import files driver may be +run from the **file -> import** menu. + +All drivers may also be run from a ui.json file in +[Geoscience ANALYST Pro](https://mirageoscience.com/mining-industry-software/geoscience-analyst-pro/) by either adding to the Python Scripts +directory or drag and drop into the viewport. Defaulted ui.json +files can be found in the uijson folder of the las-geoh5 project. + +Finally, the drivers can be run from CLI using the following + +```bash +python -m las_geoh5.module.driver some_file.ui.json +``` + +Where module is one of `import_files`, `export_files`, or `import_las`. From abf5fff4f21dfe5706bba865a208df62d85d3154 Mon Sep 17 00:00:00 2001 From: benjamink Date: Thu, 2 Nov 2023 12:13:55 -0700 Subject: [PATCH 02/13] Reference license in readme --- README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/README.md b/README.md index fc5e30a..98cf3f8 100644 --- a/README.md +++ b/README.md @@ -29,3 +29,28 @@ python -m las_geoh5.module.driver some_file.ui.json ``` Where module is one of `import_files`, `export_files`, or `import_las`. + + +### License + +MIT License + +Copyright (c) 2023 Mira Geoscience + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file From b434232b17b9fa406a1d0dec63c2f25f75c1c1a4 Mon Sep 17 00:00:00 2001 From: benjamink Date: Thu, 2 Nov 2023 13:02:12 -0700 Subject: [PATCH 03/13] add classifiers --- pyproject.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 2457913..44f8e1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,6 +3,21 @@ name = "las-geoh5" version = "0.0.1" description = "Las/Geoh5 conversion" authors = ["Mira Geoscience "] +keywords = ["geology", "geophysics", "earth sciences"] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", + "Topic :: Scientific/Engineering :: Mathematics", + "Topic :: Scientific/Engineering :: Physics", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX", + "Operating System :: Unix", + "Operating System :: MacOS", + "Natural Language :: English", +] [tool.poetry.dependencies] python = "^3.9, <3.11" From bb817f542000daa06febebf5f86c2793f7a16079 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 2 Nov 2023 20:08:32 +0000 Subject: [PATCH 04/13] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 98cf3f8..5d8694a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Import/Export LAS files to/from geoh5 format. This package contains three modules for import/export of LAS files in and out of a geoh5 file. the import/export directories modules allow export and subsequent re-import of LAS files from -a drillhole group saved in a geoh5 file to a structured set of +a drillhole group saved in a geoh5 file to a structured set of directories on disk. The import files module is intended for the more general case of LAS file import to an existing drillhole group. @@ -13,11 +13,11 @@ group. ### Basic Usage -The most convenient way to use this package is through +The most convenient way to use this package is through [Geoscience ANALYST Pro](https://mirageoscience.com/mining-industry-software/geoscience-analyst-pro/) where the import files driver may be run from the **file -> import** menu. -All drivers may also be run from a ui.json file in +All drivers may also be run from a ui.json file in [Geoscience ANALYST Pro](https://mirageoscience.com/mining-industry-software/geoscience-analyst-pro/) by either adding to the Python Scripts directory or drag and drop into the viewport. Defaulted ui.json files can be found in the uijson folder of the las-geoh5 project. @@ -53,4 +53,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. From 0e61a16b0c052118bc0a18115eb593a5ead2e19e Mon Sep 17 00:00:00 2001 From: benjamink Date: Mon, 6 Nov 2023 09:24:58 -0800 Subject: [PATCH 05/13] Update package name in copyright --- las_geoh5/export_directories/__init__.py | 2 +- las_geoh5/export_directories/driver.py | 2 +- las_geoh5/export_directories/uijson.py | 2 +- las_geoh5/import_directories/__init__.py | 2 +- las_geoh5/import_directories/driver.py | 2 +- las_geoh5/import_directories/uijson.py | 2 +- las_geoh5/import_files/__init__.py | 2 +- las_geoh5/import_files/driver.py | 2 +- las_geoh5/import_files/uijson.py | 2 +- las_geoh5/import_las.py | 3 +-- las_geoh5/uijson/__init__.py | 2 +- las_geoh5/uijson/write_uijson.py | 2 +- tests/import_las_test.py | 2 +- 13 files changed, 13 insertions(+), 14 deletions(-) diff --git a/las_geoh5/export_directories/__init__.py b/las_geoh5/export_directories/__init__.py index c9dfb3b..30c03b2 100644 --- a/las_geoh5/export_directories/__init__.py +++ b/las_geoh5/export_directories/__init__.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # diff --git a/las_geoh5/export_directories/driver.py b/las_geoh5/export_directories/driver.py index d0b5ccd..3b5f0fc 100644 --- a/las_geoh5/export_directories/driver.py +++ b/las_geoh5/export_directories/driver.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # diff --git a/las_geoh5/export_directories/uijson.py b/las_geoh5/export_directories/uijson.py index 3c5ed4c..030a411 100644 --- a/las_geoh5/export_directories/uijson.py +++ b/las_geoh5/export_directories/uijson.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # diff --git a/las_geoh5/import_directories/__init__.py b/las_geoh5/import_directories/__init__.py index c9dfb3b..30c03b2 100644 --- a/las_geoh5/import_directories/__init__.py +++ b/las_geoh5/import_directories/__init__.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # diff --git a/las_geoh5/import_directories/driver.py b/las_geoh5/import_directories/driver.py index d950514..2c01216 100644 --- a/las_geoh5/import_directories/driver.py +++ b/las_geoh5/import_directories/driver.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # diff --git a/las_geoh5/import_directories/uijson.py b/las_geoh5/import_directories/uijson.py index 9e02337..fc2abb2 100644 --- a/las_geoh5/import_directories/uijson.py +++ b/las_geoh5/import_directories/uijson.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # diff --git a/las_geoh5/import_files/__init__.py b/las_geoh5/import_files/__init__.py index c9dfb3b..30c03b2 100644 --- a/las_geoh5/import_files/__init__.py +++ b/las_geoh5/import_files/__init__.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # diff --git a/las_geoh5/import_files/driver.py b/las_geoh5/import_files/driver.py index fe3fe83..5191dd4 100644 --- a/las_geoh5/import_files/driver.py +++ b/las_geoh5/import_files/driver.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # diff --git a/las_geoh5/import_files/uijson.py b/las_geoh5/import_files/uijson.py index 6d4506d..362a412 100644 --- a/las_geoh5/import_files/uijson.py +++ b/las_geoh5/import_files/uijson.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # diff --git a/las_geoh5/import_las.py b/las_geoh5/import_las.py index 5b6beac..a62f825 100644 --- a/las_geoh5/import_las.py +++ b/las_geoh5/import_las.py @@ -16,7 +16,6 @@ from geoh5py.groups import DrillholeGroup from geoh5py.objects import Drillhole from geoh5py.shared import Entity -from tqdm import tqdm class LASTranslator: @@ -362,7 +361,7 @@ def las_to_drillhole( # pylint: disable=too-many-arguments if translator is None: translator = LASTranslator() - for datum in tqdm(data): + for datum in data: collar = get_collar(datum, translator) if all(k == 0 for k in collar) and skip_empty_header: continue diff --git a/las_geoh5/uijson/__init__.py b/las_geoh5/uijson/__init__.py index c9dfb3b..30c03b2 100644 --- a/las_geoh5/uijson/__init__.py +++ b/las_geoh5/uijson/__init__.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # diff --git a/las_geoh5/uijson/write_uijson.py b/las_geoh5/uijson/write_uijson.py index 900ad71..7a5b698 100644 --- a/las_geoh5/uijson/write_uijson.py +++ b/las_geoh5/uijson/write_uijson.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # diff --git a/tests/import_las_test.py b/tests/import_las_test.py index ce90ab8..05b215e 100644 --- a/tests/import_las_test.py +++ b/tests/import_las_test.py @@ -1,6 +1,6 @@ # Copyright (c) 2023 Mira Geoscience Ltd. # -# This file is part of my_app project. +# This file is part of las-geoh5 project. # # All rights reserved. # From 2bf08f19ff63adacdc489ee7031d7e7fd1a000c9 Mon Sep 17 00:00:00 2001 From: benjamink Date: Mon, 6 Nov 2023 09:28:13 -0800 Subject: [PATCH 06/13] fix import --- las_geoh5/import_las.py | 1 + 1 file changed, 1 insertion(+) diff --git a/las_geoh5/import_las.py b/las_geoh5/import_las.py index bce02d0..b1d0f35 100644 --- a/las_geoh5/import_las.py +++ b/las_geoh5/import_las.py @@ -16,6 +16,7 @@ from geoh5py.groups import DrillholeGroup from geoh5py.objects import Drillhole from geoh5py.shared import Entity +from tqdm import tqdm class LASTranslator: From 216b16c3a3e2d771dfc56df0004fc397aff18712 Mon Sep 17 00:00:00 2001 From: dominiquef Date: Mon, 6 Nov 2023 09:44:18 -0800 Subject: [PATCH 07/13] Add reference to LICENSE file --- las_geoh5/__init__.py | 4 +++- las_geoh5/export_directories/__init__.py | 3 ++- las_geoh5/export_directories/driver.py | 3 ++- las_geoh5/export_directories/uijson.py | 3 ++- las_geoh5/export_las.py | 3 ++- las_geoh5/import_directories/__init__.py | 3 ++- las_geoh5/import_directories/driver.py | 3 ++- las_geoh5/import_directories/uijson.py | 3 ++- las_geoh5/import_files/__init__.py | 3 ++- las_geoh5/import_files/driver.py | 3 ++- las_geoh5/import_files/uijson.py | 3 ++- las_geoh5/import_las.py | 5 ++++- tests/__init__.py | 4 +++- tests/conftest.py | 4 +++- tests/geoh5_to_las_test.py | 3 ++- tests/import_las_test.py | 3 ++- tests/version_test.py | 4 +++- tests/write_uijson_test.py | 3 ++- 18 files changed, 42 insertions(+), 18 deletions(-) diff --git a/las_geoh5/__init__.py b/las_geoh5/__init__.py index 3385381..c821f77 100644 --- a/las_geoh5/__init__.py +++ b/las_geoh5/__init__.py @@ -2,7 +2,9 @@ # # This file is part of las_geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). +# # flake8: noqa diff --git a/las_geoh5/export_directories/__init__.py b/las_geoh5/export_directories/__init__.py index 30c03b2..a27c0dc 100644 --- a/las_geoh5/export_directories/__init__.py +++ b/las_geoh5/export_directories/__init__.py @@ -2,5 +2,6 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # diff --git a/las_geoh5/export_directories/driver.py b/las_geoh5/export_directories/driver.py index 3b5f0fc..9ee8746 100644 --- a/las_geoh5/export_directories/driver.py +++ b/las_geoh5/export_directories/driver.py @@ -2,7 +2,8 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # from __future__ import annotations diff --git a/las_geoh5/export_directories/uijson.py b/las_geoh5/export_directories/uijson.py index 030a411..e6785c8 100644 --- a/las_geoh5/export_directories/uijson.py +++ b/las_geoh5/export_directories/uijson.py @@ -2,7 +2,8 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # diff --git a/las_geoh5/export_las.py b/las_geoh5/export_las.py index ab22c24..9066d30 100644 --- a/las_geoh5/export_las.py +++ b/las_geoh5/export_las.py @@ -2,7 +2,8 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # from __future__ import annotations diff --git a/las_geoh5/import_directories/__init__.py b/las_geoh5/import_directories/__init__.py index 30c03b2..a27c0dc 100644 --- a/las_geoh5/import_directories/__init__.py +++ b/las_geoh5/import_directories/__init__.py @@ -2,5 +2,6 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # diff --git a/las_geoh5/import_directories/driver.py b/las_geoh5/import_directories/driver.py index 2c01216..d41ae6d 100644 --- a/las_geoh5/import_directories/driver.py +++ b/las_geoh5/import_directories/driver.py @@ -2,7 +2,8 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # from __future__ import annotations diff --git a/las_geoh5/import_directories/uijson.py b/las_geoh5/import_directories/uijson.py index fc2abb2..f83119c 100644 --- a/las_geoh5/import_directories/uijson.py +++ b/las_geoh5/import_directories/uijson.py @@ -2,7 +2,8 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # from copy import deepcopy diff --git a/las_geoh5/import_files/__init__.py b/las_geoh5/import_files/__init__.py index 30c03b2..a27c0dc 100644 --- a/las_geoh5/import_files/__init__.py +++ b/las_geoh5/import_files/__init__.py @@ -2,5 +2,6 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # diff --git a/las_geoh5/import_files/driver.py b/las_geoh5/import_files/driver.py index 92f74a0..efa5535 100644 --- a/las_geoh5/import_files/driver.py +++ b/las_geoh5/import_files/driver.py @@ -2,7 +2,8 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # from __future__ import annotations diff --git a/las_geoh5/import_files/uijson.py b/las_geoh5/import_files/uijson.py index 362a412..4850a27 100644 --- a/las_geoh5/import_files/uijson.py +++ b/las_geoh5/import_files/uijson.py @@ -2,7 +2,8 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # from copy import deepcopy diff --git a/las_geoh5/import_las.py b/las_geoh5/import_las.py index bce02d0..17de148 100644 --- a/las_geoh5/import_las.py +++ b/las_geoh5/import_las.py @@ -2,8 +2,10 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # + from __future__ import annotations import warnings @@ -16,6 +18,7 @@ from geoh5py.groups import DrillholeGroup from geoh5py.objects import Drillhole from geoh5py.shared import Entity +from tqdm import tqdm class LASTranslator: diff --git a/tests/__init__.py b/tests/__init__.py index 6c429b8..0689ce4 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -2,4 +2,6 @@ # # This file is part of las_geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). +# diff --git a/tests/conftest.py b/tests/conftest.py index 22692c4..09d2e82 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,7 +2,9 @@ # # This file is part of las_geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). +# from __future__ import annotations diff --git a/tests/geoh5_to_las_test.py b/tests/geoh5_to_las_test.py index 0834fdf..2b4cae4 100644 --- a/tests/geoh5_to_las_test.py +++ b/tests/geoh5_to_las_test.py @@ -2,7 +2,8 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # import random diff --git a/tests/import_las_test.py b/tests/import_las_test.py index 05b215e..13a27bc 100644 --- a/tests/import_las_test.py +++ b/tests/import_las_test.py @@ -2,7 +2,8 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # from __future__ import annotations diff --git a/tests/version_test.py b/tests/version_test.py index d8249bf..f269272 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -2,7 +2,9 @@ # # This file is part of las_geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). +# from __future__ import annotations diff --git a/tests/write_uijson_test.py b/tests/write_uijson_test.py index a411a17..169e232 100644 --- a/tests/write_uijson_test.py +++ b/tests/write_uijson_test.py @@ -2,7 +2,8 @@ # # This file is part of las-geoh5 project. # -# All rights reserved. +# las-geoh5 is distributed under the terms and conditions of the MIT License +# (see LICENSE file at the root of this source code package). # from las_geoh5.uijson.write_uijson import main From 557a7ca197d6169016cf53c033bf49adb5bdcb83 Mon Sep 17 00:00:00 2001 From: dominiquef Date: Mon, 6 Nov 2023 10:20:14 -0800 Subject: [PATCH 08/13] Bump version --- las_geoh5/__init__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/las_geoh5/__init__.py b/las_geoh5/__init__.py index c821f77..a92004f 100644 --- a/las_geoh5/__init__.py +++ b/las_geoh5/__init__.py @@ -8,4 +8,4 @@ # flake8: noqa -__version__ = "0.0.1" +__version__ = "0.1.0" diff --git a/pyproject.toml b/pyproject.toml index 709c261..d20daac 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "las-geoh5" -version = "0.0.1" +version = "0.1.0" description = "Las/Geoh5 conversion" authors = ["Mira Geoscience "] keywords = ["geology", "geophysics", "earth sciences"] From 5b2147995c30b66c5a8d7307bf25565d35e826e7 Mon Sep 17 00:00:00 2001 From: dominiquef Date: Mon, 6 Nov 2023 13:37:58 -0800 Subject: [PATCH 09/13] Edit pyproject as per comments --- pyproject.toml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d20daac..3782599 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,8 +2,11 @@ name = "las-geoh5" version = "0.1.0" description = "Las/Geoh5 conversion" +license = "MIT" +readme = "README.md" +homepage = "https://mirageoscience.com" authors = ["Mira Geoscience "] -keywords = ["geology", "geophysics", "earth sciences"] +keywords = ["packaging", "poetry"] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", @@ -43,8 +46,6 @@ include_trailing_comma = true force_grid_wrap = 0 use_parentheses = true line_length = 88 -# auto-updated by seed-isort-config -known_third_party = ["geoh5py", "lasio", "numpy", "pytest", "toml", "tqdm"] [tool.black] # defaults are just fine From eaecb3d0eb6255c4e109a87853b3145c54d3b760 Mon Sep 17 00:00:00 2001 From: dominiquef Date: Tue, 7 Nov 2023 08:03:11 -0800 Subject: [PATCH 10/13] Change again --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3782599..4474df3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ license = "MIT" readme = "README.md" homepage = "https://mirageoscience.com" authors = ["Mira Geoscience "] -keywords = ["packaging", "poetry"] +keywords = ["geology", "geophysics", "earth sciences"] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", From 1b7b065f7550d46f785c70a7cc6966982ce070ac Mon Sep 17 00:00:00 2001 From: sebhmg Date: Tue, 7 Nov 2023 11:09:15 -0500 Subject: [PATCH 11/13] no need for license classifier: poetry will add it when building for Pypi --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4474df3..caad2fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,6 @@ keywords = ["geology", "geophysics", "earth sciences"] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research", - "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Mathematics", From 099bba42c6652cb753fe6057d940190c4dc54810 Mon Sep 17 00:00:00 2001 From: sebhmg Date: Tue, 7 Nov 2023 11:18:45 -0500 Subject: [PATCH 12/13] convert README to rst --- README.md | 56 ----------------------------------- README.rst | 58 +++++++++++++++++++++++++++++++++++++ devtools/check-copyright.py | 14 +++++++-- pyproject.toml | 2 +- 4 files changed, 70 insertions(+), 60 deletions(-) delete mode 100644 README.md create mode 100644 README.rst diff --git a/README.md b/README.md deleted file mode 100644 index 5d8694a..0000000 --- a/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# las-geoh5 - -Import/Export LAS files to/from geoh5 format. - -This package contains three modules for import/export of LAS -files in and out of a geoh5 file. the import/export directories -modules allow export and subsequent re-import of LAS files from -a drillhole group saved in a geoh5 file to a structured set of -directories on disk. The import files module is intended for the -more general case of LAS file import to an existing drillhole -group. - - -### Basic Usage - -The most convenient way to use this package is through -[Geoscience ANALYST Pro](https://mirageoscience.com/mining-industry-software/geoscience-analyst-pro/) where the import files driver may be -run from the **file -> import** menu. - -All drivers may also be run from a ui.json file in -[Geoscience ANALYST Pro](https://mirageoscience.com/mining-industry-software/geoscience-analyst-pro/) by either adding to the Python Scripts -directory or drag and drop into the viewport. Defaulted ui.json -files can be found in the uijson folder of the las-geoh5 project. - -Finally, the drivers can be run from CLI using the following - -```bash -python -m las_geoh5.module.driver some_file.ui.json -``` - -Where module is one of `import_files`, `export_files`, or `import_las`. - - -### License - -MIT License - -Copyright (c) 2023 Mira Geoscience - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..28306da --- /dev/null +++ b/README.rst @@ -0,0 +1,58 @@ +las-geoh5 +========= + +Import/Export LAS files to/from geoh5 format. + +This package contains three modules for import/export of LAS files in +and out of a geoh5 file. the import/export directories modules allow +export and subsequent re-import of LAS files from a drillhole group +saved in a geoh5 file to a structured set of directories on disk. The +import files module is intended for the more general case of LAS file +import to an existing drillhole group. + +Basic Usage +----------- +.. _Geoscience ANALYST Pro: https://mirageoscience.com/mining-industry-software/geoscience-analyst-pro/ + +The most convenient way to use this package is through `Geoscience ANALYST Pro`_ +where the import files driver may be run from the **file -> import** +menu. + +All drivers may also be run from a ui.json file in `Geoscience ANALYST Pro`_ +by either adding to the Python Scripts directory or drag and drop into +the viewport. Defaulted ui.json files can be found in the uijson folder +of the las-geoh5 project. + +Finally, the drivers can be run from CLI using the following + +.. code:: bash + + python -m las_geoh5.module.driver some_file.ui.json + +Where module is one of ``import_files``, ``export_files``, or ``import_las``. + +License +------- + +MIT License + +Copyright (c) 2023 Mira Geoscience + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +“Software”), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/devtools/check-copyright.py b/devtools/check-copyright.py index 680b39f..725bd7c 100644 --- a/devtools/check-copyright.py +++ b/devtools/check-copyright.py @@ -1,16 +1,22 @@ #!/usr/bin/env python3 -# Copyright (c) 2023 Mira Geoscience Ltd. +# Copyright (c) 2022-2023 Mira Geoscience Ltd. +# +# This file is part of Orano RnD project. # # All rights reserved. +from __future__ import annotations + import re import sys from datetime import date if __name__ == "__main__": current_year = date.today().year - copyright_re = re.compile(rf"\bcopyright \(c\) \b{current_year}\b", re.IGNORECASE) + copyright_re = re.compile( + rf"\bcopyright \(c\) (:?\d{{4}}-|)\b{current_year}\b", re.IGNORECASE + ) files = sys.argv[1:] max_lines = 10 report_files = [] @@ -20,7 +26,9 @@ has_dated_copyright = False for line in file: count += 1 - if count >= max_lines: + if count >= max_lines and not ( + f.endswith("README.rst") or f.endswith("README-dev.rst") + ): break if re.search(copyright_re, line): has_dated_copyright = True diff --git a/pyproject.toml b/pyproject.toml index caad2fe..1a68b90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "las-geoh5" version = "0.1.0" description = "Las/Geoh5 conversion" license = "MIT" -readme = "README.md" +readme = "README.rst" homepage = "https://mirageoscience.com" authors = ["Mira Geoscience "] keywords = ["geology", "geophysics", "earth sciences"] From da56e3c3ed43d9b98ede07f939deb85281b4f0f9 Mon Sep 17 00:00:00 2001 From: sebhmg Date: Tue, 7 Nov 2023 11:20:38 -0500 Subject: [PATCH 13/13] more keywords, taken from lasio and geoh5 package --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1a68b90..1634e56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ license = "MIT" readme = "README.rst" homepage = "https://mirageoscience.com" authors = ["Mira Geoscience "] -keywords = ["geology", "geophysics", "earth sciences"] +keywords = ["geology", "geophysics", "earth sciences", "io", "data", "interoperability"] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Science/Research",