Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[files]
extend-exclude = [
"*.json",
]
11 changes: 5 additions & 6 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"eamodio.gitlens",
"github.vscode-github-actions",
"redhat.vscode-yaml",
"donjayamanne.githistory",
"felipecaputo.git-project-manager",
"GitHub.vscode-pull-request-github",
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.vscode-pylance",
"njpwerner.autodocstring",
"quarto.quarto",
"ms-toolsai.jupyter",
"streetsidesoftware.code-spell-checker",
"vivaxy.vscode-conventional-commits",
"charliermarsh.ruff",
"pshaddel.conventional-branch",
"yy0931.vscode-sqlite3-editor"
"tekumara.typos-vscode",
"EditorConfig.EditorConfig"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
Expand Down
7 changes: 1 addition & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,4 @@
},
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
"python.languageServer": "Pylance",
"files.insertFinalNewline": true,
"cSpell.enabledFileTypes": {
"quarto": true
},
"cSpell.language": "en,en-GB",
}
"files.insertFinalNewline": true
21 changes: 14 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
# Template for Seedcase Python packages

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:
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:

``` bash
# NAME is the name to give the new repository
gh repo create NAME --template seedcase-project/template-example-repo
gh repo create NAME --template seedcase-project/template-data-package
```

## Setting things up after cloning

To add uv:

1. Delete the `pyproject.toml` file.
2. In the terminal run `uv init`.
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.
1. Delete the `pyproject.toml` file.
2. In the terminal run `uv init`.
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.

Then, in the terminal, run:

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

## Setting things up

Use the commands found in [`spaid`](https://github.com/seedcase-project/spaid) repo to run the next setup steps.
Use the commands found in
[`spaid`](https://github.com/seedcase-project/spaid) repo to run the
next setup steps.
8 changes: 6 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
just --list --unsorted

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

# Install Python package dependencies
install-deps:
uv sync --upgrade --dev
uv sync --upgrade --dev --all-extras

# Check Python code with the linter for any errors that need manual attention
check-python:
Expand All @@ -28,3 +28,7 @@ check-commits:
else
echo "Not on main or haven't committed yet."
fi

# Check for spelling errors in files
check-spelling:
uv run typos
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dev = [
"commitizen>=4.5.1",
"pre-commit>=4.2.0",
"ruff>=0.11.4",
"typos>=1.32.0",
]

[tool.uv.sources]
Expand Down
Loading