Skip to content

Commit 26d8165

Browse files
authored
chore: 🔀 general updates to template (#45)
## Description This updates the template to match what we've done in Sprout, along with some other quality of life changes. <!-- Select quick/in-depth as necessary --> This PR needs a quick review.
2 parents 08423a3 + 9627bc7 commit 26d8165

File tree

11 files changed

+25
-25
lines changed

11 files changed

+25
-25
lines changed

.cz.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.commitizen]
2-
bump_message = "build(version): update version from $current_version to $new_version [skip ci]"
2+
bump_message = "build(version): :bookmark: update version from $current_version to $new_version [skip ci]"
33
update_changelog_on_bump = true
44
version_provider = "poetry"
55
version_files = [

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ repos:
1212
- id: end-of-file-fixer
1313

1414
- repo: https://github.com/commitizen-tools/commitizen
15-
rev: v4.1.0
15+
rev: v4.2.1
1616
hooks:
1717
- id: commitizen

.vscode/extensions.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
44
// List of extensions which should be recommended for users of this workspace.
55
"recommendations": [
6-
"jebbs.plantuml",
76
"donjayamanne.githistory",
87
"felipecaputo.git-project-manager",
98
"GitHub.vscode-pull-request-github",

.vscode/settings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
3333
"python.languageServer": "Pylance",
3434
"files.insertFinalNewline": true,
35-
"cSpell.enableFiletypes": [
36-
"quarto"
37-
],
35+
"cSpell.enabledFileTypes": {
36+
"quarto": true
37+
},
3838
"cSpell.language": "en,en-GB",
3939
"python.testing.pytestEnabled": true,
4040
"python.testing.pytestPath": "${workspaceFolder}/.venv/bin/pytest",

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIT License
22

3-
Copyright (c) 2023-2024 Aarhus University
3+
Copyright (c) 2023-2025 Aarhus University
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Template for Seedcase Python projects
1+
# Template for Seedcase Python packages
22

3-
This repository contains a template for setting up new Python (with Django) projects 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 Python package projects 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:
44

55
``` bash
66
# NAME is the name to give the new repository
@@ -18,8 +18,6 @@ poetry init
1818

1919
Search for `NAME` and `REPO` and replace them with the name of your project and the repository name. Then look for any `TODO` items.
2020

21-
You will need to set up Fly manually for now.
22-
2321
## Setting things up
2422

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

index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: "Welcome to Seedcase Sprout!"
2+
title: "Welcome to NAME!"
33
---
44

55
{{< include /docs/includes/_wip.qmd >}}

justfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@ run-all: install-deps format-python check-python test-python check-commits build
88
install-deps:
99
poetry install
1010

11-
# Generate SVG images from all PlantUML files
12-
generate-puml-all:
13-
docker run --rm -v $(pwd):/puml -w /puml ghcr.io/plantuml/plantuml:latest -tsvg "**/*.puml"
14-
15-
# Generate SVG image from specific PlantUML file
16-
generate-puml name:
17-
docker run --rm -v $(pwd):/puml -w /puml ghcr.io/plantuml/plantuml:latest -tsvg "**/{{name}}.puml"
18-
1911
# Run the Python tests
2012
test-python:
2113
poetry run pytest
@@ -39,7 +31,11 @@ build-website:
3931
# Run checks on commits with non-main branches
4032
check-commits:
4133
#!/bin/zsh
42-
if [[ $(git rev-parse --abbrev-ref HEAD) != "main" ]]
34+
branch_name=$(git rev-parse --abbrev-ref HEAD)
35+
number_of_commits=$(git rev-list --count HEAD ^$branch_name)
36+
if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]]
4337
then
4438
poetry run cz check --rev-range main..HEAD
39+
else
40+
echo "Not on main or haven't committed yet."
4541
fi

pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.poetry]
2-
name = "NAME"
2+
name = "template-python-package"
33
version = "0.0.1"
44
description = ""
55
authors = [
@@ -18,7 +18,6 @@ readme = "README.md"
1818
homepage = "https://NAME.seedcase-project.org"
1919
repository = "https://github.com/seedcase-project/REPO"
2020
license = "MIT"
21-
packages = [{include = "NAME"}]
2221

2322
[tool.poetry.urls]
2423
"Bug Tracker" = "https://github.com/seedcase-project/REPO/issues"
@@ -35,3 +34,11 @@ ruff = "^0.6.2"
3534
[build-system]
3635
requires = ["poetry-core"]
3736
build-backend = "poetry.core.masonry.api"
37+
38+
[tool.pytest.ini_options]
39+
addopts = [
40+
# A short traceback mode to make it easier to view
41+
"--tb=short",
42+
# Use the package in `src/`
43+
"--import-mode=importlib",
44+
]

ruff.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Support Python 3.10+
2-
target-version = "py310"
1+
# Support Python 3.12+
2+
target-version = "py312"
33

44
# In addition to the default formatters/linters, add these as well.
55
[lint]

src/PACKAGE-NAME/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)