From 9e7c58eb1b34a69924a30f4a19dbe78d626f5792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Fri, 10 Jan 2025 00:01:01 -0500 Subject: [PATCH 1/5] [GEOPY-1933] configure and add copyrights statements --- .idea/copyright/GMG.xml | 8 ++++++++ .idea/copyright/MiraGeoscience.xml | 8 ++++++++ .idea/copyright/profiles_settings.xml | 21 +++++++++++++++++++++ .idea/scopes/sources.xml | 4 ++-- .pre-commit-config.yaml | 25 +++++++++++++++++++++++-- LICENSE | 1 + README.rst | 3 ++- omf/__init__.py | 10 ++++++++++ omf/base.py | 10 ++++++++++ omf/data.py | 10 ++++++++++ omf/fileio/__init__.py | 10 ++++++++++ omf/fileio/fileio.py | 10 ++++++++++ omf/fileio/geoh5.py | 10 ++++++++++ omf/fileio/utils.py | 10 ++++++++++ omf/lineset.py | 10 ++++++++++ omf/pointset.py | 10 ++++++++++ omf/scripts/__init__.py | 9 +++++++++ omf/scripts/geoh5_to_omf.py | 10 ++++++++++ omf/scripts/omf_to_geoh5.py | 10 ++++++++++ omf/serializers.py | 10 ++++++++++ omf/surface.py | 10 ++++++++++ omf/texture.py | 10 ++++++++++ omf/volume.py | 10 ++++++++++ tests/__init__.py | 9 +++++++++ tests/conftest.py | 10 ++++++++++ tests/convert_curve_test.py | 10 ++++++++++ tests/convert_grid2d_test.py | 10 ++++++++++ tests/convert_pointset_test.py | 10 ++++++++++ tests/convert_project_test.py | 10 ++++++++++ tests/convert_surface_test.py | 10 ++++++++++ tests/convert_volume_test.py | 10 ++++++++++ tests/doc_example_test.py | 10 ++++++++++ tests/script_geoh5_to_omf_test.py | 10 ++++++++++ tests/script_omf_to_geoh5_test.py | 10 ++++++++++ tests/version_test.py | 10 ++++++++++ 35 files changed, 343 insertions(+), 5 deletions(-) create mode 100644 .idea/copyright/GMG.xml create mode 100644 .idea/copyright/MiraGeoscience.xml create mode 100644 .idea/copyright/profiles_settings.xml diff --git a/.idea/copyright/GMG.xml b/.idea/copyright/GMG.xml new file mode 100644 index 00000000..f32445b3 --- /dev/null +++ b/.idea/copyright/GMG.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/MiraGeoscience.xml b/.idea/copyright/MiraGeoscience.xml new file mode 100644 index 00000000..2d6a4985 --- /dev/null +++ b/.idea/copyright/MiraGeoscience.xml @@ -0,0 +1,8 @@ + + + + \ No newline at end of file diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml new file mode 100644 index 00000000..d2e98418 --- /dev/null +++ b/.idea/copyright/profiles_settings.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/scopes/sources.xml b/.idea/scopes/sources.xml index ac2cbbb6..f4755295 100644 --- a/.idea/scopes/sources.xml +++ b/.idea/scopes/sources.xml @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 18510fba..01c4a45b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,9 +52,30 @@ repos: - repo: https://github.com/MiraGeoscience/pre-commit-hooks rev: v1.0.2 hooks: -# - id: check-copyright # no copyright nor license notice: differ to upstream repo -# files: ^(omf/fileio/geoh5\.py$|omf/scripts/|tests/) + - id: check-copyright + files: (^package\.rst|^LICENSE|^README(|-dev)\.rst|\.py|\.pyi)$ + # do not check sources from the original omf package + exclude: | + (?x)( + ^\.| + ^docs/| + omf/( + fileio/__init__| + fileio/fileio| + fileio/utils| + __init__| + base| + data| + lineset| + pointset| + serializers| + surface| + texture| + volume).py| + tests/doc_example_test.py + )$ - id: prepare-commit-msg + - id: check-commit-msg - repo: local hooks: - id: pylint diff --git a/LICENSE b/LICENSE index 79729d2b..3833ab50 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,7 @@ MIT License Copyright (c) 2017 Global Mining Standards and Guidelines Group +Copyright (c) 2022-2025 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 diff --git a/README.rst b/README.rst index 95c7b8c0..7d7187c8 100644 --- a/README.rst +++ b/README.rst @@ -89,7 +89,8 @@ License ^^^^^^^ MIT License -Copyright (c) 2025 Mira Geoscience +Copyright (c) 2017 Global Mining Standards and Guidelines Group +Copyright (c) 2022-2025 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 diff --git a/omf/__init__.py b/omf/__init__.py index cc5c7b13..0ce739b5 100644 --- a/omf/__init__.py +++ b/omf/__init__.py @@ -1,5 +1,15 @@ """omf: API library for Open Mining Format file interchange format""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import logging import sys diff --git a/omf/base.py b/omf/base.py index 983da60c..b1a76611 100644 --- a/omf/base.py +++ b/omf/base.py @@ -1,5 +1,15 @@ """base.py: OMF Project and base classes for its components""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf 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 datetime diff --git a/omf/data.py b/omf/data.py index 5d41a45f..3cd34a28 100644 --- a/omf/data.py +++ b/omf/data.py @@ -1,5 +1,15 @@ """data.py: different ProjectElementData classes""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import numpy as np import properties diff --git a/omf/fileio/__init__.py b/omf/fileio/__init__.py index ac53c272..0e87312f 100644 --- a/omf/fileio/__init__.py +++ b/omf/fileio/__init__.py @@ -1,3 +1,13 @@ +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + from .fileio import OMFReader, OMFWriter from .geoh5 import GeoH5Writer from .utils import compare_elements diff --git a/omf/fileio/fileio.py b/omf/fileio/fileio.py index 0ad7dd13..bd214e95 100644 --- a/omf/fileio/fileio.py +++ b/omf/fileio/fileio.py @@ -1,5 +1,15 @@ """fileio.py: OMF Writer and Reader for serializing to and from .omf files""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf 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 json diff --git a/omf/fileio/geoh5.py b/omf/fileio/geoh5.py index 54d3bcc1..3e40652d 100644 --- a/omf/fileio/geoh5.py +++ b/omf/fileio/geoh5.py @@ -1,3 +1,13 @@ +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + # pylint: disable=too-many-lines from __future__ import annotations diff --git a/omf/fileio/utils.py b/omf/fileio/utils.py index 54f76d1e..c1128530 100644 --- a/omf/fileio/utils.py +++ b/omf/fileio/utils.py @@ -1,3 +1,13 @@ +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + from numpy import testing diff --git a/omf/lineset.py b/omf/lineset.py index d40c81d9..eb90d340 100644 --- a/omf/lineset.py +++ b/omf/lineset.py @@ -1,5 +1,15 @@ """lineset.py: LineSet element and geometry""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import numpy as np import properties diff --git a/omf/pointset.py b/omf/pointset.py index 64f4c140..e957a5ee 100644 --- a/omf/pointset.py +++ b/omf/pointset.py @@ -1,5 +1,15 @@ """pointset.py: PointSet element and geometry""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import properties from .base import ProjectElement, ProjectElementGeometry diff --git a/omf/scripts/__init__.py b/omf/scripts/__init__.py index e69de29b..d8b6fd73 100644 --- a/omf/scripts/__init__.py +++ b/omf/scripts/__init__.py @@ -0,0 +1,9 @@ +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf 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/omf/scripts/geoh5_to_omf.py b/omf/scripts/geoh5_to_omf.py index c58bcb67..a9412926 100644 --- a/omf/scripts/geoh5_to_omf.py +++ b/omf/scripts/geoh5_to_omf.py @@ -1,3 +1,13 @@ +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import argparse import logging import sys diff --git a/omf/scripts/omf_to_geoh5.py b/omf/scripts/omf_to_geoh5.py index f710ed5b..a0e285df 100644 --- a/omf/scripts/omf_to_geoh5.py +++ b/omf/scripts/omf_to_geoh5.py @@ -1,3 +1,13 @@ +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import argparse import logging import sys diff --git a/omf/serializers.py b/omf/serializers.py index 99c9998d..3715d52d 100644 --- a/omf/serializers.py +++ b/omf/serializers.py @@ -1,5 +1,15 @@ """serializers.py: array and image serializers/deserializers for OMF file IO""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import zlib from io import BytesIO diff --git a/omf/surface.py b/omf/surface.py index 7f3e0aac..cea30fac 100644 --- a/omf/surface.py +++ b/omf/surface.py @@ -1,5 +1,15 @@ """surface.py: Surface element and geometry""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import numpy as np import properties diff --git a/omf/texture.py b/omf/texture.py index 631406c7..8f00c902 100644 --- a/omf/texture.py +++ b/omf/texture.py @@ -1,5 +1,15 @@ """texture.py: contains ImageTexture definition""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import properties from .base import ContentModel diff --git a/omf/volume.py b/omf/volume.py index d399e47e..8982fb14 100644 --- a/omf/volume.py +++ b/omf/volume.py @@ -1,5 +1,15 @@ """volume.py: Volume element and geometry""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import numpy as np import properties diff --git a/tests/__init__.py b/tests/__init__.py index e69de29b..d8b6fd73 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -0,0 +1,9 @@ +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf 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 088d863b..4d71bdda 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,13 @@ +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + from pathlib import Path import numpy as np diff --git a/tests/convert_curve_test.py b/tests/convert_curve_test.py index bba8f5a3..4094a1c3 100644 --- a/tests/convert_curve_test.py +++ b/tests/convert_curve_test.py @@ -1,5 +1,15 @@ """Tests for PointSet validation""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + from pathlib import Path import numpy as np diff --git a/tests/convert_grid2d_test.py b/tests/convert_grid2d_test.py index 0975ba14..219eff30 100644 --- a/tests/convert_grid2d_test.py +++ b/tests/convert_grid2d_test.py @@ -1,5 +1,15 @@ """Tests for PointSet validation""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import logging from pathlib import Path diff --git a/tests/convert_pointset_test.py b/tests/convert_pointset_test.py index bbc259bc..3ca2cb98 100644 --- a/tests/convert_pointset_test.py +++ b/tests/convert_pointset_test.py @@ -1,5 +1,15 @@ """Tests for PointSet validation""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + from pathlib import Path import numpy as np diff --git a/tests/convert_project_test.py b/tests/convert_project_test.py index 586d12f7..2feca2fc 100644 --- a/tests/convert_project_test.py +++ b/tests/convert_project_test.py @@ -1,5 +1,15 @@ """Tests for PointSet validation""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import logging import os from pathlib import Path diff --git a/tests/convert_surface_test.py b/tests/convert_surface_test.py index 0b33e6eb..407df7c9 100644 --- a/tests/convert_surface_test.py +++ b/tests/convert_surface_test.py @@ -1,5 +1,15 @@ """Tests for PointSet validation""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + from pathlib import Path import numpy as np diff --git a/tests/convert_volume_test.py b/tests/convert_volume_test.py index 913e9323..b0a887d4 100644 --- a/tests/convert_volume_test.py +++ b/tests/convert_volume_test.py @@ -1,5 +1,15 @@ """Tests for PointSet validation""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + from pathlib import Path import numpy as np diff --git a/tests/doc_example_test.py b/tests/doc_example_test.py index 4374b72f..6131451f 100644 --- a/tests/doc_example_test.py +++ b/tests/doc_example_test.py @@ -1,3 +1,13 @@ +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + from pathlib import Path import omf diff --git a/tests/script_geoh5_to_omf_test.py b/tests/script_geoh5_to_omf_test.py index e21705fb..8c6c200f 100644 --- a/tests/script_geoh5_to_omf_test.py +++ b/tests/script_geoh5_to_omf_test.py @@ -1,3 +1,13 @@ +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + from pathlib import Path from unittest.mock import patch diff --git a/tests/script_omf_to_geoh5_test.py b/tests/script_omf_to_geoh5_test.py index 65d4bb79..159607cf 100644 --- a/tests/script_omf_to_geoh5_test.py +++ b/tests/script_omf_to_geoh5_test.py @@ -1,3 +1,13 @@ +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import re from pathlib import Path from unittest.mock import patch diff --git a/tests/version_test.py b/tests/version_test.py index 6f7c3725..571408d8 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -1,5 +1,15 @@ """Test the version follows SemVer and is consistent across files.""" +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2025 Mira Geoscience Ltd. ' +# ' +# This file is part of mira-omf package. ' +# ' +# mira-omf 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 re From 2e5a1b86b4e21aa4a7b7f75f8f985cc4b23ba709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Fri, 10 Jan 2025 00:08:32 -0500 Subject: [PATCH 2/5] [GEOPY-1933] dual copyright in __init__.py --- .pre-commit-config.yaml | 1 - omf/__init__.py | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 01c4a45b..97e94612 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -63,7 +63,6 @@ repos: fileio/__init__| fileio/fileio| fileio/utils| - __init__| base| data| lineset| diff --git a/omf/__init__.py b/omf/__init__.py index 0ce739b5..c9ead514 100644 --- a/omf/__init__.py +++ b/omf/__init__.py @@ -2,6 +2,9 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' # Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' # ' # This file is part of mira-omf package. ' # ' @@ -41,9 +44,12 @@ __version__ = "3.3.0-rc.1" -__author__ = "Global Mining Standards and Guidelines Group" +__author__ = "Global Mining Standards and Guidelines Group, Mira Geoscience Ltd." __license__ = "MIT License" -__copyright__ = "Copyright 2017 Global Mining Standards and Guidelines Group" +__copyright__ = ( + "Copyright 2017 Global Mining Standards and Guidelines Group, " + "Copyright 2022-2025 Mira Geoscience Ltd." +) def _create_logger(): From ddb77e4a342a75e3397fbc5c24533d999cf73cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Fri, 10 Jan 2025 00:31:53 -0500 Subject: [PATCH 3/5] [GEOPY-1933] dual copyright in __init__.py --- .idea/copyright/profiles_settings.xml | 2 +- omf/__init__.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.idea/copyright/profiles_settings.xml b/.idea/copyright/profiles_settings.xml index d2e98418..0313fd03 100644 --- a/.idea/copyright/profiles_settings.xml +++ b/.idea/copyright/profiles_settings.xml @@ -1,5 +1,5 @@ - + diff --git a/omf/__init__.py b/omf/__init__.py index c9ead514..b17ec295 100644 --- a/omf/__init__.py +++ b/omf/__init__.py @@ -1,8 +1,5 @@ """omf: API library for Open Mining Format file interchange format""" -# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' -# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' # Copyright (c) 2022-2025 Mira Geoscience Ltd. ' # ' @@ -13,6 +10,10 @@ # ' # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2017 Global Mining Standards and Guidelines Group ' +# '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + import logging import sys From 1c8e039ef678b75eef98aeb54ae8aedc189e6238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Fri, 10 Jan 2025 00:32:28 -0500 Subject: [PATCH 4/5] [GEOPY-1933] copyright date range: since 2022 --- omf/fileio/geoh5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omf/fileio/geoh5.py b/omf/fileio/geoh5.py index 3e40652d..143525fa 100644 --- a/omf/fileio/geoh5.py +++ b/omf/fileio/geoh5.py @@ -1,5 +1,5 @@ # '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' -# Copyright (c) 2025 Mira Geoscience Ltd. ' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' # ' # This file is part of mira-omf package. ' # ' From 8c2dd42388cbd3f3cfc2f387e0bad16d1d951970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Hensgen?= Date: Fri, 10 Jan 2025 01:00:24 -0500 Subject: [PATCH 5/5] [GEOPY-1933] fix file exclusion for copyright check --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 97e94612..4dc9ef07 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -57,8 +57,8 @@ repos: # do not check sources from the original omf package exclude: | (?x)( - ^\.| - ^docs/| + ^\..*| + ^docs/.*| omf/( fileio/__init__| fileio/fileio| @@ -70,8 +70,8 @@ repos: serializers| surface| texture| - volume).py| - tests/doc_example_test.py + volume)\.py| + tests/doc_example_test\.py )$ - id: prepare-commit-msg - id: check-commit-msg