diff --git a/template/CODE_OF_CONDUCT.md b/template/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..22bcd1a --- /dev/null +++ b/template/CODE_OF_CONDUCT.md @@ -0,0 +1,30 @@ +# Contributor Code of Conduct + +As contributors and maintainers of this project, we pledge to respect +all people who contribute through reporting issues, posting suggestions, +updating any material, submitting pull requests, and other activities. + +We are committed to making participation in this project a +harassment-free experience for everyone, regardless of level of +experience, gender, gender identity and expression, sexual orientation, +disability, personal appearance, body size, race, ethnicity, age, or +religion. + +Examples of unacceptable behavior by participants include the use of +sexual language or imagery, derogatory comments or personal attacks, +trolling, public or private harassment, insults, or other unprofessional +conduct. + +Project maintainers have the right and responsibility to remove, edit, +or reject comments, commits, code, wiki edits, issues, and other +contributions that are not aligned to this Code of Conduct. Project +maintainers who do not follow the Code of Conduct may be removed from +the project team. + +Instances of abusive, harassing, or otherwise unacceptable behavior may +be reported by opening an issue or contacting one or more of the project +maintainers. + +This Code of Conduct is adapted from the Contributor Covenant +(https://contributor-covenant.org), version 1.0.0, available at +https://contributor-covenant.org/version/1/0/0/ diff --git a/template/CONTRIBUTING.md.jinja b/template/CONTRIBUTING.md.jinja new file mode 100644 index 0000000..fe684a2 --- /dev/null +++ b/template/CONTRIBUTING.md.jinja @@ -0,0 +1,59 @@ +# Contributing + +## Issues and bugs :bug: + +The easiest way to contribute is to report issues or bugs that you might +find while using `{{ github_repo }}`. You can do this by creating a +[new](https://github.com/{{ github_repo_spec }}/issues/new/choose) +issue on our GitHub repository. + +## Adding or modifying content :pencil2: + +{% if is_seedcase_project -%} +If you would like to contribute content, please check out our +[guidebook](https://guidebook.seedcase-project.org/) for more specific +details on how we work and develop. It is a regularly evolving document, +so is at various states of completion. +{%- endif %} + +To contribute to `{{ github_repo }}`, you first need to install +[uv](https://docs.astral.sh/uv/) and +[justfile](https://just.systems/man/en/packages.html). We use uv and +justfile to manage our project, such as to run checks and test the +template. Both the uv and justfile websites have a more detailed guide +on using uv, but below are some simple instructions to get you started. + +It's easiest to install uv and justfile using +[pipx](https://pypa.github.io/pipx/), so install that first. Then, +install uv and justfile by running: + +``` bash +pipx install uv rust-just +``` + +We keep all our development workflows in the `justfile`, so you can +explore it to see what commands are available. To see a list of commands +available, run: + +``` bash +just +``` + +As you contribute, make sure your changes will pass our tests by opening +a terminal so that the working directory is the root of this project's +repository and running: + +``` bash +just run-all +``` + +When committing changes, please try to follow [Conventional +Commits](https://decisions.seedcase-project.org/why-conventional-commits) +as Git messages. Using this convention allows us to be able to +automatically create a release based on the commit message by using +[Commitizen](https://decisions.seedcase-project.org/why-semantic-release-with-commitizen). +If you don't use Conventional Commits when making a commit, we will +revise the pull request title to follow that format, as we use [squash +merges](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/squashing-commits/about-squash-merges) +when merging pull requests, so all other commits in the pull request +will be squashed into one commit. diff --git a/template/README.md b/template/README.md new file mode 100644 index 0000000..c0dc5ea --- /dev/null +++ b/template/README.md @@ -0,0 +1 @@ +NOTE: Will be overwritten after running `just build-readme`. diff --git a/template/README.md.jinja b/template/README.md.jinja deleted file mode 100644 index ba17175..0000000 --- a/template/README.md.jinja +++ /dev/null @@ -1,3 +0,0 @@ - - -# {{ package_name }} diff --git a/template/README.qmd b/template/README.qmd new file mode 100644 index 0000000..25d4e75 --- /dev/null +++ b/template/README.qmd @@ -0,0 +1,82 @@ +--- +format: gfm +metadata-files: + - _metadata.yml +--- + +# {{< meta gh.repo >}}: TODO add more to title + +{{< include /docs/includes/_badges.qmd >}} + + + +::: callout-tip +This Python package was generated from the +[`template-python-package`](https://github.com/seedcase-project/template-python-package) +Seedcase template :tada: +::: + +## Project files and folders + +- `.github/`: Contains GitHub-specific files, such as issue and pull + request templates, workflows, + [dependabot](https://docs.github.com/en/code-security/getting-started/dependabot-quickstart-guide) + configuration, pull request templates, and a + [CODEOWNERS](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) + file. +- `tools/vulture-allowlist.py`: List of variables that shouldn't be flagged by [Vulture](https://github.com/jendrikseipp/vulture) as unused. +- `tools/get-contributors.sh`: Script to get list of project contributors. +- `tests/`: Test files for the package. +- `src/`: Source code for the package. +- `docs/`: Documentation about using and developing the Python package. +- `_renderer.py`: Custom [`quartodoc`](https://machow.github.io/quartodoc/) renderer. +- `pytest.ini`: Pytest configuration file. +- `mypy.ini`: [`mypy`](https://mypy.readthedocs.io/en/stable/) configuration file for type checking Python code. +- `.copier-answers.yml`: Contains the answers you gave when copying + the project from the template. **You should not modify this file + directly.** +- `.cz.toml`: + [Commitizen](https://commitizen-tools.github.io/commitizen/) + configuration file for managing versions and changelogs. +- `.pre-commit-config.yaml`: [Pre-commit](https://pre-commit.com/) + configuration file for managing and running checks before each + commit. +- `.typos.toml`: [typos](https://github.com/crate-ci/typos) spell + checker configuration file. +- `justfile`: [`just`](https://just.systems/man/en/) configuration + file for scripting project tasks. +- `.editorconfig`: Editor configuration file for + [EditorConfig](https://editorconfig.org/) to maintain consistent + coding styles across different editors and IDEs. +- `CHANGELOG.md`: Changelog file for tracking changes in the project. +- `CITATION.cff`: Structured citation metadata for your project. +- `CONTRIBUTING.md`: Guidelines for contributing to the project. +- `_metadata.yml`: Quarto metadata file for the website, including + information about the project, such as the titles and GitHub names. +- `pyproject.toml`: Main Python project configuration file defining + metadata and dependencies. +- `_quarto.yml`: Quarto configuration file for the website, including + settings for the website, such as the theme, navigation, and other + options. +- `ruff.toml`: [Ruff](https://docs.astral.sh/ruff/) configuration file + for linting and formatting Python code. +- `uv.lock`: Lockfile used by [`uv`](https://docs.astral.sh/uv/) to + record exact versions of installed dependencies. + +## Contributing + +Check out our [contributing document](CONTRIBUTING.md) 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](CODE_OF_CONDUCT.md). By participating in this project you agree +to abide by its terms. + +## Licensing + +This project is licensed under the [MIT License](LICENSE.md). + +## Changelog + +For a list of changes, see our [changelog](CHANGELOG.md) page. diff --git a/template/README.qmd.jinja b/template/README.qmd.jinja deleted file mode 100644 index 117f38b..0000000 --- a/template/README.qmd.jinja +++ /dev/null @@ -1,3 +0,0 @@ -# {{ package_name }} - - diff --git a/template/_metadata.yml.jinja b/template/_metadata.yml.jinja new file mode 100644 index 0000000..2815f98 --- /dev/null +++ b/template/_metadata.yml.jinja @@ -0,0 +1,3 @@ +gh: + repo: {{ github_repo }} + org: {{ github_user }} diff --git a/template/_quarto.yml.jinja b/template/_quarto.yml.jinja index cf7c3ab..2eade5a 100644 --- a/template/_quarto.yml.jinja +++ b/template/_quarto.yml.jinja @@ -32,7 +32,7 @@ website: - icon: github href: "https://github.com/{{ package_github_repo }}" aria-label: "GitHub icon: Source code" - {% if is_seedcase_project -%} + {%- if is_seedcase_project %} - icon: house href: "https://seedcase-project.org" aria-label: "House icon: Main website for the Seedcase Project" diff --git a/template/docs/includes/_badges.qmd b/template/docs/includes/_badges.qmd new file mode 100644 index 0000000..f212358 --- /dev/null +++ b/template/docs/includes/_badges.qmd @@ -0,0 +1,15 @@ + + +[![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) +[![Supported Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https://raw.githubusercontent.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/refs/heads/main/pyproject.toml)](https://github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/blob/main/pyproject.toml) +[![GitHub License](https://img.shields.io/github/license/{{< meta gh.org >}}/{{< meta gh.repo >}}.svg)](https://github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/blob/main/LICENSE.md) +[![GitHub Release](https://img.shields.io/github/v/release/{{< meta gh.org >}}/{{< meta gh.repo >}}.svg)](https://github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/releases/latest) +[![Build documentation](https://github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/actions/workflows/build-website.yml/badge.svg)](https://github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/actions/workflows/build-website.yml) +[![Build package](https://github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/actions/workflows/build-package.yml/badge.svg)](https://github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/actions/workflows/build-package.yml) +[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/badge?raw=true)](https://scorecard.dev/viewer/?uri=github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}) +[![CodeQL](https://github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main)](https://github.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/actions/workflows/github-code-scanning/codeql) +[![code coverage](https://raw.githubusercontent.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/coverage/coverage.svg?raw=true)](https://htmlpreview.github.io/?https://raw.githubusercontent.com/{{< meta gh.org >}}/{{< meta gh.repo >}}/coverage/index.html) +[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/{{< meta gh.org >}}/{{< meta gh.repo >}}/main.svg)](https://results.pre-commit.ci/latest/github/{{< meta gh.org >}}/{{< meta gh.repo >}}/main) +[![lifecycle](https://lifecycle.r-lib.org/articles/figures/lifecycle-experimental.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) +[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) +