Skip to content

refactor: ♻️ revise pyproject.toml.jinja to use Jinja variables #76

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 2 commits into from
Jul 15, 2025
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
24 changes: 24 additions & 0 deletions copier.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,25 @@
_subdirectory: template

# Questions:

package_github_repo:
type: str
default: "NA"
help: "What is the GitHub repository spec for the package (in the form of 'user/repo'))?"
placeholder: "user/repo"

author_given_name:
type: str
help: "What is your first/given name?"

author_family_name:
type: str
help: "What is your last/family name?"

author_email:
type: str
help: "What is your email address?"

package_abbrev:
type: str
help: "What is the abbreviated name of the package? This could be the name of your GitHub repository and should be a short, lowercase name without spaces or special characters. For example, 'template-data-package'."
23 changes: 13 additions & 10 deletions template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
[project]
name = "template-data-package"
name = {{ package_abbrev }}
version = "0.1.0"
description = "A template for structuring all the pieces for a data package."
# TODO: Add a description of the package.
description = ""
authors = [
{name = "Luke W. Johnston", email = "lwjohnst@gmail.com" },
{name = "Kristiane Beicher", email = "kris.beicher@clin.au.dk" },
{name = "{{ author_given_name }} {{ author_family_name }}", email = "{{ author_email }}" },
# TODO: Add more authors as needed.
]
maintainers = [
{name = "Luke W. Johnston", email = "lwjohnst@gmail.com" },
{name = "Kristiane Beicher", email = "kris.beicher@clin.au.dk" },
{name = "{{ author_given_name }} {{ author_family_name }}", email = "{{ author_email }}" },
# TODO: Add more maintainers as needed.
]
readme = "README.md"
license = "MIT"
# TODO: Add a license for the package.
license = ""
license-files = ["LICENSE.md"]
requires-python = ">=3.12"
dependencies = [
"polars>=1.27.0",
"pyjanitor>=0.31.0",
"seedcase-sprout>=0.46.3",
]

{{ if package_github != "NA" }}
[project.urls]
issues = "https://github.com/seedcase-project/REPO/issues"
repository = "https://github.com/seedcase-project/REPO"
issues = "https://github.com/{{ package_github_repo }}/issues"
repository = "https://github.com/{{ package_github_repo }}"
{{ endif }}

[dependency-groups]
dev = [
Expand Down