Skip to content

chore: 🔀 general updates to template #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 10 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
2 changes: 1 addition & 1 deletion .cz.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.commitizen]
bump_message = "build(version): update version from $current_version to $new_version [skip ci]"
bump_message = "build(version): :bookmark: update version from $current_version to $new_version [skip ci]"
update_changelog_on_bump = true
version_provider = "poetry"
version_files = [
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ repos:
- id: end-of-file-fixer

- repo: https://github.com/commitizen-tools/commitizen
rev: v4.1.0
rev: v4.2.1
hooks:
- id: commitizen
1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"jebbs.plantuml",
"donjayamanne.githistory",
"felipecaputo.git-project-manager",
"GitHub.vscode-pull-request-github",
Expand Down
6 changes: 3 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
"python.defaultInterpreterPath": "${workspaceFolder}/.venv",
"python.languageServer": "Pylance",
"files.insertFinalNewline": true,
"cSpell.enableFiletypes": [
"quarto"
],
"cSpell.enabledFileTypes": {
"quarto": true
},
"cSpell.language": "en,en-GB",
"python.testing.pytestEnabled": true,
"python.testing.pytestPath": "${workspaceFolder}/.venv/bin/pytest",
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2023-2024 Aarhus University
Copyright (c) 2023-2025 Aarhus University

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Template for Seedcase Python projects
# Template for Seedcase Python packages

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

``` bash
# NAME is the name to give the new repository
Expand All @@ -16,9 +16,7 @@ cd new-project
poetry init
```

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

You will need to set up Fly manually for now.
Search for `NAME`, `PACKAGE-NAME`, and `REPO` and replace them with the name of your project and the repository name. Then look for any `TODO` items.

## Setting things up

Expand Down
2 changes: 1 addition & 1 deletion index.qmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Welcome to Seedcase Sprout!"
title: "Welcome to {{PACKAGE-NAME}}!"
---

{{< include /docs/includes/_wip.qmd >}}
14 changes: 5 additions & 9 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@ run-all: install-deps format-python check-python test-python check-commits build
install-deps:
poetry install

# Generate SVG images from all PlantUML files
generate-puml-all:
docker run --rm -v $(pwd):/puml -w /puml ghcr.io/plantuml/plantuml:latest -tsvg "**/*.puml"

# Generate SVG image from specific PlantUML file
generate-puml name:
docker run --rm -v $(pwd):/puml -w /puml ghcr.io/plantuml/plantuml:latest -tsvg "**/{{name}}.puml"

# Run the Python tests
test-python:
poetry run pytest
Expand All @@ -39,7 +31,11 @@ build-website:
# Run checks on commits with non-main branches
check-commits:
#!/bin/zsh
if [[ $(git rev-parse --abbrev-ref HEAD) != "main" ]]
branch_name=$(git rev-parse --abbrev-ref HEAD)
number_of_commits=$(git rev-list --count HEAD ^$branch_name)
if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]]
then
poetry run cz check --rev-range main..HEAD
else
echo "Not on main or haven't committed yet."
fi
11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tool.poetry]
name = "NAME"
name = "template-python-package"
version = "0.0.1"
description = ""
authors = [
Expand All @@ -18,7 +18,6 @@ readme = "README.md"
homepage = "https://NAME.seedcase-project.org"
repository = "https://github.com/seedcase-project/REPO"
license = "MIT"
packages = [{include = "NAME"}]

[tool.poetry.urls]
"Bug Tracker" = "https://github.com/seedcase-project/REPO/issues"
Expand All @@ -35,3 +34,11 @@ ruff = "^0.6.2"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.pytest.ini_options]
addopts = [
# A short traceback mode to make it easier to view
"--tb=short",
# Use the package in `src/`
"--import-mode=importlib",
]
4 changes: 2 additions & 2 deletions ruff.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Support Python 3.10+
target-version = "py310"
# Support Python 3.12+
target-version = "py312"

# In addition to the default formatters/linters, add these as well.
[lint]
Expand Down
Empty file added src/PACKAGE-NAME/__init__.py
Empty file.