diff --git a/README.md b/README.md index 364c88b..ba3c8c0 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,69 @@ -# Template for Seedcase Python packages +# Template Python Package: An opinionated setup for making Python packages -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 -gh repo create NAME --template seedcase-project/template-python-project -``` +[![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-teal.json?raw=true)](https://github.com/copier-org/copier) +[![GitHub +License](https://img.shields.io/github/license/seedcase-project/template-python-package.svg)](https://github.com/seedcase-project/template-python-package/blob/main/LICENSE.md) +[![GitHub +Release](https://img.shields.io/github/v/release/seedcase-project/template-python-package.svg)](https://github.com/seedcase-project/template-python-package/releases/latest) +[![Build +website](https://github.com/seedcase-project/template-python-package/actions/workflows/build-website.yml/badge.svg)](https://github.com/seedcase-project/template-python-package/actions/workflows/build-website.yml) +[![CodeQL](https://github.com/seedcase-project/template-python-package/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main)](https://github.com/seedcase-project/template-python-package/actions/workflows/github-code-scanning/codeql) +[![pre-commit.ci +status](https://results.pre-commit.ci/badge/github/seedcase-project/template-python-package/main.svg)](https://results.pre-commit.ci/latest/github/seedcase-project/template-python-package/main) +[![lifecycle](https://lifecycle.r-lib.org/articles/figures/lifecycle-experimental.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) +[![Project Status: Active – The project has reached a stable, usable +state and is being actively +developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) -## Setting things up after cloning +This repository contains a [copier](https://copier.readthedocs.io/) +template for setting up a new repository for a Python package. Along +with a structured directory layout, this template includes configured +development tools, CI configuration, and supporting files for package +setup, publishing, and maintenance. -Search for `NAME` and `REPO` and replace them with the name of your -project and the repository name. Then look for any `TODO` items. +Check out our +[website](https://template-python-package.seedcase-project.org/) for +more information, such as the features it provides and a +[guide](https://template-python-package.seedcase-project.org/docs/guide/) +to using the template. For a list of changes, see our +[changelog](https://template-python-package.seedcase-project.org/docs/releases/) +page. -## Setting things up +## Contributing -Use the commands found in -[`spaid`](https://github.com/seedcase-project/spaid) repo to run the -next setup steps. +Check out our [contributing +page](https://template-python-package.seedcase-project.org/contributing/) +for information on how to contribute to the project, including how to +set up your development environment. -Need to install these packages after: +Please note that this project is released with a [Contributor Code of +Conduct](https://github.com/seedcase-project/.github/blob/main/CODE_OF_CONDUCT.md). +By participating in this project you agree to abide by its terms. -``` bash -uv add --dev pre-commit ruff typos pytest bandit commitizen \ - genbadge jupyter pytest-cov quartodoc -``` +## Licensing + +This project is licensed under the [MIT +License](https://github.com/seedcase-project/template-python-package/blob/main/LICENSE.md). + +## Citing + +This project is part of the Seedcase Project, which is a collaborative +effort to create a framework for data management and analysis in +research. If you use this project in your work, please cite it as +follows: + +Johnston L.W., Brødbæk S.K., Beicher K., Vago M. Template Python +Package: An opinionated setup for making Python packages URL: +https://template-python-package.seedcase-project.org + +Or as a BibTeX entry: + + @misc{YourReferenceHere, + author = {Johnston, Luke William and Brødbæk, Signe Kirk and Beicher, Kristiane and Vago, Marton}, + title = {Template Python Package: An opinionated setup for making Python packages}, + url = {https://template-python-package.seedcase-project.org} + } diff --git a/README.qmd b/README.qmd index 39e8d23..6f44dc9 100644 --- a/README.qmd +++ b/README.qmd @@ -1,23 +1,68 @@ -# Template for Seedcase Python packages +--- +format: gfm +execute: + echo: false +jupyter: python3 +metadata-files: + - _metadata.yml +--- -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: +# {{< meta titles.full >}} -``` bash -# NAME is the name to give the new repository -gh repo create NAME --template seedcase-project/template-python-project -``` +{{< include /docs/includes/_badges.qmd >}} + +This repository contains a [copier](https://copier.readthedocs.io/) +template for setting up a new repository for a Python package. Along +with a structured directory layout, this template includes configurations +for tools that improve developer experience, continuous integration and +delivery workflows, and supporting files for building robust Python packages. + +Check out our +[website](https://{{< meta gh.repo >}}.{{< meta gh.org >}}.org/) for +more information, such as the features it provides and a +[guide](https://{{< meta gh.repo >}}.{{< meta gh.org >}}.org/docs/guide/) +to using the template. For a list of changes, see our +[changelog](https://{{< meta gh.repo >}}.{{< meta gh.org >}}.org/docs/releases/) +page. + +## Contributing + +Check out our [contributing +page](https://{{< meta gh.repo >}}.{{< meta gh.org >}}.org/contributing/) +for information on how to contribute to the project, including how to +set up your development environment. + +Please note that this project is released with a [Contributor Code of +Conduct](https://github.com/{{< meta gh.org >}}/.github/blob/main/CODE_OF_CONDUCT.md). +By participating in this project you agree to abide by its terms. -## Setting things up after cloning +::: content-hidden + -Search for `NAME` and `REPO` and replace them with the name of your project and the repository name. Then look for any `TODO` items. +### Contributors -## Setting things up +{{< include /_contributors.qmd >}} +::: -Use the commands found in [`spaid`](https://github.com/seedcase-project/spaid) repo to run the next setup steps. +## Licensing + +This project is licensed under the [MIT +License](https://github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/blob/main/LICENSE.md). + +## Citing + +This project is part of the Seedcase Project, which is a collaborative +effort to create a framework for data management and analysis in +research. If you use this project in your work, please cite it as +follows: + +```{python} +#| output: asis +!uvx --quiet cffconvert --format apalike +``` -Need to install these packages after: +Or as a BibTeX entry: -``` bash -uv add --dev pre-commit ruff typos pytest bandit commitizen \ - genbadge jupyter pytest-cov quartodoc +```{python} +!uvx --quiet cffconvert --format bibtex ``` diff --git a/_contributors.qmd b/_contributors.qmd new file mode 100644 index 0000000..1a5b315 --- /dev/null +++ b/_contributors.qmd @@ -0,0 +1,4 @@ +These are the people who have contributed by submitting changes through pull requests :tada: + + + [\@lwjohnst86](https://github.com/lwjohnst86), [\@signekb](https://github.com/signekb), [\@martonvago](https://github.com/martonvago) diff --git a/_metadata.yml b/_metadata.yml index 0004cf6..c5135a2 100644 --- a/_metadata.yml +++ b/_metadata.yml @@ -2,3 +2,7 @@ gh: org: "seedcase-project" repo: "template-python-package" + +titles: + full: "Template Python Package: An opinionated setup for making Python packages" + short: "Template Python Package" diff --git a/tools/get-contributors.sh b/tools/get-contributors.sh index 65bfbb4..40aea37 100644 --- a/tools/get-contributors.sh +++ b/tools/get-contributors.sh @@ -1,13 +1,13 @@ #!/usr/bin/env bash # Get a list of contributors to this repository and save it to -# _contributors.qmd.tmp file. It also: +# _contributors.qmd file (overwritten if it exists). It also: # # - Formats users into Markdown links to their GitHub profiles. # - Removes any usernames with the word "bot" in them. # - Removes the trailing comma from the list. repo_spec=${1} -echo "These are the people who have contributed by submitting changes through pull requests :tada:\n\n" > _contributors.qmd.tmp +echo "These are the people who have contributed by submitting changes through pull requests :tada:\n\n" > _contributors.qmd gh api \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ @@ -15,4 +15,4 @@ gh api \ --template '{{range .}} [\@{{.login}}]({{.html_url}}){{"\n"}}{{end}}' | \ grep -v "\[bot\]" | \ tr '\n' ', ' | \ - sed -e 's/,$//' >> _contributors.qmd.tmp + sed -e 's/,$//' >> _contributors.qmd