Skip to content

Commit

Permalink
Merge pull request #85 from sebhmg/develop
Browse files Browse the repository at this point in the history
merge release branch to develop
  • Loading branch information
domfournier authored Jan 15, 2025
2 parents 1e4b708 + 251c298 commit 230a225
Show file tree
Hide file tree
Showing 40 changed files with 461 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python_deploy_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
call-workflow-pypi-publish:
name: Publish development pypi package (JFrog Artifactory and TestPyPI)
name: Publish development pypi package (JFrog Artifactory, TestPyPI)
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-publish_pypi_package.yml@main
with:
package-manager: 'poetry'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_deploy_prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
JFROG_ARTIFACTORY_URL: ${{ secrets.JFROG_ARTIFACTORY_URL }}
JFROG_ARTIFACTORY_TOKEN: ${{ secrets.JFROG_ARTIFACTORY_TOKEN }}
call-workflow-pypi-release:
name: Publish production PyPI package (JFrog Artifactory and PyPI)
name: Publish production PyPI package (JFrog Artifactory, PyPI)
if: ${{ github.event_name == 'release' || github.event.inputs.publish-pypi == 'true' }}
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-python-release_pypi_assets.yml@main
with:
Expand Down
8 changes: 8 additions & 0 deletions .idea/copyright/GMG.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/copyright/MiraGeoscience.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/scopes/sources.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 28 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ repos:
- id: poetry-check
args: [--lock]
- repo: https://github.com/hadialqattan/pycln
rev: v2.4.0
rev: v2.5.0
hooks:
- id: pycln
args: [--config=pyproject.toml]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.0
rev: v0.9.0
hooks:
- id: ruff
args:
Expand All @@ -31,29 +31,50 @@ repos:
# - --unsafe-fixes
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.12.0
rev: v1.14.1
hooks:
- id: mypy
additional_dependencies: [
# numpy==1.26.*, # TODO: fix mypy errors related to numpy
tomli, # to read config from pyproject.toml
types-six,
types-toml,
types-PyYAML
]
files: ^(omf/fileio/geoh5\.py$|omf/scripts/|tests/)
exclude: ^docs/
- repo: https://github.com/codingjoe/relint
rev: 3.2.0
rev: 3.3.1
hooks:
- id: relint
args: [-W] # to fail on warnings
files: ^(omf/fileio/geoh5\.py$|omf/scripts/|tests/)
- repo: https://github.com/MiraGeoscience/pre-commit-hooks
rev: v1.0.1
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|
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
Expand Down
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ This library makes use of the `properties <https://github.com/seequent/propertie
open-source project, which is designed and publicly supported by
`Seequent <https://seequent.com>`_.

Connection to the geoh5 format makes use of `geoh5py <https://geoh5py.readthedocs.io/>`_
Connection to the geoh5 format makes use of `geoh5py <https://mirageoscience-geoh5py.readthedocs-hosted.com/>`_
publicly supported by `Mira Geoscience <https://mirageoscience.com/>`_

Installation
Expand All @@ -89,7 +89,8 @@ License
^^^^^^^
MIT License

Copyright (c) 2024 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
Expand Down
4 changes: 2 additions & 2 deletions meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build:

requirements:
host:
- python >=3.10.0,<3.11
- python >=3.10.0,<4.0.0
- poetry-core >=1.0.0
- setuptools
- pip
Expand All @@ -26,7 +26,7 @@ requirements:
- pypng 0.20220715.*
- six >=1.16.0
- vectormath >=0.2.0
- geoh5py >=0.9.1a0.dev0,<0.11.0a0.dev0
- geoh5py >=0.10.0b1,<0.11.0a.dev

about:
license: MIT
Expand Down
21 changes: 19 additions & 2 deletions omf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
"""omf: API library for Open Mining Format file interchange format"""

# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
# Copyright (c) 2022-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). '
# '
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
# Copyright (c) 2017 Global Mining Standards and Guidelines Group '
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

import logging
import sys

Expand Down Expand Up @@ -31,9 +45,12 @@


__version__ = "3.4.0-alpha.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():
Expand Down
10 changes: 10 additions & 0 deletions omf/base.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 10 additions & 0 deletions omf/data.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
10 changes: 10 additions & 0 deletions omf/fileio/__init__.py
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions omf/fileio/fileio.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 10 additions & 0 deletions omf/fileio/geoh5.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
# Copyright (c) 2022-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
Expand Down
10 changes: 10 additions & 0 deletions omf/fileio/utils.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down
10 changes: 10 additions & 0 deletions omf/lineset.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
10 changes: 10 additions & 0 deletions omf/pointset.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 9 additions & 0 deletions omf/scripts/__init__.py
Original file line number Diff line number Diff line change
@@ -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). '
# '
# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
10 changes: 10 additions & 0 deletions omf/scripts/geoh5_to_omf.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 10 additions & 0 deletions omf/scripts/omf_to_geoh5.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 10 additions & 0 deletions omf/serializers.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Loading

0 comments on commit 230a225

Please sign in to comment.