Skip to content

Commit 3c78371

Browse files
authored
Merge pull request #22 from MiraGeoscience/release/0.1.5
Release/0.1.5
2 parents 6c2a47d + a2f7670 commit 3c78371

15 files changed

+498
-603
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"

.github/workflows/issue_to_jira.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ jobs:
1212

1313
steps:
1414
- name: JIRA Login
15-
uses: atlassian/gajira-login@v2.0.0
15+
uses: atlassian/gajira-login@v3.0.1
1616
env:
1717
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
1818
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
1919
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
2020
- name: Jira Create issue
2121
id: create_jira_issue
22-
uses: atlassian/gajira-create@v2.0.1
22+
uses: atlassian/gajira-create@v3.0.1
2323
with:
2424
project: GEOPY
2525
issuetype: Story
@@ -28,7 +28,7 @@ jobs:
2828
# Additional fields in JSON format
2929
fields: '{"components": [{"name": "param-sweeps"}]}'
3030
- name: Post JIRA link
31-
uses: peter-evans/create-or-update-comment@v1
31+
uses: peter-evans/create-or-update-comment@v2
3232
with:
3333
# The number of the issue or pull request in which to create a comment.
3434
issue-number: ${{ github.event.issue.number }}

.github/workflows/pytest-unix-os.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
os: [ubuntu-latest]
26-
python_ver: [3.7, 3.8, 3.9]
26+
python_ver: ['3.8', '3.9', '3.10']
2727
defaults:
2828
run:
2929
shell: bash
@@ -32,9 +32,9 @@ jobs:
3232
POETRY_VIRTUALENVS_CREATE: true
3333
POETRY_VIRTUALENVS_IN_PROJECT: true
3434
steps:
35-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v3
3636
- name: Set up Python version
37-
uses: actions/setup-python@v2
37+
uses: actions/setup-python@v4
3838
with:
3939
python-version: ${{ matrix.python_ver }}
4040
- name: Get full Python version
@@ -45,7 +45,7 @@ jobs:
4545
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python -
4646
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
4747
- name: Set up cache
48-
uses: actions/cache@v2
48+
uses: actions/cache@v3
4949
id: cache
5050
env:
5151
# Increase this value to reset cache if poetry.lock has not changed

.github/workflows/pytest-windows.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
python_ver: [3.7, 3.8, 3.9]
25+
python_ver: ['3.8', '3.9', '3.10']
2626
defaults:
2727
run:
2828
shell: bash
@@ -31,9 +31,9 @@ jobs:
3131
POETRY_VIRTUALENVS_CREATE: true
3232
POETRY_VIRTUALENVS_IN_PROJECT: true
3333
steps:
34-
- uses: actions/checkout@v2
34+
- uses: actions/checkout@v3
3535
- name: Set up Python version
36-
uses: actions/setup-python@v2
36+
uses: actions/setup-python@v4
3737
with:
3838
python-version: ${{ matrix.python_ver }}
3939
- name: Get full Python version
@@ -44,7 +44,7 @@ jobs:
4444
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python -
4545
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
4646
- name: Set up cache
47-
uses: actions/cache@v2
47+
uses: actions/cache@v3
4848
id: cache
4949
env:
5050
# Increase this value to reset cache if poetry.lock has not changed
@@ -60,7 +60,7 @@ jobs:
6060
- name: pytest
6161
run: poetry run pytest --cov-report=xml --cov=param_sweeps --cov-branch --cov-fail-under=85
6262
- name: Codecov
63-
if: ${{ success() && matrix.python_ver == '3.7' }}
64-
uses: codecov/codecov-action@v1
63+
if: ${{ success() && matrix.python_ver == '3.10' }}
64+
uses: codecov/codecov-action@v3
6565
with:
6666
name: GitHub

.github/workflows/static-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
POETRY_VIRTUALENVS_CREATE: true
2525
POETRY_VIRTUALENVS_IN_PROJECT: true
2626
steps:
27-
- uses: actions/checkout@v2
27+
- uses: actions/checkout@v3
2828
- name: Set up Python version
29-
uses: actions/setup-python@v2
29+
uses: actions/setup-python@v4
3030
with:
31-
python-version: 3.7
31+
python-version: 3.9
3232
- name: Get full Python version
3333
id: full-python-version
3434
shell: bash
@@ -38,7 +38,7 @@ jobs:
3838
curl -sSL https://install.python-poetry.org | POETRY_HOME=$HOME/.poetry python -
3939
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
4040
- name: Set up cache
41-
uses: actions/cache@v2
41+
uses: actions/cache@v3
4242
id: cache
4343
env:
4444
# Increase this value to reset cache if poetry.lock has not changed

