Skip to content

Commit 76b085e

Browse files
committed
docs: update documentation
1 parent 3ffec0f commit 76b085e

4 files changed

Lines changed: 38 additions & 54 deletions

File tree

README.md

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ Cookie-doh is a repository template for creating single Python package projects
1010

1111
## :woman_shrugging: Why should I care?
1212

13-
* :seedling: Improve your development workflow, validity and readability of code for individual & collaborative projects!
13+
* :seedling: Improve your development workflow.
1414

15-
* :scroll: Uses [uv](https://docs.astral.sh/uv) for dependency management, virtual environments and packaging, i.e., code is readily importable!
15+
* :scroll: Uses [uv](https://docs.astral.sh/uv) for dependency management.
1616

17-
* :tropical_drink: Takes less than a minute to create a fully pre-configured project!
17+
* :tropical_drink: Less than a minute to create a fully pre-configured project!
1818

1919
:link: Short-link: [https://aka.ms/cookie-doh]()
2020

@@ -24,33 +24,26 @@ Cookie-doh is a repository template for creating single Python package projects
2424

2525
## :rocket: Getting started with cookie-doh
2626

27-
This template uses [_copier_](https://github.com/copier-org/copier) to create new repositories.
28-
If you don't have _copier_, follow the [installation instructions](https://copier.readthedocs.io/en/stable/#installation).
29-
30-
Then, simply type
27+
This template uses [uv](https://docs.astral.sh/uv/getting-started/installation/) and
28+
[_copier_](https://github.com/copier-org/copier) to create new repositories:
3129

3230
```bash
33-
copier copy gh:microsoft/cookie-doh <new-repo-folder>
31+
curl -LsSf https://astral.sh/uv/install.sh | sh # Install uv
32+
uv tool install copier # Install copier
33+
copier copy gh:microsoft/cookie-doh <new-repo-folder> # Create new project
3434
```
3535

36-
and answer the questions to create your new project.
37-
38-
The only required dependency is [uv](https://docs.astral.sh/uv/getting-started/installation/).
39-
4036
## :notebook_with_decorative_cover: Documentation
4137

4238
Visit the documentation:
4339

4440
<https://microsoft.github.io/cookie-doh/>
4541

46-
:point_right: Go to [new project](https://microsoft.github.io/cookie-doh/getting_started/) to get started!
42+
:point_right: Go to [new project](https://microsoft.github.io/cookie-doh/getting_started/) for first steps!
4743

4844
## :space_invader: Codespaces
4945

50-
We provide a configured devcontainer for you to use in your new project and/or cookie-doh itself.
51-
You can create a container image with all the necessary dependencies,
52-
and use it for remote development in a remote node with [GitHub Codespaces](https://docs.github.com/en/codespaces)
53-
or [DevPod](https://devpod.sh/).
46+
Learn about [GitHub Codespaces](https://docs.github.com/en/codespaces) and [DevPod](https://devpod.sh/).
5447

5548
:point_right: Click below to clone or fork this repository automatically and start developing:
5649

@@ -60,9 +53,6 @@ or [DevPod](https://devpod.sh/).
6053

6154
## :gear: Devcontainer
6255

63-
Alternatively, you can build a local container directly and use it in VSCode and/or
64-
PyCharm without developing in a remote node or setting up a local environment.
65-
6656
Learn about [Devcontainers](https://containers.dev).
6757
Requires [Docker](https://www.docker.com/get-started/) installed on your local machine.
6858

@@ -71,9 +61,6 @@ and/or [PyCharm](https://www.jetbrains.com/help/pycharm/connect-to-devcontainer.
7161

7262
## :computer: Local development
7363

74-
The only required dependency is [uv](https://docs.astral.sh/uv/getting-started/installation/).
75-
However, we recommend installing some extra dependencies to improve the development experience.
76-
7764
:point_right: Follow [instructions](https://microsoft.github.io/cookie-doh/dev_setup)
7865
to set up your local environment.
7966

@@ -82,15 +69,14 @@ to set up your local environment.
8269
Cookie-doh uses and generates projects with the following tools to help the development experience:
8370

8471
* [uv](https://docs.astral.sh/uv/) for dependency management, virtual environments and
85-
packaging, i.e., makes your code readily importable!
86-
* [ruff](https://docs.astral.sh/ruff/) for formatting and linting: helps you write clean and uniform code for better consistency (and it's fast!).
87-
* [pytest](https://docs.pytest.org/en/stable/) for testing: ensures your code is working as expected!
88-
* [pyright](https://github.com/microsoft/pyright) for static annotations: helps identify simple errors, but more importantly,
89-
makes your code more readable!
72+
packaging. Configured so that your code is readily importable.
73+
* [ruff](https://docs.astral.sh/ruff/) for formatting and linting: helps you write clean and uniform code across collaborations.
74+
* [pytest](https://docs.pytest.org/en/stable/) for testing: ensures your code is working as expected.
75+
* [pyright](https://github.com/microsoft/pyright) for static annotations: helps identify simple errors and makes your code more readable!
9076
* [codespell](https://github.com/codespell-project/codespell) for spell checking: pinpoints spelling errors across code and documents.
9177
* [CI workflows](https://en.wikipedia.org/wiki/Continuous_integration): automates validation when you submit a PR or merge to `main` branch.
9278

93-
Optional tools (when you create a new project):
79+
Optional tools (configurable when you create a new project):
9480

9581
* [MkDocs](https://squidfunk.github.io/mkdocs-material/) for beautiful markdown documentation builds (like [cookie-doh](https:microsoft.github.io/cookie-doh)'s).
9682
* [pre-commit](https://pre-commit.com/) for quick validation checks and fixes before committing.

docs/dev_setup.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
you don't need to set up a local development environment.
55
But otherwise, follow these steps to set up some useful utilities.
66

7-
Check the [minimum required dependencies](#minimum-required-dependencies) and install the tools you need.
8-
97
## :penguin: Linux/WSL instructions
108

11-
### Minimum required dependencies
9+
### [uv](https://docs.astral.sh/uv/)
10+
11+
To manage package dependencies and virtual environments.
1212

13-
* [uv](https://docs.astral.sh/uv/)
13+
```bash
14+
curl -LsSf https://astral.sh/uv/install.sh | sh
15+
```
1416

1517
### [Direnv](https://direnv.net/)
1618

@@ -36,14 +38,6 @@ cp .devcontainer/direnvrc ~/.config/direnv/direnvrc
3638
When you enter the project folder, direnv will ask you to allow the `.envrc` file to be loaded.
3739
Allow it by running `direnv allow`.
3840

39-
### [uv](https://docs.astral.sh/uv/)
40-
41-
To manage package dependencies and virtual environments.
42-
43-
```bash
44-
curl -LsSf https://astral.sh/uv/install.sh | sh
45-
```
46-
4741
### [Pre-commit](https://pre-commit.com/)
4842

4943
To run code formatting and linting before committing.

docs/getting_started.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,25 @@
22

33
## :tada: Create a new project
44

5-
1. [Install copier](dev_setup.md#copier).
6-
2. Create a new project from the template:
7-
5+
1. [Install uv](https://docs.astral.sh/uv/getting-started/installation/).
6+
```bash
7+
curl -LsSf https://astral.sh/uv/install.sh | sh
8+
```
9+
2. [Install copier](dev_setup.md#copier).
10+
```bash
11+
uv tool install copier
12+
```
13+
3. Create a new project from the template:
814
```bash
915
copier gh:microsoft/cookie-doh <project-folder>
1016
```
1117

1218
## :walking: First steps with your new project
1319

14-
Required dependencies:
20+
Instructions: <https://microsoft.github.io/cookie-doh/dev_setup>
1521

1622
* Make sure you have `uv` installed.
17-
* Instructions: <https://microsoft.github.io/cookie-doh/dev_setup>
18-
* You can also install optional tools like `direnv` and `pre-commit` following the link above
19-
if needed for your project.
23+
* Install optional tools like `direnv` and `pre-commit`.
2024

2125
Once you've created your new repository, the creation process will tell you to:
2226
@@ -58,7 +62,7 @@ Once you've created your new repository, the creation process will tell you to:
5862
```bash
5963
git add .
6064
uv tool install pre-commit --with pre-commit-uv # only if you want to install pre-commit
61-
pre-commit install --install-hooks
65+
pre-commit install --install-hooks # only if you want to use pre-commit
6266
git commit -m "init: initialize repo"
6367
git push -u origin main
6468
```

docs/getting_started.md.jinja

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ and the corresponding line in the `docs/.pages` file from your project.
88

99
## :walking: First steps with your new project
1010

11-
Required dependencies:
11+
Instructions: <https://microsoft.github.io/cookie-doh/dev_setup>
1212

1313
* Make sure you have `uv` installed.
14-
* Instructions: https://microsoft.github.io/cookie-doh/dev_setup
15-
* You can also install optional tools like `direnv` and `pre-commit` following the link above
16-
if needed for your project.
14+
* Install optional tools like `direnv` and `pre-commit`.
1715

1816
Once you've created your new repository, the creation process will tell you to:
1917

@@ -46,8 +44,10 @@ Once you've created your new repository, the creation process will tell you to:
4644
4. Commit the initial files:
4745
```bash
4846
git add .
49-
uv tool install pre-commit --with pre-commit-uv # only if you want to install pre-commit
47+
{% if precommit -%}
48+
uv tool install pre-commit --with pre-commit-uv
5049
pre-commit install --install-hooks
50+
{% endif -%}
5151
git commit -m "init: initialize repo"
5252
git push -u origin main
5353
```

0 commit comments

Comments
 (0)