Skip to content

Commit 02399f0

Browse files
authored
build: 🔨 add typos to justfile recipe (#18)
# Description This adds the typos spell checker to the justfile. Needs a quick review
1 parent 8dd8bd9 commit 02399f0

File tree

7 files changed

+79
-50
lines changed

7 files changed

+79
-50
lines changed

.typos.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[files]
2+
extend-exclude = [
3+
"*.json",
4+
]

.vscode/extensions.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
{
2-
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3-
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4-
// List of extensions which should be recommended for users of this workspace.
52
"recommendations": [
3+
"eamodio.gitlens",
4+
"github.vscode-github-actions",
5+
"redhat.vscode-yaml",
66
"donjayamanne.githistory",
77
"felipecaputo.git-project-manager",
88
"GitHub.vscode-pull-request-github",
9-
"ms-azuretools.vscode-docker",
109
"ms-python.python",
1110
"ms-python.vscode-pylance",
1211
"njpwerner.autodocstring",
1312
"quarto.quarto",
1413
"ms-toolsai.jupyter",
15-
"streetsidesoftware.code-spell-checker",
1614
"vivaxy.vscode-conventional-commits",
1715
"charliermarsh.ruff",
1816
"pshaddel.conventional-branch",
19-
"yy0931.vscode-sqlite3-editor"
17+
"tekumara.typos-vscode",
18+
"EditorConfig.EditorConfig"
2019
],
2120
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
2221
"unwantedRecommendations": []

.vscode/settings.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,4 @@
3131
},
3232
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
3333
"python.languageServer": "Pylance",
34-
"files.insertFinalNewline": true,
35-
"cSpell.enabledFileTypes": {
36-
"quarto": true
37-
},
38-
"cSpell.language": "en,en-GB",
39-
}
34+
"files.insertFinalNewline": true

README.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
# Template for Seedcase Python packages
22

3-
This repository contains a template for setting up new data example repos in Seedcase. The first step is to create a new repository using this template. This can easily be done by clicking the "Use this template" button on the repository page or by using the GitHub CLI:
3+
This repository contains a template for setting up new data example
4+
repos in Seedcase. The first step is to create a new repository using
5+
this template. This can easily be done by clicking the "Use this
6+
template" button on the repository page or by using the GitHub CLI:
47

58
``` bash
69
# NAME is the name to give the new repository
7-
gh repo create NAME --template seedcase-project/template-example-repo
10+
gh repo create NAME --template seedcase-project/template-data-package
811
```
912

1013
## Setting things up after cloning
1114

1215
To add uv:
1316

14-
1. Delete the `pyproject.toml` file.
15-
2. In the terminal run `uv init`.
16-
3. Look at the Git pane and take what was removed and move it over into the new `pyproject.toml` file. You can mimic what was done in `example-seed-beetle` repo.
17+
1. Delete the `pyproject.toml` file.
18+
2. In the terminal run `uv init`.
19+
3. Look at the Git pane and take what was removed and move it over into
20+
the new `pyproject.toml` file. You can mimic what was done in
21+
`example-seed-beetle` repo.
1722

1823
Then, in the terminal, run:
1924

2025
``` bash
2126
uv add polars pyjanitor
2227
uv add "seedcase-sprout @ git+<https://github.com/seedcase-project/seedcase-sprout>"
23-
uv add --dev ruff commitizen pre-commit
28+
uv add --dev ruff commitizen pre-commit typos
2429
```
2530

2631
## Setting things up
2732

28-
Use the commands found in [`spaid`](https://github.com/seedcase-project/spaid) repo to run the next setup steps.
33+
Use the commands found in
34+
[`spaid`](https://github.com/seedcase-project/spaid) repo to run the
35+
next setup steps.

justfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
just --list --unsorted
33

44
# Run all build-related recipes in the justfile
5-
run-all: install-deps format-python check-python check-commits
5+
run-all: install-deps format-python check-python check-spelling check-commits
66

77
# Install Python package dependencies
88
install-deps:
9-
uv sync --upgrade --dev
9+
uv sync --upgrade --dev --all-extras
1010

1111
# Check Python code with the linter for any errors that need manual attention
1212
check-python:
@@ -28,3 +28,7 @@ check-commits:
2828
else
2929
echo "Not on main or haven't committed yet."
3030
fi
31+
32+
# Check for spelling errors in files
33+
check-spelling:
34+
uv run typos

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ dev = [
2929
"commitizen>=4.5.1",
3030
"pre-commit>=4.2.0",
3131
"ruff>=0.11.4",
32+
"typos>=1.32.0",
3233
]
3334

3435
[tool.uv.sources]

0 commit comments

Comments
 (0)