.pre-commit-config.yaml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,13 @@ ci:
1010

1111
repos:
1212
- repo: https://github.com/psf/black
13-
rev: 22.12.0
13+
rev: 23.1.0
1414
hooks:
1515
- id: black
1616
types: [text]
1717
types_or: [python, pyi]
18-
- repo: https://github.com/asottile/seed-isort-config
19-
rev: v2.2.0
20-
hooks:
21-
- id: seed-isort-config
22-
types: [text]
23-
types_or: [python, pyi]
2418
- repo: https://github.com/PyCQA/isort
25-
rev: 5.11.4
19+
rev: 5.12.0
2620
hooks:
2721
- id: isort
2822
additional_dependencies: [toml] # to read config from pyproject.toml
@@ -44,11 +38,11 @@ repos:
4438
rev: v3.3.1
4539
hooks:
4640
- id: pyupgrade
47-
args: [--py37-plus]
41+
args: [--py38-plus]
4842
types: [text]
4943
types_or: [python, pyi]
5044
- repo: https://github.com/pre-commit/mirrors-mypy
51-
rev: v0.991
45+
rev: v1.1.1
5246
hooks:
5347
- id: mypy
5448
additional_dependencies: [types-toml]
@@ -72,7 +66,7 @@ repos:
7266
types_or: [python, pyi]
7367
exclude: ^(devtools/|docs/|setup.py)
7468
- repo: https://github.com/codespell-project/codespell
75-
rev: v2.2.2
69+
rev: v2.2.4
7670
hooks:
7771
- id: codespell
7872
exclude: (\.ipynb$|^\.github/workflows/issue_to_jira.yml$)
@@ -95,7 +89,7 @@ repos:
9589
- id: mixed-line-ending
9690
- id: name-tests-test
9791
- repo: https://github.com/rstcheck/rstcheck
98-
rev: v6.1.1
92+
rev: v6.1.2
9993
hooks:
10094
- id: rstcheck
10195
additional_dependencies: [sphinx]

param_sweeps/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# (see LICENSE file at the root of this source code package).
77

88

9-
__version__ = "0.1.4"
9+
__version__ = "0.1.5"

param_sweeps/driver.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import uuid
1717
from dataclasses import dataclass
1818
from inspect import signature
19+
from typing import Any
1920

2021
import numpy as np
2122
from geoh5py.data import Data
@@ -140,9 +141,7 @@ def write_files(self, lookup):
140141

141142
ifile = InputFile.read_ui_json(self.params.worker_uijson)
142143
with ifile.data["geoh5"].open(mode="r") as workspace:
143-
144144
for name, trial in lookup.items():
145-
146145
if trial["status"] != "pending":
147146
continue
148147

@@ -193,11 +192,14 @@ def call_worker(ifile: InputFile):
193192

194193
run_cmd = ifile.data["run_command"]
195194
module = importlib.import_module(run_cmd)
196-
filt = (
197-
lambda member: inspect.isclass(member)
198-
and member.__module__ == run_cmd
199-
and hasattr(member, "run")
200-
)
195+
196+
def filt(member: Any) -> bool:
197+
return (
198+
inspect.isclass(member)
199+
and member.__module__ == run_cmd
200+
and hasattr(member, "run")
201+
)
202+
201203
driver = inspect.getmembers(module, filt)[0][1]
202204
driver.start(ifile.path_name)
203205

@@ -226,7 +228,6 @@ def main(file_path):
226228

227229

228230
if __name__ == "__main__":
229-
230231
parser = argparse.ArgumentParser(
231232
description="Run parameter sweep of worker driver."
232233
)

param_sweeps/generate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def generate(
4040
sweepfile.data.update(**update_values)
4141

4242
for param, value in ifile.data.items():
43-
4443
if parameters is not None and param not in parameters:
4544
continue
4645

param_sweeps/sample_driver.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
@dataclass
1616
class SampleParams:
17-
1817
data_object: str | None = None
1918
data: str | None = None
2019
param: int = 1

0 commit comments

Comments
 (0)