Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Byte-compiled / optimized / DLL files
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

default_language_version:
python: python3
python: python3.12
exclude: ^docs/(conf.py|_ext/)
default_stages: [pre-commit,pre-push]
fail_fast: false
Expand All @@ -12,7 +12,7 @@ ci:

repos:
- repo: https://github.com/python-poetry/poetry
rev: 2.2.1
rev: 2.4.1
hooks:
- id: poetry-check
args: [--lock, --no-plugins]
Expand All @@ -22,16 +22,16 @@ repos:
- id: pycln
args: [--config=pyproject.toml]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
rev: v0.15.15
hooks:
- id: ruff-check
args:
- --fix
- --exit-non-zero-on-fix
# - --unsafe-fixes
# - --unsafe-fixes
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
rev: v2.1.0
hooks:
- id: mypy
additional_dependencies: [
Expand Down Expand Up @@ -85,7 +85,7 @@ repos:
types: [python]
exclude: ^docs/
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
rev: v2.4.2
hooks:
- id: codespell
exclude: (\.lock|\.ipynb|^THIRD_PARTY_SOFTWARE\.rst)$
Expand Down
2 changes: 1 addition & 1 deletion omf/fileio/fileio.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def __init__(self, project: UidModel, fname: str, compression: int = 5):
Binary data is written during project serialization
"""

if fname.endswith("geoh5"):
if fname.endswith(".geoh5"):
GeoH5Writer(project, fname, compression=compression)
else:
if not fname.endswith(".omf"):
Expand Down
976 changes: 516 additions & 460 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,16 @@ standard-imghdr = "3.13.*"

## dependencies from Git repositories
#------------------------------------
#geoh5py = {version = ">=0.12.0b5, <0.13.dev", allow-prereleases = true}
geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "develop"}
geoh5py = {version = ">=0.13.0b1, 0.13.*", allow-prereleases = true}
#geoh5py = {git = "https://github.com/MiraGeoscience/geoh5py.git", rev = "develop"}
#geoh5py = {path = "../geoh5py", develop = true}

[tool.poetry.group.dev.dependencies]
Pygments = "*"
pylint = "*"
pytest = "*"
pytest-cov = "*"
sphinx = "*"
sphinx = "5.3.*"
pyyaml = '*'
packaging = '*'

Expand Down
6 changes: 4 additions & 2 deletions recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ requirements:
- python ${{ python_min }}.*
- poetry-core >=1.8.0
- poetry-dynamic-versioning >=1.9, 1.*
- setuptools
run:
- python >=${{ python_min }}
# Mira packages
- geoh5py >=0.13.0a2, 0.13.*
- geoh5py >=0.13.0b1, 0.13.*
# direct dependencies
- numpy 2.4.*
- properties 0.6.*
Expand All @@ -44,6 +43,7 @@ requirements:

tests:
- python:
python_version: ${{ python_min }}.*
imports:
- ${{ module_name }}
- ${{ module_name }}._version
Expand Down Expand Up @@ -77,4 +77,6 @@ about:
extra:
recipe-maintainers:
- andrewg-mira
- domfournier
- RomFloreani
- sebhmg
4 changes: 3 additions & 1 deletion tests/convert_project_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def test_project_compression(random_project: omf.Project, tmp_path: Path):
size_med_comp = os.stat(file_med_comp).st_size
size_high_comp = os.stat(file_high_comp).st_size

assert size_low_comp > size_med_comp > size_high_comp
assert size_low_comp > size_high_comp
assert size_low_comp > size_med_comp
assert size_med_comp > size_high_comp


def test_container_group(random_project: omf.Project, tmp_path: Path):
Expand Down
Loading