Skip to content
Closed
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
5 changes: 0 additions & 5 deletions .flake8

This file was deleted.

3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
*.zip filter=lfs diff=lfs merge=lfs -text
*.min.js filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text

# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
4 changes: 2 additions & 2 deletions .github/workflows/python_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
contents: read
pull-requests: read
with:
package-manager: 'conda'
package-manager: 'pixi'
app-name: 'simpeg_drivers'
python-version: '3.10'
call-workflow-pytest:
Expand All @@ -41,7 +41,7 @@ jobs:
contents: read
pull-requests: read
with:
package-manager: 'conda'
package-manager: 'pixi'
python-versions: '["3.10", "3.11", "3.12"]'
os: '["ubuntu-latest", "windows-latest"]'
cache-number: 1
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/security_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ concurrency:

jobs:
call-workflow-zizmor-annotate:
name: Zizmor analysis (advanced security)
if: ${{ github.event_name != 'pull_request' }}
name: Zizmor analysis (annotate)
if: ${{ github.event_name == 'pull_request' }}
permissions:
security-events: write
checks: write
contents: read
actions: read
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-zizmor-advanced-security.yml@v2
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-zizmor-annotate.yml@v2

call-workflow-zizmor-advanced-security:
name: Zizmor analysis (annotate)
if: ${{ github.event_name == 'pull_request' }}
name: Zizmor analysis (advanced security)
if: ${{ github.event_name != 'pull_request' }}
permissions:
checks: write
security-events: write
contents: read
actions: read
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-zizmor-annotate.yml@v2
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-zizmor-advanced-security.yml@v2
15 changes: 12 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ instance/

# Sphinx documentation
docs/_build/
# conf.py is generated by jupyter-book
docs/conf.py

# PyBuilder
target/
Expand Down Expand Up @@ -142,8 +144,15 @@ dmypy.json
# geoh5 locks
*.geoh5.lock

# tempory generated files
pyproject-sha.toml
# not using poetry to lock, but pixi
poetry.lock

#version ignore
# auto-generated version file
simpeg_drivers/_version.py
/_version.json

# not using poetry to lock, but pixi
poetry.lock

# generated conda env files by pixi
*.pixi.conda.yml
215 changes: 108 additions & 107 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,115 +1,116 @@

default_language_version:
python: python3
python: python3
exclude: ^docs/(conf.py|_ext/)
default_stages: [pre-commit,pre-push]
fail_fast: false

ci:
skip: [pylint]
autoupdate_branch: develop
autoupdate_schedule: monthly
skip: [pylint]
autoupdate_branch: develop
autoupdate_schedule: monthly

