diff --git a/.github/workflows/python_deploy_dev.yml b/.github/workflows/python_deploy_dev.yml index 5e0e63e..fa98a59 100644 --- a/.github/workflows/python_deploy_dev.yml +++ b/.github/workflows/python_deploy_dev.yml @@ -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' diff --git a/.github/workflows/python_deploy_prod.yml b/.github/workflows/python_deploy_prod.yml index af97c71..5424e53 100644 --- a/.github/workflows/python_deploy_prod.yml +++ b/.github/workflows/python_deploy_prod.yml @@ -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: diff --git a/.gitignore b/.gitignore index 18509f5..49f361d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,8 @@ .idea /tests/**/*.geoh5 /dist/** + +#pycharm +/.idea/* +!/.idea/scopes/ +!/.idea/copyright/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c542e7b..cf8a808 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: @@ -31,7 +31,7 @@ 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: [ @@ -42,15 +42,15 @@ repos: ] 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 - repo: https://github.com/MiraGeoscience/pre-commit-hooks - rev: v1.0.1 + rev: v1.0.2 hooks: - id: check-copyright - files: (^LICENSE|^README(|-dev).rst|\.py|\.pyi)$ + files: (^package\.rst|^LICENSE|^README(|-dev)\.rst|\.py|\.pyi)$ exclude: (^\.|^docs/) - id: prepare-commit-msg - id: check-commit-msg diff --git a/LICENSE b/LICENSE index 8148138..ee3e01f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Mira Geoscience +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 d18d877..d91c291 100644 --- a/README.rst +++ b/README.rst @@ -71,4 +71,4 @@ Third Party Software notices and/or additional terms and conditions are located Copyright ^^^^^^^^^ -Copyright (c) 2024 Mira Geoscience Ltd. +Copyright (c) 2022-2025 Mira Geoscience Ltd. diff --git a/THIRD_PARTY_SOFTWARE.rst b/THIRD_PARTY_SOFTWARE.rst index 4b0240b..a304ef9 100644 --- a/THIRD_PARTY_SOFTWARE.rst +++ b/THIRD_PARTY_SOFTWARE.rst @@ -15,7 +15,7 @@ compatibly licensed. We list these here. - LGPL-3.0-or-later - Python API for geoh5, an open file format for geoscientific data * - `h5py `_ - - BSD License + - BSD-3-Clause - The h5py package provides both a high- and low-level interface to the HDF5 library from Python. * - `numpy `_ - BSD-3-Clause diff --git a/meta.yaml b/meta.yaml index d3930f9..2492b45 100644 --- a/meta.yaml +++ b/meta.yaml @@ -24,7 +24,7 @@ requirements: run: - python >=3.10.0,<4 - numpy >=1.26.0,<1.27.0 - - geoh5py >=0.10.0a1,<0.11.0a0.dev0 + - geoh5py >=0.10.0b1,<0.11.0a.dev test: imports: diff --git a/param_sweeps/__init__.py b/param_sweeps/__init__.py index c36d6e1..42812bb 100644 --- a/param_sweeps/__init__.py +++ b/param_sweeps/__init__.py @@ -1,9 +1,11 @@ -# Copyright (c) 2024 Mira Geoscience Ltd. -# -# This file is part of param-sweeps. -# -# param-sweeps is distributed under the terms and conditions of the MIT License -# (see LICENSE file at the root of this source code package). - +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' +# ' +# This file is part of param-sweeps package. ' +# ' +# param-sweeps is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' __version__ = "0.3.0-alpha.1" diff --git a/param_sweeps/constants.py b/param_sweeps/constants.py index c50b276..d35880a 100644 --- a/param_sweeps/constants.py +++ b/param_sweeps/constants.py @@ -1,9 +1,12 @@ -# Copyright (c) 2024 Mira Geoscience Ltd. -# -# This file is part of param-sweeps. -# -# param-sweeps is distributed under the terms and conditions of the MIT License -# (see LICENSE file at the root of this source code package). +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' +# ' +# This file is part of param-sweeps package. ' +# ' +# param-sweeps 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/param_sweeps/driver.py b/param_sweeps/driver.py index 66adfc5..277e5f3 100644 --- a/param_sweeps/driver.py +++ b/param_sweeps/driver.py @@ -1,9 +1,12 @@ -# Copyright (c) 2024 Mira Geoscience Ltd. -# -# This file is part of param-sweeps. -# -# param-sweeps is distributed under the terms and conditions of the MIT License -# (see LICENSE file at the root of this source code package). +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' +# ' +# This file is part of param-sweeps package. ' +# ' +# param-sweeps 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/param_sweeps/generate.py b/param_sweeps/generate.py index 7c25388..828a0b8 100644 --- a/param_sweeps/generate.py +++ b/param_sweeps/generate.py @@ -1,9 +1,12 @@ -# Copyright (c) 2024 Mira Geoscience Ltd. -# -# This file is part of param-sweeps. -# -# param-sweeps is distributed under the terms and conditions of the MIT License -# (see LICENSE file at the root of this source code package). +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' +# ' +# This file is part of param-sweeps package. ' +# ' +# param-sweeps 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/param_sweeps/sample_driver.py b/param_sweeps/sample_driver.py index aa6fb4f..4f81f70 100644 --- a/param_sweeps/sample_driver.py +++ b/param_sweeps/sample_driver.py @@ -1,9 +1,12 @@ -# Copyright (c) 2024 Mira Geoscience Ltd. -# -# This file is part of param-sweeps. -# -# param-sweeps is distributed under the terms and conditions of the MIT License -# (see LICENSE file at the root of this source code package). +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' +# ' +# This file is part of param-sweeps package. ' +# ' +# param-sweeps 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/pyproject.toml b/pyproject.toml index b6b94ff..ab2b33d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,12 +27,12 @@ classifiers = [ ] include = [ - { path = "COPYING", format = ["sdist", "wheel"] }, - { path = "COPYING.LESSER", format = ["sdist", "wheel"] }, - { path = "LICENSE", format = ["sdist", "wheel"] }, - { path = "README.rst", format = ["sdist", "wheel"] }, - { path = "THIRD_PARTY_SOFTWARE.rst", format = ["sdist", "wheel"] }, - { path = "docs/**/THIRD_PARTY_SOFTWARE.rst", format = ["sdist", "wheel"] }, + { path = "COPYING" }, + { path = "COPYING.LESSER" }, + { path = "LICENSE" }, + { path = "README.rst" }, + { path = "THIRD_PARTY_SOFTWARE.rst" }, + { path = "docs/**/THIRD_PARTY_SOFTWARE.rst" }, ] [tool.poetry.dependencies] diff --git a/tests/__init__.py b/tests/__init__.py index e7ad497..94351f8 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,6 +1,9 @@ -# Copyright (c) 2024 Mira Geoscience Ltd. -# -# This file is part of param-sweeps. -# -# param-sweeps is distributed under the terms and conditions of the MIT License -# (see LICENSE file at the root of this source code package). +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' +# ' +# This file is part of param-sweeps package. ' +# ' +# param-sweeps 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/driver_test.py b/tests/driver_test.py index a6e04bb..908e37d 100644 --- a/tests/driver_test.py +++ b/tests/driver_test.py @@ -1,9 +1,12 @@ -# Copyright (c) 2024 Mira Geoscience Ltd. -# -# This file is part of param-sweeps. -# -# param-sweeps is distributed under the terms and conditions of the MIT License -# (see LICENSE file at the root of this source code package). +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' +# ' +# This file is part of param-sweeps package. ' +# ' +# param-sweeps is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' import itertools import json @@ -51,9 +54,9 @@ def test_uuid_from_params(): iterations = list(itertools.product(*test.values())) for iteration in iterations: trial_uuid = SweepDriver.uuid_from_params(iteration) - assert trial_uuid == SweepDriver.uuid_from_params( - iteration - ), "method is not deterministic" + assert trial_uuid == SweepDriver.uuid_from_params(iteration), ( + "method is not deterministic" + ) def test_file_validation(tmp_path: Path): diff --git a/tests/generate_test.py b/tests/generate_test.py index 8ab0349..beca0e2 100644 --- a/tests/generate_test.py +++ b/tests/generate_test.py @@ -1,9 +1,12 @@ -# Copyright (c) 2024 Mira Geoscience Ltd. -# -# This file is part of param-sweeps. -# -# param-sweeps is distributed under the terms and conditions of the MIT License -# (see LICENSE file at the root of this source code package). +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' +# ' +# This file is part of param-sweeps package. ' +# ' +# param-sweeps is distributed under the terms and conditions of the MIT License ' +# (see LICENSE file at the root of this source code package). ' +# ' +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' import json from copy import deepcopy diff --git a/tests/version_test.py b/tests/version_test.py index 596b83b..790ed3c 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -1,9 +1,12 @@ -# Copyright (c) 2024 Mira Geoscience Ltd. -# -# This file is part of param-sweeps. -# -# param-sweeps is distributed under the terms and conditions of the MIT License -# (see LICENSE file at the root of this source code package). +# ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' +# Copyright (c) 2022-2025 Mira Geoscience Ltd. ' +# ' +# This file is part of param-sweeps package. ' +# ' +# param-sweeps 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 @@ -18,7 +21,7 @@ import param_sweeps -def get_version(): +def get_pyproject_version(): path = Path(__file__).resolve().parents[1] / "pyproject.toml" with open(str(path), encoding="utf-8") as file: @@ -42,7 +45,10 @@ def get_conda_recipe_version(): def test_version_is_consistent(): - assert param_sweeps.__version__ == get_version() + assert param_sweeps.__version__ == get_pyproject_version() + normalized_conda_version = Version(get_conda_recipe_version()) + normalized_version = Version(param_sweeps.__version__) + assert normalized_conda_version == normalized_version def test_conda_version_is_pep440():