Skip to content

Commit 096f230

Browse files
authored
Merge pull request #2 from LIVVkit/develop
Update pre-commit, workflows, and version
2 parents 05c1b52 + cf5e48d commit 096f230

File tree

7 files changed

+23
-24
lines changed

7 files changed

+23
-24
lines changed

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up python
2121
uses: actions/setup-python@v5
2222
with:
23-
python-version: 3.13
23+
python-version: 3.14
2424
- name: Runs pre-commit
2525
run: |
2626
pip install pre-commit

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
19+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
2020

2121
steps:
2222
- uses: actions/checkout@v4

.pre-commit-config.yaml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.0.1
3+
rev: v6.0.0
44
hooks:
55
- id: end-of-file-fixer
66
- id: trailing-whitespace
77
- id: check-toml
8-
- repo: https://github.com/psf/black
9-
rev: 22.3.0
10-
hooks:
11-
- id: black
12-
- repo: https://github.com/pycqa/isort
13-
rev: 5.13.2
14-
hooks:
15-
- id: isort
8+
- id: check-yaml
9+
args: [--unsafe]
10+
- id: debug-statements
11+
- id: destroyed-symlinks
12+
- id: detect-private-key
1613
- repo: https://github.com/astral-sh/ruff-pre-commit
1714
# Ruff version.
18-
rev: v0.3.7
15+
rev: v0.13.0
1916
hooks:
2017
# Run the linter.
21-
- id: ruff
18+
- id: ruff-check
19+
# Run the formatter.
20+
- id: ruff-format
21+
- repo: https://github.com/pycqa/isort
22+
rev: 6.0.1
23+
hooks:
24+
- id: isort

modelmimic/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version_info__ = (0, 0, 2)
1+
__version_info__ = (0, 1, 0)
22
__version__ = ".".join(str(_vi) for _vi in __version_info__)
33
logo = r"""
44
|-------------------------------------------------|

modelmimic/mimic.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Generate model-like data for testing EVV, _mimic_ the output of various CIME tests.
2-
"""
1+
"""Generate model-like data for testing EVV, _mimic_ the output of various CIME tests."""
32

43
import argparse
54
from pathlib import Path
@@ -230,9 +229,9 @@ def __init__(
230229
self.size = size
231230
self.ninst = ninst
232231
self.dims = dims
233-
assert len(self.dims) == len(
234-
self.size
235-
), f"Number of dims ({len(self.size)}) must match dim names ({len(self.dims)})"
232+
assert len(self.dims) == len(self.size), (
233+
f"Number of dims ({len(self.size)}) must match dim names ({len(self.dims)})"
234+
)
236235
self.base_data = {}
237236

238237
for _varix, _var in enumerate(self.vars):
@@ -415,7 +414,7 @@ def write_to_nc(
415414
attrs={**ds_attrs, "inst": iinst},
416415
)
417416
except ValueError:
418-
breakpoint()
417+
raise
419418
ens_xarray[iinst] = _dset
420419
if casename:
421420
_filename = f"{self.name}.{_outfile_name}.{extn}"
@@ -468,7 +467,6 @@ def main(args):
468467

469468
out_dirs[_testname] = {}
470469
for case in _test["ensembles"]:
471-
472470
mimic_case = MimicModelRun(
473471
_test[case]["name"],
474472
size=_test["size"],

modelmimic/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
"""Utility methods for ModelMimic.
2-
"""
1+
"""Utility methods for ModelMimic."""
32

43
from pathlib import Path
54

tests/test_numerics.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def test_mimic_run():
7171

7272

7373
def test_bcast():
74-
7574
# Test for auto-detect axis for:
7675
# - each axis having a different size
7776
# - two axes matching

0 commit comments

Comments
 (0)