repos:
# - repo: https://github.com/python-poetry/poetry # TODO: re-enable with pixi (does not support source=pypi)
# rev: 2.2.1
# hooks:
# - id: poetry-check
# args: [--no-plugins]
- repo: https://github.com/hadialqattan/pycln
rev: v2.6.0
hooks:
- id: pycln
args: [--config=pyproject.toml]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.4
hooks:
- id: ruff-check
args:
- --fix
- --exit-non-zero-on-fix
# - --unsafe-fixes
- id: ruff-format
# - repo: https://github.com/pre-commit/mirrors-mypy # TODO: fix mypy errors
# rev: v1.18.2
# hooks:
# - id: mypy
# additional_dependencies: [
# numpy==1.26.*,
# types-toml,
# types-PyYAML,
# tomli # to read config from pyproject.toml
# ]
# exclude: ^(docs|simpeg_drivers-assets)/
- repo: https://github.com/codingjoe/relint
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|^docs/intro\.md|\.py|\.pyi)$
exclude: (^\.|^docs/(?!intro\.md))
args:
- --full-scan-files
- intro.md
- id: prepare-commit-msg
- id: check-commit-msg
- repo: local
hooks:
- id: pylint
name: pylint
entry: .\\devtools\\conda_env_pylint.bat
language: system
require_serial: true # pylint does its own parallelism
types: [python]
exclude: ^(devtools|docs)/
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
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: v6.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
exclude: (\.ipynb)$
- id: check-case-conflict
- id: check-merge-conflict
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
exclude: (^\.idea/.*\.xml|\.mdj)$
- id: mixed-line-ending
exclude: ^\.idea/.*\.xml$
- id: name-tests-test
exclude: ^tests/utils/
- id: pretty-format-json
args:
- --autofix
- --indent=4
- --no-sort-keys
- --top-keys
- version,title,icon,documentation,conda_environment,run_command,geoh5,monitoring_directory,workspace_geoh5
exclude_types: [jupyter]
exclude: ^docs/(.*/)?images/
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.5
hooks:
- id: rstcheck
exclude: ^THIRD_PARTY_SOFTWARE.rst$
additional_dependencies: [sphinx]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
exclude: ^THIRD_PARTY_SOFTWARE.rst$
- repo: https://github.com/python-poetry/poetry
rev: 2.2.1
hooks:
- id: poetry-check
args: [--no-plugins]
- repo: https://github.com/hadialqattan/pycln
rev: v2.6.0
hooks:
- id: pycln
args: [ --config=pyproject.toml ]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- id: ruff-check
args:
- --fix
- --exit-non-zero-on-fix
# - --unsafe-fixes
- id: ruff-format
# - repo: https://github.com/pre-commit/mirrors-mypy # TODO: fix mypy errors
# rev: v1.19.1
# hooks:
# - id: mypy
# additional_dependencies: [
# numpy==1.26.*,
# types-toml,
# types-PyYAML,
# tomli, # to read config from pyproject.toml
# ]
# exclude: ^(docs|simpeg_drivers-assets)/
- repo: https://github.com/codingjoe/relint
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|^docs/intro\.md|\.py|\.pyi)$
exclude: (^\.|^docs/(?!intro\.md))
args:
- --full-scan-files
- intro.md
- id: prepare-commit-msg
- id: check-commit-msg
- repo: local
hooks:
- id: pylint
name: pylint
entry: pixi run -e linter --as-is lint
language: system
require_serial: true # pylint does its own parallelism
types: [text]
types_or: [python, pyi]
exclude: ^(devtools|docs|simpeg_drivers-assets)/
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
exclude: (\.ipynb|THIRD_PARTY_SOFTWARE\.rst|^pixi\.lock)$
entry: codespell -I .codespellignore
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.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
exclude: (\.ipynb)$
# args: [--enforce-all]
- id: check-case-conflict
- id: check-merge-conflict
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
exclude: (^\.idea/.*\.xml|\.mdj)$
- id: mixed-line-ending
exclude: ^\.idea/.*\.xml$
- id: name-tests-test
exclude: ^tests/utils/
- id: pretty-format-json
args:
- --autofix
- --indent=4
- --no-sort-keys
- --top-keys
- version,title,icon,documentation,conda_environment,run_command,geoh5,monitoring_directory,workspace_geoh5
exclude_types: [jupyter]
exclude: ^docs/(.*/)?images/
- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.5
hooks:
- id: rstcheck
exclude: ^THIRD_PARTY_SOFTWARE.rst$
additional_dependencies: [sphinx]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: rst-backticks
exclude: ^THIRD_PARTY_SOFTWARE.rst$
42 changes: 22 additions & 20 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,37 @@
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "mambaforge-22.9"
python: "3.10" # pre-install for the py310 environment of pixi
jobs:
post_checkout:
# Download and uncompress the binary
# https://git-lfs.github.com/
- wget https://github.com/git-lfs/git-lfs/releases/download/v3.1.4/git-lfs-linux-amd64-v3.1.4.tar.gz
- tar xvfz git-lfs-linux-amd64-v3.1.4.tar.gz
# Download and uncompress binary for the desired version of Git LFS
- |
set -e
LFS_VERSION="3.4.0"
wget "https://github.com/git-lfs/git-lfs/releases/download/v${LFS_VERSION}/git-lfs-linux-amd64-v${LFS_VERSION}.tar.gz"
tar xzf "git-lfs-linux-amd64-v${LFS_VERSION}.tar.gz" --strip-components=1 "git-lfs-${LFS_VERSION}/git-lfs"
rm "git-lfs-linux-amd64-v${LFS_VERSION}.tar.gz"
# Modify LFS config paths to point where git-lfs binary was downloaded
- git config filter.lfs.process "`pwd`/git-lfs filter-process"
- git config filter.lfs.smudge "`pwd`/git-lfs smudge -- %f"
- git config filter.lfs.clean "`pwd`/git-lfs clean -- %f"
- git config filter.lfs.process "$(pwd)/git-lfs filter-process"
- git config filter.lfs.smudge "$(pwd)/git-lfs smudge -- %f"
- git config filter.lfs.clean "$(pwd)/git-lfs clean -- %f"
# Make LFS available in current repository
- ./git-lfs install
# Download content from remote
- ./git-lfs fetch
# Make local files to have the real content on them
- ./git-lfs checkout
pre_build:
# Generate on-the-fly Sphinx configuration from Jupyter Book's _config.yml
- "jupyter-book config sphinx docs/"
- "pip install . --no-deps"

sphinx:
builder: html
configuration: docs/conf.py
fail_on_warning: false
create_environment:
- asdf plugin add pixi
- asdf install pixi latest
- asdf global pixi latest

conda:
environment: docs/environment.yml
install:
- pixi install -e docs

build:
html:
- pixi run --frozen -e docs build-docs html $READTHEDOCS_OUTPUT
5 changes: 0 additions & 5 deletions deps-lock-config.yaml

This file was deleted.

11 changes: 0 additions & 11 deletions devtools/conda_env_pylint.bat

This file was deleted.

Loading