Skip to content

Commit

Permalink
Constrain netcdf4 version on Linux for now #213
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeNaccarato committed Jun 21, 2024
1 parent d455b86 commit 990921d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
20 changes: 12 additions & 8 deletions lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pipeline/boilercv_pipeline/equations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from pathlib import Path
from re import finditer
from shlex import quote
from sys import executable
from typing import cast, get_args

from boilercv.correlations import RANGES_TOML, SYMBOLS, beta, nusselt
Expand All @@ -23,7 +24,7 @@
from boilercv.morphs.morphs import Morph

SYMS = tuple(SYMBOLS.keys())
PIPX = Path(".venv") / "scripts" / "pipx"
PIPX = Path(executable).parent / "pipx"
PNGS: dict[Corr, Path] = {"beta": beta.PNGS, "nusselt": nusselt.PNGS}
EQUATIONS: dict[Corr | Range, Path] = {
"beta": beta.EQUATIONS_TOML,
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ dependencies = [
"pytz>=2023.3",
"sympy>=1.12",
"xarray[accel,io,parallel]>=2023.7.0",
# ? https://github.com/softboiler/boilercv/issues/213
"netcdf4>=1.7.0",
"netcdf4!=1.7.1 ; sys_platform == 'linux'",
]
[project.optional-dependencies]
# * Minimal CV flavor needed, but allow `boilercv` to coexist with different flavors
Expand Down Expand Up @@ -49,6 +52,7 @@ ignore_errors = true
deps = ["pyproject.toml"]
code = ["src"]
ignore_undeclared = ["_typeshed"]
ignore_unused = ["netcdf4"]

[tool.pytest.ini_options]
addopts = '''
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ nbconvert==7.7.3
nbformat==5.10.4
ndindex==1.8
nest-asyncio==1.6.0
netcdf4==1.7.1
netcdf4==1.7.0
networkx==3.3
nodeenv==1.9.1
nptyping==2.5.0
Expand Down
8 changes: 6 additions & 2 deletions tests/boilercv_tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
from functools import partial
from itertools import chain
from pathlib import Path
from shlex import join, split
from shlex import join, quote, split
from shutil import copy
from subprocess import run
from sys import executable
from tempfile import _RandomNameSequence # type: ignore
from types import SimpleNamespace
from typing import Any
Expand Down Expand Up @@ -223,8 +224,11 @@ def clean_notebooks(*nbs: Path | str): # type: ignore # `nbs` redefined
"""Clean notebooks using pre-commit hooks."""
nbs: str = join(str(nb) for nb in nbs)
files = f"--files {nbs}"
quote((Path(executable).parent / "pre-commit").as_posix())
for cmd in [
split(f".venv/scripts/pre-commit run {subcmd}")
split(
f"{quote((Path(executable).parent / 'pre-commit').as_posix())} run {subcmd}"
)
for subcmd in [f"nb-clean {files}", f"ruff {files}", f"ruff-format {files}"]
]:
run(cmd, check=False) # noqa: S603

0 comments on commit 990921d

Please sign in to comment.