Skip to content

Commit 88efb63

Browse files
committed
docs: add demo to README
1 parent 9df4fd1 commit 88efb63

File tree

3 files changed

+86
-46
lines changed

3 files changed

+86
-46
lines changed

README.md

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@
44

55
A modern [Copier template](https://github.com/copier-org/copier) for scaffolding Python packages and apps.
66

7-
<!-- TODO: Remove the Demo section below with a mp4 demo.
8-
9-
## 🍿 Demo
10-
11-
See 👖 [Conformal Tights](https://github.com/superlinear-ai/conformal-tights) for an example of a Python package that is scaffolded with this template. Contributing to this package can be done with a single click by [starting a GitHub Codespace](https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=765698489&skip_quickstart=true) or [starting a Dev Container](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/superlinear-ai/conformal-tights).
12-
13-
-->
7+
<video src="https://github.com/user-attachments/assets/28d23137-ebae-47d8-a6e5-11f66abf2a91" controls preload></video>
148

159
## 🎁 Features
1610

@@ -96,3 +90,56 @@ To migrate a project from Cookiecutter to Copier, follow these steps:
9690
```
9791

9892
5. Create a PR from your branch, review it, and merge it!
93+
94+
## Contributing
95+
96+
<details>
97+
<summary>Prerequisites</summary>
98+
99+
1. [Generate an SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#generating-a-new-ssh-key) and [add the SSH key to your GitHub account](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account).
100+
2. Configure SSH to automatically load your SSH keys:
101+
```sh
102+
cat << EOF >> ~/.ssh/config
103+
104+
Host *
105+
AddKeysToAgent yes
106+
IgnoreUnknown UseKeychain
107+
UseKeychain yes
108+
ForwardAgent yes
109+
EOF
110+
```
111+
3. [Install Docker Desktop](https://www.docker.com/get-started).
112+
4. [Install VS Code](https://code.visualstudio.com/) and [VS Code's Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). Alternatively, install [PyCharm](https://www.jetbrains.com/pycharm/download/).
113+
5. _Optional:_ install a [Nerd Font](https://www.nerdfonts.com/font-downloads) such as [FiraCode Nerd Font](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode) and [configure VS Code](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions) or [configure PyCharm](https://github.com/tonsky/FiraCode/wiki/Intellij-products-instructions) to use it.
114+
115+
</details>
116+
117+
<details open>
118+
<summary>Development environments</summary>
119+
120+
The following development environments are supported:
121+
1. ⭐️ _GitHub Codespaces_: click on [Open in GitHub Codespaces](https://github.com/codespaces/new/superlinear-ai/substrate) to start developing in your browser.
122+
2. ⭐️ _VS Code Dev Container (with container volume)_: click on [Open in Dev Containers](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/superlinear-ai/substrate) to clone this repository in a container volume and create a Dev Container with VS Code.
123+
3. ⭐️ _uv_: clone this repository and run the following from root of the repository:
124+
```sh
125+
# Create and install a virtual environment
126+
uv sync
127+
128+
# Activate the virtual environment
129+
source .venv/bin/activate
130+
131+
# Install the pre-commit hooks
132+
pre-commit install --install-hooks
133+
```
134+
3. _VS Code Dev Container_: clone this repository, open it with VS Code, and run <kbd>Ctrl/⌘</kbd> + <kbd>⇧</kbd> + <kbd>P</kbd> → _Dev Containers: Reopen in Container_.
135+
4. _PyCharm Dev Container_: clone this repository, open it with PyCharm, [create a Dev Container with Mount Sources](https://www.jetbrains.com/help/pycharm/start-dev-container-inside-ide.html), and [configure an existing Python interpreter](https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#widget) at `/opt/venv/bin/python`.
136+
137+
</details>
138+
139+
<details open>
140+
<summary>Developing</summary>
141+
142+
- This project follows the [Conventional Commits](https://www.conventionalcommits.org/) standard to automate [Semantic Versioning](https://semver.org/) and [Keep A Changelog](https://keepachangelog.com/) with [Commitizen](https://github.com/commitizen-tools/commitizen).
143+
- Run `cz bump` to bump Substrate's version, update the `CHANGELOG.md`, and create a git tag. Then push the changes and the git tag with `git push origin main --tags`.
144+
145+
</details>

template/README.md.jinja

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ import {{ project_name_snake_case }}
5555
<details>
5656
<summary>Prerequisites</summary>
5757

58-
<details>
59-
<summary>1. Set up Git to use SSH</summary>
60-
6158
{% if ci == 'gitlab' -%}
6259
1. [Generate an SSH key](https://docs.gitlab.com/ee/user/ssh.html#generate-an-ssh-key-pair) and [add the SSH key to your GitLab account](https://docs.gitlab.com/ee/user/ssh.html#add-an-ssh-key-to-your-gitlab-account).
6360
{%- else -%}
@@ -74,35 +71,31 @@ import {{ project_name_snake_case }}
7471
ForwardAgent yes
7572
EOF
7673
```
77-
78-
</details>
79-
80-
<details>
81-
<summary>2. Install Docker</summary>
82-
8374
1. [Install Docker Desktop](https://www.docker.com/get-started).
84-
85-
</details>
86-
87-
<details>
88-
<summary>3. Install VS Code or PyCharm</summary>
89-
9075
1. [Install VS Code](https://code.visualstudio.com/) and [VS Code's Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). Alternatively, install [PyCharm](https://www.jetbrains.com/pycharm/download/).
91-
2. _Optional:_ install a [Nerd Font](https://www.nerdfonts.com/font-downloads) such as [FiraCode Nerd Font](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode) and [configure VS Code](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions) or [configure PyCharm](https://github.com/tonsky/FiraCode/wiki/Intellij-products-instructions) to use it.
92-
93-
</details>
76+
1. _Optional:_ install a [Nerd Font](https://www.nerdfonts.com/font-downloads) such as [FiraCode Nerd Font](https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode) and [configure VS Code](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions) or [configure PyCharm](https://github.com/tonsky/FiraCode/wiki/Intellij-products-instructions) to use it.
9477

9578
<details open>
9679
<summary>Development environments</summary>
9780

9881
The following development environments are supported:
9982
{% if ci == 'github' %}
100-
1. ⭐️ _GitHub Codespaces_: click on _Code_ and select _Create codespace_ to start a Dev Container with [GitHub Codespaces](https://github.com/features/codespaces).
83+
1. ⭐️ _GitHub Codespaces_: click on [Open in GitHub Codespaces](https://github.com/codespaces/new/{{ project_url.replace("https://github.com/", "") }}) to start developing in your browser.
10184
{%- endif %}
10285
1. ⭐️ _VS Code Dev Container (with container volume)_: click on [Open in Dev Containers](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url={{ project_url }}) to clone this repository in a container volume and create a Dev Container with VS Code.
86+
1. ⭐️ _uv_: clone this repository and run the following from root of the repository:
87+
```sh
88+
# Create and install a virtual environment
89+
uv sync --python {{ python_version }} --all-extras
90+
91+
# Activate the virtual environment
92+
source .venv/bin/activate
93+
94+
# Install the pre-commit hooks
95+
pre-commit install --install-hooks
96+
```
10397
1. _VS Code Dev Container_: clone this repository, open it with VS Code, and run <kbd>Ctrl/⌘</kbd> + <kbd>⇧</kbd> + <kbd>P</kbd> → _Dev Containers: Reopen in Container_.
10498
1. _PyCharm Dev Container_: clone this repository, open it with PyCharm, [create a Dev Container with Mount Sources](https://www.jetbrains.com/help/pycharm/start-dev-container-inside-ide.html), and [configure an existing Python interpreter](https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html#widget) at `/opt/{{ project_name_kebab_case }}-env/bin/python`.
105-
1. _Terminal_: clone this repository, open it with your terminal, and run `docker compose up --detach dev` to start a Dev Container in the background, and then run `docker compose exec dev zsh` to open a shell prompt in the Dev Container.
10699

107100
</details>
108101

uv.lock

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)