Skip to content

Commit f2c5483

Browse files
committed
Update README; resolves #2
1 parent dc48a15 commit f2c5483

File tree

1 file changed

+39
-11
lines changed

1 file changed

+39
-11
lines changed

README.md

+39-11
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,42 @@
11
# Basic Calkit example
22

3-
## How this was setup
4-
5-
1. Created a repo on GitHub.
6-
2. Imported into [Calkit](https://calkit.io).
7-
3. Ran `dvc init` and committed changes.
8-
4. Ran `calkit new question "Can we make reproducibility simple?" --commit`.
9-
5. `dvc stage add -n collect-data -o data/raw/data.csv -d scripts/collect-data.py`
10-
6. Ran `dvc repro`, then `git add .` and `git commit -m ...` and `dvc push`
11-
to get everything up to the cloud.
12-
6. Added a script and DVC stage to create a figure, similar to the two steps
3+
This is a basic Calkit example project,
4+
which includes data collection,
5+
figure generation,
6+
and LaTeX article compilation,
7+
all part of a single reproducible DVC pipeline.
8+
9+
You can also view this project on [calkit.io](https://calkit.io/calkit/example-basic).
10+
11+
This project can be reproduced with
12+
13+
```sh
14+
calkit run
15+
```
16+
17+
Note that the data collection stage has some randomness built into it,
18+
so it should run the first time,
19+
but will be cached after that.
20+
21+
## Steps to recreate
22+
23+
1. Create a new project on [calkit.io](https://calkit.io).
24+
1. `calkit new question "Can we make reproducibility simple?"`.
25+
1. Create a Conda environment with
26+
`calkit new conda-env -n calkit-example-basic python matplotlib numpy pandas`.
27+
1. Create the data collection stage with:
28+
```sh
29+
dvc stage add -n collect-data \
30+
-o data/raw/data.csv -d \
31+
scripts/collect-data.py \
32+
"calkit runenv -n calkit-example-basic -- python scripts/collect-data.py"
33+
```
34+
1. `calkit run && git add . && calkit save -am "Run pipeline"`
35+
1. Add a script and DVC stage to create a figure, similar to the two steps
1336
above.
14-
7. Added the figure to `calkit.yaml` by editing the `figures` section manually.
37+
1. Add the figure and dataset to `calkit.yaml` by editing the `figures`
38+
and `datasets` section manually.
39+
1. Create a new LaTeX publication and Docker environment using the
40+
`latex/article` template.
41+
See the
42+
[docs](https://github.com/calkit/calkit/blob/main/docs/tutorials/adding-latex-pub-docker.md).

0 commit comments

Comments
 (0)