Skip to content

Commit e06257e

Browse files
docs: 📝 add install and usage guide (#117)
# Description Mostly just moved this from the README. Expanded a bit more on things though. Doesn't build yet, there's an issue that I need to fix. Closes #37, closes #36, closes #32 This PR needs an in-depth review. ## Checklist - [x] Formatted Markdown - [ ] Ran `just run-all` --------- Co-authored-by: martonvago <[email protected]>
1 parent 67db66f commit e06257e

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

docs/guide.qmd

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
title: "Guide"
3+
---
4+
5+
This guide provides an overview of how to use this template for creating
6+
a new Data Package. It includes instructions for using the template and
7+
post-creation tasks.
8+
9+
## Installing
10+
11+
In order to use this template, you need to install a few programs:
12+
13+
- [Python](https://www.python.org/): Required for installing and using
14+
many of the tools in this template, and because the template
15+
itself uses Python.
16+
- [Git](https://git-scm.com/): For version control and setting up Git
17+
to track the newly created data package.
18+
- [copier](https://copier.readthedocs.io/en/stable/#quick-start): A
19+
template tool for making new projects in a standardised and
20+
structured way.
21+
- [uv](https://docs.astral.sh/uv/): A tool for managing Python
22+
environments and running commands. Some post-copy steps of this
23+
template use uv.
24+
- [just](https://just.systems/man/en/): A build management tool that
25+
helps with running common build and check tasks.
26+
27+
You will need to install Python and Git yourself, but the other tools can
28+
be installed using
29+
[`pipx`](https://pipxproject.github.io/pipx/)---which we strongly
30+
recommend---with the following command:
31+
32+
``` bash
33+
pipx install copier uv rust-just
34+
```
35+
36+
## Using this template
37+
38+
You can use this template to create a new Data Package with a standard
39+
set of files and folders, as well as all the features and configurations
40+
to make it easier to build your data package more smoothly and
41+
effectively. First, open a Terminal and move into the directory where
42+
you want to create the new Data Package. Then run the following command:
43+
44+
``` bash
45+
# Copy into the current directory, which is the "."
46+
uvx copier copy gh:seedcase-project/template-data-package .
47+
```
48+
49+
::: callout-caution
50+
This template runs some post-copy commands using your terminal. In order
51+
to run them, you need to use the `--trust` option. Review the
52+
[`copier.yml`](https://github.com/seedcase-project/template-data-package/blob/main/copier.yaml)
53+
file, under the `_tasks` key to see what commands will be run after
54+
copying the template, so you can know and trust what the commands are
55+
doing. Unfortunately, this template can't be used without the `--trust`
56+
option.
57+
:::
58+
59+
## Post-creation setup
60+
61+
These steps are mainly for us in the Seedcase Project to set up the
62+
repository with the settings we use, but you can follow them if you want
63+
to set up your Data Package in a similar way.
64+
65+
After copying the template, while in the directory of the new Data
66+
Package, run the following:
67+
68+
``` bash
69+
just install-precommit
70+
```
71+
72+
Next, install [`spaid`](https://github.com/seedcase-project/spaid) and
73+
use the following commands to run the next setup steps:
74+
75+
``` bash
76+
spaid_gh_create_repo_from_local -h
77+
spaid_gh_set_repo_settings -h
78+
spaid_gh_ruleset_basic_protect_main -h
79+
```
80+
81+
Some configuration is needed after copying this template to a new
82+
repository, including configuration external to the repository.
83+
84+
- The template file `.github/workflows/release-package.yml` requires
85+
the
86+
[auto-release-token](https://github.com/apps/auto-release-token)
87+
GitHub App to be installed, as well as a GitHub secret called
88+
`UPDATE_VERSION_TOKEN` and a variable called `UPDATE_VERSION_APP_ID`
89+
to be set up in the repository (or organization) settings. See this
90+
[guide](https://guidebook.seedcase-project.org/operations/security#using-github-apps-to-generate-tokens)
91+
for more details on how to set this up.

0 commit comments

Comments
 (0)