calkit-python 0.26.2__tar.gz → 0.26.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {calkit_python-0.26.2 → calkit_python-0.26.4}/PKG-INFO +1 -1
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/__init__.py +1 -1
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/check.py +29 -3
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/main.py +18 -11
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/conda.py +15 -3
- calkit_python-0.26.4/calkit/tests/cli/test_check.py +45 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/.github/FUNDING.yml +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/.github/workflows/docs.yml +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/.github/workflows/format.yml +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/.github/workflows/publish-test.yml +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/.github/workflows/publish.yml +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/.github/workflows/test.yml +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/.gitignore +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/.pre-commit-config.yaml +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/.python-version +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/CONTRIBUTING.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/LICENSE +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/Makefile +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/README.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/__main__.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/calc.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/check.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/__init__.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/cloud.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/config.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/core.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/describe.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/import_.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/list.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/new.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/notebooks.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/office.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/overleaf.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cli/update.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/cloud.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/config.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/core.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/datasets.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/docker.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/dvc.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/environments.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/git.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/github.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/gui.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/jupyter.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/magics.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/matlab.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/models/__init__.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/models/core.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/models/io.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/models/iteration.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/models/pipeline.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/notebooks.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/office.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/ops.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/pipeline.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/releases.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/server.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/templates/__init__.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/templates/core.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/templates/latex/__init__.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/templates/latex/article/paper.tex +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/templates/latex/core.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/templates/latex/jfm/jfm.bst +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/templates/latex/jfm/jfm.cls +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/templates/latex/jfm/lineno-FLM.sty +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/templates/latex/jfm/paper.tex +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/templates/latex/jfm/upmath.sty +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/__init__.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/cli/__init__.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/cli/test_config.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/cli/test_list.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/cli/test_main.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/cli/test_new.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/models/__init__.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/models/test_pipeline.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/test_calc.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/test_check.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/test_conda.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/test_core.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/test_dvc.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/test_jupyter.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/test_magics.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/test_notebooks.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/test_pipeline.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/tests/test_templates.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/calkit/zenodo.py +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/CNAME +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/apps.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/calculations.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/calkit-yaml.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/cli-reference.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/cloud-integration.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/datasets.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/dependencies.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/environments.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/examples.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/help.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/img/c-to-the-k-white.svg +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/img/calkit-no-bg.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/img/connect-zenodo.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/index.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/installation.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/local-server.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/notebooks.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/overleaf.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/pipeline/index.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/pipeline/manual-steps.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/pipeline/running-and-logging.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/references.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/releases.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/adding-latex-pub-docker.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/conda-envs.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/existing-project.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/first-project.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/building-codespace.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/codespaces-secrets-2.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/editor-split.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/go-to-linked-code.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/issue-from-selection.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/new-project.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/new-pub-2.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/new-token.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/paper.tex.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/project-home-3.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/push.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/stage.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/anakin-excel.jpg +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/chart-more-rows.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/create-project.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/elsevier-research-data-guidelines.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/excel-chart.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/excel-data.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/insert-link-to-file.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/needs-clone.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/new-stage.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/phd-comics-version-control.webp +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/pipeline-out-of-date.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/status-more-rows.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/uncommitted-changes.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/untracked-data.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/updated-publication.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/word-to-pdf-stage-2.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/workflow-page.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/openfoam/clone.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/openfoam/create-project.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/openfoam/datasets-page.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/openfoam/figure-on-website-updated.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/openfoam/figure-on-website.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/openfoam/new-token.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/openfoam/reclone.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/openfoam/status-after-import-dataset.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/run-proc.png +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/index.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/latex-codespaces.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/matlab.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/notebook-pipeline.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/office.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/openfoam.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/procedures.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/docs/version-control.md +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/mkdocs.yml +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/pyproject.toml +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/test/pipeline.ipynb +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/test/test-log.log +0 -0
- {calkit_python-0.26.2 → calkit_python-0.26.4}/uv.lock +0 -0
|
@@ -26,7 +26,7 @@ import calkit
|
|
|
26
26
|
import calkit.matlab
|
|
27
27
|
import calkit.pipeline
|
|
28
28
|
from calkit.check import check_reproducibility
|
|
29
|
-
from calkit.cli import raise_error
|
|
29
|
+
from calkit.cli import raise_error, warn
|
|
30
30
|
|
|
31
31
|
check_app = typer.Typer(no_args_is_help=True)
|
|
32
32
|
|
|
@@ -84,6 +84,7 @@ def check_environment(
|
|
|
84
84
|
gpus=env.get("gpus"),
|
|
85
85
|
user=env.get("user"),
|
|
86
86
|
wdir=env.get("wdir"),
|
|
87
|
+
args=env.get("args", []),
|
|
87
88
|
quiet=not verbose,
|
|
88
89
|
)
|
|
89
90
|
elif env["kind"] == "conda":
|
|
@@ -209,6 +210,14 @@ def check_docker_env(
|
|
|
209
210
|
help="Declare an explicit GPU requirement for the container.",
|
|
210
211
|
),
|
|
211
212
|
] = None,
|
|
213
|
+
args: Annotated[
|
|
214
|
+
list[str],
|
|
215
|
+
typer.Option(
|
|
216
|
+
"--arg",
|
|
217
|
+
"-a",
|
|
218
|
+
help="Declare an explicit run argument for the container.",
|
|
219
|
+
),
|
|
220
|
+
] = [],
|
|
212
221
|
quiet: Annotated[
|
|
213
222
|
bool, typer.Option("--quiet", "-q", help="Be quiet.")
|
|
214
223
|
] = False,
|
|
@@ -326,6 +335,8 @@ def check_docker_env(
|
|
|
326
335
|
inspect["Ports"] = ports
|
|
327
336
|
if gpus:
|
|
328
337
|
inspect["GPUs"] = gpus
|
|
338
|
+
if args:
|
|
339
|
+
inspect["Args"] = args
|
|
329
340
|
lock_dir = os.path.dirname(lock_fpath)
|
|
330
341
|
if lock_dir:
|
|
331
342
|
os.makedirs(lock_dir, exist_ok=True)
|
|
@@ -455,9 +466,13 @@ def check_venv(
|
|
|
455
466
|
lock_dir = os.path.dirname(lock_fpath)
|
|
456
467
|
if lock_dir:
|
|
457
468
|
os.makedirs(lock_dir, exist_ok=True)
|
|
469
|
+
# If the lock file exists, try to install with that
|
|
470
|
+
dep_file_txt = f"-r {path}"
|
|
471
|
+
if os.path.isfile(lock_fpath):
|
|
472
|
+
dep_file_txt += f" -r {lock_fpath}"
|
|
458
473
|
check_cmd = (
|
|
459
474
|
f"{activate_cmd} "
|
|
460
|
-
f"&& {pip_cmd} install {pip_install_args}
|
|
475
|
+
f"&& {pip_cmd} install {pip_install_args} {dep_file_txt} "
|
|
461
476
|
f"&& {pip_freeze_cmd} > {lock_fpath} "
|
|
462
477
|
"&& deactivate"
|
|
463
478
|
)
|
|
@@ -471,7 +486,18 @@ def check_venv(
|
|
|
471
486
|
stderr=subprocess.STDOUT if not verbose else None,
|
|
472
487
|
)
|
|
473
488
|
except subprocess.CalledProcessError:
|
|
474
|
-
|
|
489
|
+
warn("Failed to create environment from lock file; attempting rebuild")
|
|
490
|
+
check_cmd = (
|
|
491
|
+
f"{activate_cmd} "
|
|
492
|
+
f"&& {pip_cmd} install {pip_install_args} -r {path} "
|
|
493
|
+
f"&& {pip_freeze_cmd} > {lock_fpath} "
|
|
494
|
+
"&& deactivate"
|
|
495
|
+
)
|
|
496
|
+
# Try again and don't capture output
|
|
497
|
+
try:
|
|
498
|
+
subprocess.run(check_cmd, shell=True, cwd=wdir, check=True)
|
|
499
|
+
except subprocess.CalledProcessError:
|
|
500
|
+
raise_error(f"Failed to check {kind}")
|
|
475
501
|
|
|
476
502
|
|
|
477
503
|
@check_app.command(name="matlab-env")
|
|
@@ -874,7 +874,7 @@ def run(
|
|
|
874
874
|
] = False,
|
|
875
875
|
no_log: Annotated[
|
|
876
876
|
bool,
|
|
877
|
-
typer.Option("--no-log", help="Do not log the run."),
|
|
877
|
+
typer.Option("--no-log", "-l", help="Do not log the run."),
|
|
878
878
|
] = False,
|
|
879
879
|
save_after_run: Annotated[
|
|
880
880
|
bool,
|
|
@@ -893,16 +893,17 @@ def run(
|
|
|
893
893
|
if not quiet:
|
|
894
894
|
typer.echo("Getting system information")
|
|
895
895
|
system_info = calkit.get_system_info()
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
896
|
+
if not no_log:
|
|
897
|
+
# Save the system to .calkit/systems
|
|
898
|
+
if verbose:
|
|
899
|
+
typer.echo("Saving system information:")
|
|
900
|
+
typer.echo(system_info)
|
|
901
|
+
sysinfo_fpath = os.path.join(
|
|
902
|
+
".calkit", "systems", system_info["id"] + ".json"
|
|
903
|
+
)
|
|
904
|
+
os.makedirs(os.path.dirname(sysinfo_fpath), exist_ok=True)
|
|
905
|
+
with open(sysinfo_fpath, "w") as f:
|
|
906
|
+
json.dump(system_info, f, indent=2)
|
|
906
907
|
# First check any system-level dependencies exist
|
|
907
908
|
if not quiet:
|
|
908
909
|
typer.echo("Checking system-level dependencies")
|
|
@@ -1189,6 +1190,12 @@ def run_in_env(
|
|
|
1189
1190
|
),
|
|
1190
1191
|
platform=env.get("platform"),
|
|
1191
1192
|
deps=env.get("deps", []),
|
|
1193
|
+
env_vars=env.get("env_vars", []),
|
|
1194
|
+
ports=env.get("ports", []),
|
|
1195
|
+
gpus=env.get("gpus"),
|
|
1196
|
+
user=env.get("user"),
|
|
1197
|
+
wdir=env.get("wdir"),
|
|
1198
|
+
args=env.get("args", []),
|
|
1192
1199
|
quiet=not verbose,
|
|
1193
1200
|
)
|
|
1194
1201
|
shell_cmd = _to_shell_cmd(cmd)
|
|
@@ -17,9 +17,21 @@ from calkit import ryaml
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
def _check_single(req: str, actual: str, conda: bool = False) -> bool:
|
|
20
|
-
"""Helper function for checking actual versions against requirements.
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
"""Helper function for checking actual versions against requirements.
|
|
21
|
+
|
|
22
|
+
Note that this also doesn't check optional dependencies.
|
|
23
|
+
"""
|
|
24
|
+
# If this is a Git version, we can't check it
|
|
25
|
+
# TODO: Clone Git repos to check?
|
|
26
|
+
if "@git" in req:
|
|
27
|
+
warnings.warn(f"Cannot check Git version for {req}")
|
|
28
|
+
req = req.split("@git")[0]
|
|
29
|
+
req_name = re.split("[=<>]", req)[0].strip()
|
|
30
|
+
req_spec = req.removeprefix(req_name).strip().replace(" ", "")
|
|
31
|
+
if "[" in req_name:
|
|
32
|
+
warnings.warn(f"Cannot check optional dependencies for {req_name}")
|
|
33
|
+
# Remove optional dependencies
|
|
34
|
+
req_name = req_name.split("[")[0].strip()
|
|
23
35
|
if conda and req_spec.startswith("="):
|
|
24
36
|
req_spec = "=" + req_spec
|
|
25
37
|
if not req_spec.endswith(".*"):
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""Tests for ``calkit.cli.check``."""
|
|
2
|
+
|
|
3
|
+
import shutil
|
|
4
|
+
import subprocess
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def test_check_venv(tmp_dir):
|
|
8
|
+
with open("reqs.txt", "w") as f:
|
|
9
|
+
f.write("requests")
|
|
10
|
+
subprocess.check_call(
|
|
11
|
+
["calkit", "check", "venv", "reqs.txt", "-o", "lock.txt"]
|
|
12
|
+
)
|
|
13
|
+
# Now check that we can install from the lock file
|
|
14
|
+
shutil.rmtree(".venv")
|
|
15
|
+
subprocess.check_call(
|
|
16
|
+
["calkit", "check", "venv", "reqs.txt", "-o", "lock.txt"]
|
|
17
|
+
)
|
|
18
|
+
with open("lock.txt") as f:
|
|
19
|
+
lock_txt = f.read()
|
|
20
|
+
# Now check that if we add a requirement, the env is rebuilt
|
|
21
|
+
assert "polars" not in lock_txt
|
|
22
|
+
with open("reqs.txt", "w") as f:
|
|
23
|
+
f.write("requests\npolars")
|
|
24
|
+
subprocess.check_call(
|
|
25
|
+
["calkit", "check", "venv", "reqs.txt", "-o", "lock.txt"]
|
|
26
|
+
)
|
|
27
|
+
with open("lock.txt") as f:
|
|
28
|
+
lock_txt = f.read()
|
|
29
|
+
assert "polars" in lock_txt
|
|
30
|
+
# Now confirm that if we check the env again, nothing happens
|
|
31
|
+
subprocess.check_call(
|
|
32
|
+
["calkit", "check", "venv", "reqs.txt", "-o", "lock.txt"]
|
|
33
|
+
)
|
|
34
|
+
with open("lock.txt") as f:
|
|
35
|
+
lock_txt_2 = f.read()
|
|
36
|
+
assert lock_txt == lock_txt_2
|
|
37
|
+
# Now check that if we pin a version in reqs.txt, we rebuild
|
|
38
|
+
with open("reqs.txt", "w") as f:
|
|
39
|
+
f.write("requests\npolars==1.0.0")
|
|
40
|
+
subprocess.check_call(
|
|
41
|
+
["calkit", "check", "venv", "reqs.txt", "-o", "lock.txt"]
|
|
42
|
+
)
|
|
43
|
+
with open("lock.txt") as f:
|
|
44
|
+
lock_txt_3 = f.read()
|
|
45
|
+
assert "polars==1.0.0" in lock_txt_3
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/editor-split.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/new-project.png
RENAMED
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/new-pub-2.png
RENAMED
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/new-token.png
RENAMED
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/paper.tex.png
RENAMED
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/latex-codespaces/project-home-3.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/insert-link-to-file.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/pipeline-out-of-date.png
RENAMED
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/status-more-rows.png
RENAMED
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/uncommitted-changes.png
RENAMED
|
File without changes
|
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/updated-publication.png
RENAMED
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/office/word-to-pdf-stage-2.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/openfoam/create-project.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calkit_python-0.26.2 → calkit_python-0.26.4}/docs/tutorials/img/openfoam/figure-on-website.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|