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
1 change: 1 addition & 0 deletions .codespellignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ba
nd
astroid
33 changes: 33 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"
cooldown:
default-days: 1
groups:
github-actions:
patterns:
- actions/*
mirageo-ci-tools:
patterns:
- MiraGeoscience/CI-tools/.github/actions/*
- MiraGeoscience/CI-tools/.github/workflows/*
- package-ecosystem: "pre-commit"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"
cooldown:
default-days: 1
groups:
pre-commit-hooks:
patterns:
- "*"
16 changes: 16 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Dependabot auto-merge

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
call-workflow-dependabot-auto-merge:
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-dependabot-auto-merge.yml@9e46551783cee8a8c2c7a30794af4b98e2671729 # v3.13.6
permissions:
contents: write
pull-requests: write
statuses: write
checks: read
with:
dependabot-groups: mirageo-ci-tools,pre-commit-hooks
17 changes: 17 additions & 0 deletions .github/workflows/pr_jira_actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: JIRA actions

on:
pull_request:
Comment thread
RomFloreani marked this conversation as resolved.
Resolved
types: [opened, synchronize, reopened, ready_for_review, edited]

jobs:
call-workflow-pr_jira_actions:
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-jira-pr_actions.yml@9e46551783cee8a8c2c7a30794af4b98e2671729 # v3.13.6
permissions:
contents: read
pull-requests: write
statuses: write
secrets:
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
42 changes: 42 additions & 0 deletions .github/workflows/security_scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Security Scan

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- develop
- main
- release/**
- feature/**
- hotfix/**
push:
branches:
- develop
- main
- release/**
- feature/**
- hotfix/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
call-workflow-zizmor-annotate:
name: Zizmor analysis (annotate)
if: ${{ github.event_name == 'pull_request' }}
permissions:
checks: write
contents: read
actions: read
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-zizmor-annotate.yml@9e46551783cee8a8c2c7a30794af4b98e2671729 # v3.13.6

call-workflow-zizmor:
name: Zizmor analysis
if: ${{ github.event_name != 'pull_request' }}
permissions:
contents: read
actions: read
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-zizmor-security.yml@9e46551783cee8a8c2c7a30794af4b98e2671729 # v3.13.6
31 changes: 31 additions & 0 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Static analysis

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- develop
- main
- release/**
- feature/**
- hotfix/**
push:
branches:
- develop
- main
- release/**
- feature/**
- hotfix/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
call-workflow-pre-commit:
name: Pre-Commit
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-pre_commit.yml@9e46551783cee8a8c2c7a30794af4b98e2671729 # v3.13.6
permissions:
contents: read
with:
python-version: "3.12"
12 changes: 12 additions & 0 deletions .github/workflows/wip-status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: WIP status

on:
pull_request:
Comment thread
RomFloreani marked this conversation as resolved.
Resolved
types: [opened, synchronize, reopened, ready_for_review, edited]

jobs:
call-workflow-wip-status:
uses: MiraGeoscience/CI-tools/.github/workflows/reusable-wip-status.yml@9e46551783cee8a8c2c7a30794af4b98e2671729 # v3.13.6
permissions:
contents: read
statuses: write
35 changes: 7 additions & 28 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ ci:
autoupdate_schedule: quarterly

repos:
- repo: https://github.com/python-poetry/poetry
rev: 2.4.1
hooks:
- id: poetry-check
args: [--lock, --no-plugins]
- repo: https://github.com/hadialqattan/pycln
rev: v2.6.0
hooks:
Expand All @@ -41,22 +36,7 @@ repos:
types-toml,
types-PyYAML,
]
exclude: |
(?x)(^
geoh5py/interfaces/__init__.py|
geoh5py/handlers/__init__.py|
geoh5py/interfaces/.*|
geoh5py/handlers/.*|
tests/.*|
geoh5py/shared/utils.py|
geoh5py/shared/entity_type.py|
geoh5py/data/data_type.py|
geoh5py/objects/cell_object.py|
geoh5py/shared/concatenation/drillhole.py|
geoh5py/shared/concatenation/concatenator.py|
geoh5py/workspace/workspace.py|
geoh5py/ui_json/validation.py
)$
exclude: ^tests/
- repo: https://github.com/codingjoe/relint
rev: 3.3.1
hooks:
Expand All @@ -66,25 +46,24 @@ repos:
rev: v1.1.0
hooks:
- id: check-copyright
entry: python devtools/check-copyright.py
exclude: (^\.|\.yml|\.toml|^setup.py$|(docs|assets|environments)/)
files: (^LICENSE|^README(|-dev)\.rst|\.py|\.pyi)$
exclude: (^\.|^docs/|^assets/)
- id: prepare-commit-msg
- id: check-commit-msg
- repo: local
hooks:
- id: pylint
name: pylint
entry: poetry run pylint
entry: .\\devtools\\conda_env_pylint.bat
language: system
require_serial: true # pylint does its own parallelism
types: [text]
types_or: [python, pyi]
exclude: ^(devtools|docs|geoh5py/interfaces|geoh5py/handlers)/
types: [python]
exclude: ^(devtools|docs)/
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
exclude: (\.lock|\.ipynb|^THIRD_PARTY_SOFTWARE\.rst)$
exclude: (\.lock|\.ipynb|\.bib|^THIRD_PARTY_SOFTWARE\.rst)$
entry: codespell -I .codespellignore
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
Expand Down
4 changes: 3 additions & 1 deletion assets/mag_dipole_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ def vectorize(entity):
# Loop over the dipoles
fields = np.zeros_like(observations)

for source, moment, inclination, declination in zip(dipoles, mom, inc, dec):
for source, moment, inclination, declination in zip(
dipoles, mom, inc, dec, strict=True
):
fields += b_field(source, observations, moment, inclination, declination)

tmi = tmi_projection(fields, (earth_inc, earth_dec))
Expand Down
2 changes: 1 addition & 1 deletion assets/training/0-core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -283,4 +283,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
3 changes: 2 additions & 1 deletion assets/training/1-collections.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@
"source": [
"import numpy as np\n",
"\n",
"\n",
"array = np.array([[1, 2, 3], [4, 5, 6]]) # Create a 2D array\n",
"array.sum(axis=0)"
]
Expand Down Expand Up @@ -382,4 +383,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
2 changes: 1 addition & 1 deletion assets/training/2-functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -351,4 +351,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
2 changes: 1 addition & 1 deletion assets/training/3-classes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -252,4 +252,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
2 changes: 1 addition & 1 deletion assets/training/4-modules.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
Loading
Loading