calkit-python 0.21.4__tar.gz → 0.21.5__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.21.4 → calkit_python-0.21.5}/PKG-INFO +8 -6
- {calkit_python-0.21.4 → calkit_python-0.21.5}/README.md +7 -5
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/__init__.py +1 -1
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/new.py +63 -7
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/cli/test_new.py +34 -0
- calkit_python-0.21.5/docs/installation.md +22 -0
- calkit_python-0.21.4/docs/installation.md +0 -18
- {calkit_python-0.21.4 → calkit_python-0.21.5}/.github/FUNDING.yml +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/.github/workflows/docs.yml +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/.github/workflows/format.yml +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/.github/workflows/publish-test.yml +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/.github/workflows/publish.yml +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/.github/workflows/test.yml +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/.gitignore +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/.pre-commit-config.yaml +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/CONTRIBUTING.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/LICENSE +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/Makefile +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/__main__.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/calc.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/check.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/__init__.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/check.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/cloud.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/config.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/core.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/import_.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/list.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/main.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/notebooks.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/office.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cli/update.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/cloud.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/conda.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/config.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/core.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/datasets.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/docker.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/dvc.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/git.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/github.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/gui.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/jupyter.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/magics.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/models.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/office.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/ops.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/releases.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/server.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/templates/__init__.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/templates/core.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/templates/latex/__init__.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/templates/latex/article/paper.tex +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/templates/latex/core.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/templates/latex/jfm/jfm.bst +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/templates/latex/jfm/jfm.cls +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/templates/latex/jfm/lineno-FLM.sty +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/templates/latex/jfm/paper.tex +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/templates/latex/jfm/upmath.sty +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/__init__.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/cli/__init__.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/cli/test_list.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/cli/test_main.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/test_calc.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/test_check.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/test_conda.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/test_core.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/test_dvc.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/test_jupyter.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/test_magics.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/tests/test_templates.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/calkit/zenodo.py +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/CNAME +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/apps.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/calculations.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/calkit-yaml.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/cli-reference.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/cloud-integration.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/datasets.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/environments.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/examples.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/help.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/img/c-to-the-k-white.svg +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/img/calkit-no-bg.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/img/connect-zenodo.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/index.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/local-server.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/pipeline/index.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/pipeline/manual-steps.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/references.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/releases.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/adding-latex-pub-docker.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/conda-envs.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/existing-project.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/first-project.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/building-codespace.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/codespaces-secrets-2.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/editor-split.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/go-to-linked-code.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/issue-from-selection.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/new-project.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/new-pub-2.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/new-token.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/paper.tex.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/project-home-3.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/push.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/stage.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/anakin-excel.jpg +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/chart-more-rows.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/create-project.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/elsevier-research-data-guidelines.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/excel-chart.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/excel-data.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/insert-link-to-file.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/needs-clone.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/new-stage.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/phd-comics-version-control.webp +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/pipeline-out-of-date.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/status-more-rows.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/uncommitted-changes.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/untracked-data.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/updated-publication.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/word-to-pdf-stage-2.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/workflow-page.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/openfoam/clone.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/openfoam/create-project.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/openfoam/datasets-page.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/openfoam/figure-on-website-updated.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/openfoam/figure-on-website.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/openfoam/new-token.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/openfoam/reclone.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/openfoam/status-after-import-dataset.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/run-proc.png +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/index.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/latex-codespaces.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/matlab.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/notebook-pipeline.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/office.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/openfoam.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/procedures.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/docs/version-control.md +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/mkdocs.yml +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/pyproject.toml +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/test/pipeline.ipynb +0 -0
- {calkit_python-0.21.4 → calkit_python-0.21.5}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: calkit-python
|
|
3
|
-
Version: 0.21.
|
|
3
|
+
Version: 0.21.5
|
|
4
4
|
Summary: Reproducibility simplified.
|
|
5
5
|
Project-URL: Homepage, https://calkit.org
|
|
6
6
|
Project-URL: Issues, https://github.com/calkit/calkit/issues
|
|
@@ -74,17 +74,19 @@ which is typically a good idea,
|
|
|
74
74
|
that should also be installed.
|
|
75
75
|
For Python, we recommend
|
|
76
76
|
[Miniforge](https://conda-forge.org/miniforge/).
|
|
77
|
-
If you're a Windows user and decide to install Miniforge or any other
|
|
78
|
-
Conda-based distribution,
|
|
79
|
-
e.g., Anaconda, you'll probably want to ensure that environment is
|
|
80
|
-
[activated by default in Git Bash](https://discuss.codecademy.com/t/setting-up-conda-in-git-bash/534473).
|
|
81
77
|
|
|
82
|
-
After Python is installed, run
|
|
78
|
+
After Python is installed, run:
|
|
83
79
|
|
|
84
80
|
```sh
|
|
85
81
|
pip install calkit-python
|
|
86
82
|
```
|
|
87
83
|
|
|
84
|
+
For Windows users, the
|
|
85
|
+
[Calkit Assistant](https://github.com/calkit/calkit-assistant)
|
|
86
|
+
app is the easiest way to get everything set up and ready to work in
|
|
87
|
+
VS Code, which can then be used as the primary app for working on
|
|
88
|
+
all scientific or analytical computing projects.
|
|
89
|
+
|
|
88
90
|
## Cloud integration
|
|
89
91
|
|
|
90
92
|
The Calkit Cloud ([calkit.io](https://calkit.io)) serves as a project
|
|
@@ -36,17 +36,19 @@ which is typically a good idea,
|
|
|
36
36
|
that should also be installed.
|
|
37
37
|
For Python, we recommend
|
|
38
38
|
[Miniforge](https://conda-forge.org/miniforge/).
|
|
39
|
-
If you're a Windows user and decide to install Miniforge or any other
|
|
40
|
-
Conda-based distribution,
|
|
41
|
-
e.g., Anaconda, you'll probably want to ensure that environment is
|
|
42
|
-
[activated by default in Git Bash](https://discuss.codecademy.com/t/setting-up-conda-in-git-bash/534473).
|
|
43
39
|
|
|
44
|
-
After Python is installed, run
|
|
40
|
+
After Python is installed, run:
|
|
45
41
|
|
|
46
42
|
```sh
|
|
47
43
|
pip install calkit-python
|
|
48
44
|
```
|
|
49
45
|
|
|
46
|
+
For Windows users, the
|
|
47
|
+
[Calkit Assistant](https://github.com/calkit/calkit-assistant)
|
|
48
|
+
app is the easiest way to get everything set up and ready to work in
|
|
49
|
+
VS Code, which can then be used as the primary app for working on
|
|
50
|
+
all scientific or analytical computing projects.
|
|
51
|
+
|
|
50
52
|
## Cloud integration
|
|
51
53
|
|
|
52
54
|
The Calkit Cloud ([calkit.io](https://calkit.io)) serves as a project
|
|
@@ -104,15 +104,48 @@ def new_project(
|
|
|
104
104
|
abs_path = os.path.abspath(path)
|
|
105
105
|
if template and os.path.exists(abs_path):
|
|
106
106
|
raise_error("Must specify a new directory if using --template")
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
try:
|
|
108
|
+
repo = git.Repo(abs_path)
|
|
109
|
+
except InvalidGitRepositoryError:
|
|
110
|
+
repo = None
|
|
111
|
+
if repo is not None and git_repo_url is None:
|
|
112
|
+
try:
|
|
113
|
+
git_repo_url = repo.remotes.origin.url
|
|
114
|
+
# Convert to HTTPS if it's SSH
|
|
115
|
+
if git_repo_url.startswith("git@"):
|
|
116
|
+
git_repo_url = git_repo_url.replace(
|
|
117
|
+
"git@github.com:", "https://github.com/"
|
|
118
|
+
)
|
|
119
|
+
git_repo_url = git_repo_url.removesuffix(".git")
|
|
120
|
+
except Exception as e:
|
|
121
|
+
git_repo_url = None
|
|
122
|
+
raise_error(
|
|
123
|
+
f"Could not detect Git repo URL from existing repo: {e}"
|
|
124
|
+
)
|
|
125
|
+
# If this isn't a DVC repo, run `dvc init`
|
|
126
|
+
if not os.path.isfile(os.path.join(abs_path, ".dvc", "config")):
|
|
127
|
+
typer.echo("Initializing DVC repository")
|
|
128
|
+
try:
|
|
129
|
+
subprocess.run(
|
|
130
|
+
["dvc", "init", "-q"],
|
|
131
|
+
cwd=abs_path,
|
|
132
|
+
capture_output=True,
|
|
133
|
+
check=True,
|
|
134
|
+
text=True,
|
|
135
|
+
)
|
|
136
|
+
except subprocess.CalledProcessError as e:
|
|
137
|
+
raise_error(f"Failed to initialize DVC repository: {e.stderr}")
|
|
138
|
+
# Commit the DVC init changes
|
|
139
|
+
if not no_commit:
|
|
140
|
+
repo.git.add(".dvc")
|
|
141
|
+
repo.git.commit(["-m", "Initialize DVC"])
|
|
109
142
|
ck_info_fpath = os.path.join(abs_path, "calkit.yaml")
|
|
110
143
|
if os.path.isfile(ck_info_fpath) and not overwrite:
|
|
111
144
|
raise_error(
|
|
112
145
|
"Destination is already a Calkit project; "
|
|
113
146
|
"use --overwrite to continue"
|
|
114
147
|
)
|
|
115
|
-
if os.path.isdir(abs_path) and os.listdir(abs_path):
|
|
148
|
+
if os.path.isdir(abs_path) and os.listdir(abs_path) and repo is None:
|
|
116
149
|
warn(f"{abs_path} is not empty")
|
|
117
150
|
if name is None:
|
|
118
151
|
name = calkit.to_kebab_case(os.path.basename(abs_path))
|
|
@@ -127,6 +160,7 @@ def new_project(
|
|
|
127
160
|
# Cloud should allow None, which will allow us to post just the name
|
|
128
161
|
# NOTE: This will fail if the user hasn't logged into the Calkit Cloud
|
|
129
162
|
# in 6 months, since their GitHub refresh token stored is expired
|
|
163
|
+
typer.echo("Creating project in Calkit Cloud")
|
|
130
164
|
try:
|
|
131
165
|
resp = calkit.cloud.post(
|
|
132
166
|
"/projects",
|
|
@@ -144,8 +178,8 @@ def new_project(
|
|
|
144
178
|
# Now clone here
|
|
145
179
|
if not os.path.isdir(abs_path):
|
|
146
180
|
subprocess.run(["git", "clone", resp["git_repo_url"], abs_path])
|
|
147
|
-
|
|
148
|
-
typer.echo("Fetching from newly
|
|
181
|
+
elif repo is None:
|
|
182
|
+
typer.echo("Fetching from newly created Git repo")
|
|
149
183
|
repo = git.Repo.init(abs_path, initial_branch="main")
|
|
150
184
|
repo.git.remote(["add", "origin", resp["git_repo_url"]])
|
|
151
185
|
repo.git.fetch()
|
|
@@ -156,6 +190,25 @@ def new_project(
|
|
|
156
190
|
repo.git.checkout(checkout_cmd)
|
|
157
191
|
except GitCommandError as e:
|
|
158
192
|
raise_error(f"Failed to check out main branch: {e}")
|
|
193
|
+
else:
|
|
194
|
+
# Create a calkit.yaml file if one does not exist
|
|
195
|
+
calkit_fpath = os.path.join(abs_path, "calkit.yaml")
|
|
196
|
+
if not os.path.isfile(calkit_fpath):
|
|
197
|
+
typer.echo("Creating calkit.yaml file")
|
|
198
|
+
with open(calkit_fpath, "w") as f:
|
|
199
|
+
ryaml.dump(
|
|
200
|
+
dict(
|
|
201
|
+
owner=resp["owner_account_name"],
|
|
202
|
+
name=resp["name"],
|
|
203
|
+
title=resp["title"],
|
|
204
|
+
description=resp["description"],
|
|
205
|
+
git_repo_url=resp["git_repo_url"],
|
|
206
|
+
),
|
|
207
|
+
f,
|
|
208
|
+
)
|
|
209
|
+
repo.git.add("calkit.yaml")
|
|
210
|
+
if not no_commit:
|
|
211
|
+
repo.git.commit(["-m", "Create calkit.yaml"])
|
|
159
212
|
try:
|
|
160
213
|
calkit.dvc.set_remote_auth(wdir=abs_path)
|
|
161
214
|
except Exception:
|
|
@@ -287,8 +340,11 @@ def new_project(
|
|
|
287
340
|
# Setup Calkit Cloud DVC remote
|
|
288
341
|
if repo.remotes:
|
|
289
342
|
typer.echo("Setting up Calkit Cloud DVC remote")
|
|
290
|
-
|
|
291
|
-
|
|
343
|
+
try:
|
|
344
|
+
calkit.dvc.configure_remote(wdir=abs_path)
|
|
345
|
+
calkit.dvc.set_remote_auth(wdir=abs_path)
|
|
346
|
+
except Exception as e:
|
|
347
|
+
warn(f"Failed to set up Calkit Cloud DVC remote: {e}")
|
|
292
348
|
if repo.git.diff("--staged") and not no_commit:
|
|
293
349
|
repo.git.commit(["-m", "Initialize Calkit project"])
|
|
294
350
|
typer.echo(success_message)
|
|
@@ -216,6 +216,40 @@ def test_new_uv_venv(tmp_dir):
|
|
|
216
216
|
|
|
217
217
|
|
|
218
218
|
def test_new_project(tmp_dir):
|
|
219
|
+
subprocess.check_call(
|
|
220
|
+
["calkit", "new", "project", ".", "--title", "My new project"]
|
|
221
|
+
)
|
|
222
|
+
repo = git.Repo()
|
|
223
|
+
assert repo.git.ls_files("calkit.yaml")
|
|
224
|
+
assert repo.git.ls_files("README.md")
|
|
225
|
+
assert repo.git.ls_files(".devcontainer")
|
|
226
|
+
ck_info = calkit.load_calkit_info()
|
|
227
|
+
assert ck_info["title"] == "My new project"
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
def test_new_project_existing_repo(tmp_dir):
|
|
231
|
+
subprocess.check_call(["git", "init"])
|
|
232
|
+
subprocess.check_call(
|
|
233
|
+
[
|
|
234
|
+
"git",
|
|
235
|
+
"remote",
|
|
236
|
+
"add",
|
|
237
|
+
"origin",
|
|
238
|
+
"https://github.com/someone/somerepo.git",
|
|
239
|
+
]
|
|
240
|
+
)
|
|
241
|
+
subprocess.check_call(
|
|
242
|
+
["calkit", "new", "project", ".", "--title", "My new project"]
|
|
243
|
+
)
|
|
244
|
+
repo = git.Repo()
|
|
245
|
+
assert repo.git.ls_files("calkit.yaml")
|
|
246
|
+
assert repo.git.ls_files("README.md")
|
|
247
|
+
assert repo.git.ls_files(".devcontainer")
|
|
248
|
+
ck_info = calkit.load_calkit_info()
|
|
249
|
+
assert ck_info["title"] == "My new project"
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
def test_new_project_existing_files(tmp_dir):
|
|
219
253
|
subprocess.check_call(["touch", "some-existing-file.txt"])
|
|
220
254
|
subprocess.check_call(
|
|
221
255
|
["calkit", "new", "project", ".", "--title", "My new project"]
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
To install Calkit, [Git](https://git-scm.com) and Python must be installed.
|
|
4
|
+
If you want to use [Docker](https://docker.com) containers,
|
|
5
|
+
which is typically a good idea,
|
|
6
|
+
that should also be installed.
|
|
7
|
+
For Python, we recommend
|
|
8
|
+
[Miniforge](https://conda-forge.org/miniforge/).
|
|
9
|
+
|
|
10
|
+
After Python is installed, execute:
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
pip install calkit-python
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
For Windows users, the
|
|
17
|
+
[Calkit Assistant](https://github.com/calkit/calkit-assistant)
|
|
18
|
+
app is the easiest way to get everything set up and ready to work in
|
|
19
|
+
VS Code, which can then be used as the primary app for working on
|
|
20
|
+
all scientific or analytical computing projects.
|
|
21
|
+
|
|
22
|
+

|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Installation
|
|
2
|
-
|
|
3
|
-
To install Calkit, [Git](https://git-scm.com) and Python must be installed.
|
|
4
|
-
If you want to use [Docker](https://docker.com) containers,
|
|
5
|
-
which is typically a good idea,
|
|
6
|
-
that should also be installed.
|
|
7
|
-
For Python, we recommend
|
|
8
|
-
[Miniforge](https://conda-forge.org/miniforge/).
|
|
9
|
-
If you're a Windows user and decide to install Miniforge or any other
|
|
10
|
-
Conda-based distribution,
|
|
11
|
-
e.g., Anaconda, you'll probably want to ensure that environment is
|
|
12
|
-
[activated by default in Git Bash](https://discuss.codecademy.com/t/setting-up-conda-in-git-bash/534473).
|
|
13
|
-
|
|
14
|
-
After Python is installed, execute:
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
pip install calkit-python
|
|
18
|
-
```
|
|
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.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/editor-split.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/new-project.png
RENAMED
|
File without changes
|
{calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/new-pub-2.png
RENAMED
|
File without changes
|
{calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/new-token.png
RENAMED
|
File without changes
|
{calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/latex-codespaces/paper.tex.png
RENAMED
|
File without changes
|
{calkit_python-0.21.4 → calkit_python-0.21.5}/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.21.4 → calkit_python-0.21.5}/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.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/pipeline-out-of-date.png
RENAMED
|
File without changes
|
{calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/status-more-rows.png
RENAMED
|
File without changes
|
{calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/uncommitted-changes.png
RENAMED
|
File without changes
|
|
File without changes
|
{calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/updated-publication.png
RENAMED
|
File without changes
|
{calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/office/word-to-pdf-stage-2.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calkit_python-0.21.4 → calkit_python-0.21.5}/docs/tutorials/img/openfoam/create-project.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{calkit_python-0.21.4 → calkit_python-0.21.5}/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
|