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
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
*.pt filter=lfs diff=lfs merge=lfs -text
*.geoh5 filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.min.js filter=lfs diff=lfs merge=lfs -text
*.ipynb filter=lfs diff=lfs merge=lfs -text
69 changes: 27 additions & 42 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
default_language_version:
python: python3
exclude: (^docs/(conf.py|_ext/))
default_stages: [commit,push]
default_stages: [pre-commit,pre-push]
fail_fast: false

ci:
Expand All @@ -12,44 +12,45 @@ ci:

repos:
- 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/PyCQA/isort
rev: 5.13.2
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
hooks:
- id: isort
additional_dependencies: [tomli] # to read config from pyproject.toml
- repo: https://github.com/psf/black
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py310-plus]
- id: ruff
args:
- --fix
- --exit-non-zero-on-fix
# - --unsafe-fixes
exclude_types: [jupyter]
- id: ruff-format
exclude_types: [jupyter]
#- repo: https://github.com/pre-commit/mirrors-mypy # TODO: fix mypy errors
# rev: v1.10.0
# hooks:
# - id: mypy
# additional_dependencies: [
# numpy==1.26.*, # pre-commit CI does not provide numpy 1.23.*
# numpy==1.26.*,
# types-toml,
# types-PyYAML,
# tomli # to read config from pyproject.toml
# ]
# exclude: ^(docs|geoapps-assets)/
- repo: https://github.com/codingjoe/relint
rev: 3.1.1
rev: 3.3.1
hooks:
- id: relint
args: [-W] # to fail on warnings
- repo: https://github.com/MiraGeoscience/pre-commit-hooks
rev: v1.1.0
hooks:
- id: check-copyright
files: (^package\.rst|^LICENSE|^README(|-dev)\.rst|\.py|\.pyi)$
exclude: (^\.|^docs/)
- id: prepare-commit-msg
- id: check-commit-msg
- repo: local
hooks:
- id: pylint
Expand All @@ -59,39 +60,23 @@ repos:
require_serial: true # pylint does its own parallelism
types: [python]
exclude: ^(devtools|docs)/
- id: check-copyright
name: Check copyright
entry: python devtools/check-copyright.py
language: python
types: [text]
files: (^LICENSE|^README(|-dev).rst|\.py|\.pyi)$
exclude: (^\.|^docs/)
- id: prepare-commit-msg
stages: [prepare-commit-msg]
name: Prepare commit message
entry: python devtools/git_message_hook.py --prepare
language: python
- id: check-commit-msg
stages: [commit-msg]
name: Check commit message
entry: python devtools/git_message_hook.py --check
language: python
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
exclude: (-lock\.ya?ml|\benvironments/.*\.ya?ml|\.ipynb|^THIRD_PARTY_SOFTWARE\.rst)$
entry: codespell -I .codespellignore
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
exclude: \.mdj$
- id: check-json
exclude_types: [jupyter]
- id: check-toml
- id: check-yaml
# - id: check-added-large-files # crashing on some configuration. To be investigated
- id: check-added-large-files
# args: [--enforce-all]
- id: check-case-conflict
- id: check-merge-conflict
- id: debug-statements
Expand All @@ -111,7 +96,7 @@ repos:
exclude_types: [jupyter]
exclude: ^docs/.*/images/
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.0
rev: v6.2.4
hooks:
- id: rstcheck
exclude: ^THIRD_PARTY_SOFTWARE.rst$
Expand Down
1 change: 1 addition & 0 deletions .rstcheck.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[rstcheck]
ignore_directives=automodule,jupyter-execute,nbgallery
report_level=WARNING
ignore_substitutions = copyright_notice
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Mira Geoscience
Copyright (c) 2020-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
8 changes: 1 addition & 7 deletions README-dev.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Setup for development
=====================

Expand Down Expand Up @@ -361,11 +360,6 @@ Here is a suggestion for some plugins you can install in PyCharm.
.. _.pre-commit-config.yaml: .pre-commit-config.yaml


License
^^^^^^^
# TODO: ADD LICENSE TERMS


Copyright
^^^^^^^^^
Copyright (c) 2024 Mira Geoscience Ltd.
Copyright (c) 2020-2025 Mira Geoscience Ltd.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ License
^^^^^^^
MIT License

Copyright (c) 2024 Mira Geoscience
Copyright (c) 2020-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
53 changes: 0 additions & 53 deletions devtools/check-copyright.py

This file was deleted.

Loading
Loading