BestieTemplate.jl

# BestieTemplate.jl Your best practices friend.
[![Stable Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaBesties.github.io/BestieTemplate.jl/stable) [![Development documentation](https://img.shields.io/badge/docs-dev-blue.svg)](https://JuliaBesties.github.io/BestieTemplate.jl/dev) [![Test workflow status](https://github.com/JuliaBesties/BestieTemplate.jl/actions/workflows/Test.yml/badge.svg?branch=main)](https://github.com/JuliaBesties/BestieTemplate.jl/actions/workflows/Test.yml?query=branch%3Amain) [![Coverage](https://codecov.io/gh/JuliaBesties/BestieTemplate.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/JuliaBesties/BestieTemplate.jl) [![Lint workflow Status](https://github.com/JuliaBesties/BestieTemplate.jl/actions/workflows/Lint.yml/badge.svg?branch=main)](https://github.com/JuliaBesties/BestieTemplate.jl/actions/workflows/Lint.yml?query=branch%3Amain) [![Docs workflow Status](https://github.com/JuliaBesties/BestieTemplate.jl/actions/workflows/Docs.yml/badge.svg?branch=main)](https://github.com/JuliaBesties/BestieTemplate.jl/actions/workflows/Docs.yml?query=branch%3Amain) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8350577.svg)](https://doi.org/10.5281/zenodo.8350577) [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md) [![All Contributors](https://img.shields.io/github/all-contributors/JuliaBesties/BestieTemplate.jl?labelColor=5e1ec7&color=c0ffee&style=flat-square)](#contributors) [![BestieTemplate](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/JuliaBesties/BestieTemplate.jl/main/docs/src/assets/badge.json)](https://github.com/JuliaBesties/BestieTemplate.jl)
## What does `BestieTemplate` do? Creating `Julia` packages involve the creation and edition of many tiny files. Wouldn't it be great to automate this? This is exactly what `BestieTemplate` does. ### FAQ - How is `BestieTemplate` different from `PkgTemplates`? - it can be applied to existing packages - it invites to follow some (opinionated) best practices - it can be reapplied to acquire updates made to the template - it is automatically reapplied through Pull Requests made by the `Copier.yml` workflow (Work in progress) ### Architecture Under the hood, `BestieTemplate` is no more and no less than: - a [copier](https://copier.readthedocs.io) template/skeleton for Julia packages (see folder [template](template)); and - a package that wraps `copier` in Julia using `PythonCall` with some convenience functions. ## Quickstart Install `BestieTemplate` in your chosen environment (we recommend globally) by entering `pkg` mode by pressing `]` and then: ```julia-repl julia> # press ] pkg> add BestieTemplate ``` then: ```julia-repl julia> using BestieTemplate julia> BestieTemplate.generate("path/to/YourNewPackage.jl") julia> # or BestieTemplate.apply("path/to/YourExistingPackage.jl") ``` please note that `"YourPackage.jl"` can either be a fresh new package or an existing one. [![asciicast](docs/src/assets/demo.gif)](https://asciinema.org/a/611189) If you like what you see, check the [full usage guide](https://JuliaBesties.github.io/BestieTemplate.jl/stable/10-guides/10-full-guide/). ## Without Julia, or from an AI coding agent Individual features of the template (`AGENTS.md`, changelog, Dependabot, pre-commit, …) can be added to an existing package without installing Julia, using the experimental [`bestie-template`](https://pypi.org/p/bestie-template) Python package. With [uv](https://docs.astral.sh/uv/) installed, no install step is needed: ```sh uvx --from bestie-template bestie list-features uvx --from bestie-template bestie add-feature changelog,dependabot path/to/MyPackage.jl ``` See the [quick guide](https://JuliaBesties.github.io/BestieTemplate.jl/stable/10-guides/05-quick-guide/#Adding-features-directly-via-bestie-CLI) for more details, and its [`add_feature`](https://JuliaBesties.github.io/BestieTemplate.jl/stable/10-guides/05-quick-guide/#Adding-a-single-feature-with-add_feature) counterpart for the Julia version. For AI coding agents, the same workflow is packaged as the [`bestie-features` skill](skills/bestie-features/SKILL.md), which is installable with ```sh npx skills add JuliaBesties/BestieTemplate.jl ``` See [skills.sh](https://www.skills.sh) for what agent skills are and which agents support them. ## Users and Examples The following are users and examples of repos using this template, or other templates based on it. Feel free to create a pull request to add your repo. - This package itself uses the template. - [TulipaIO.jl](https://github.com/TulipaEnergy/TulipaIO.jl) ## Contributing If you would like to get involved in the BestieTemplate growth, please check our [contributing guide](docs/src/90-contributing.md). We welcome contributions of many types, including coding, reviewing, creating issues, creating tutorials, interacting with users, etc. Make sure to follow our [code of conduct](CODE_OF_CONDUCT.md). If your interest is in developing the package, check the [development guide](docs/src/91-developer.md) as well. ### AI Coding Assistant Attribution We use and accepts pull requests with AI coding assistants to help with development, but we expect the committers to understand and be responsible for the code that they introduce. All commits that receive AI assistance should be signed off with: ```plaintextt Co-authored-by: MODEL NAME (FULL MODEL VERSION) ``` For example: ```plaintextt Co-authored-by: Claude Code (claude-sonnet-4-20250514) ``` ## References Here is a list of links/repos that include content that we have used for inspiration, or used directly. This is most likely not a complete list, since many of the things included here were based on existing packages and knowledge that we brought from other projects. This also doesn't explain where each file came from or why they are here. You can find some of that information in the [Explanation](https://JuliaBesties.github.io/BestieTemplate.jl/stable/20-explanation/) section of the docs. - [PkgTemplates.jl](https://github.com/JuliaCI/PkgTemplates.jl), naturally. We used it for many years, and in particular for the initial TulipaEnergyModel.jl commit (see below). - [Netherlands eScience Center's python template](https://github.com/NLeSC/python-template) includes many of the best practices that we apply here. We used many of the ideas there in a Julia context, and took many non-Julia specific ideas from there. - [TulipaEnergyModel.jl](https://github.com/TulipaEnergy/TulipaEnergyModel.jl) was the project that motivated this version of a template. From the start we decide to implement many best practices and so we started from a PkgTemplates.jl template and started adding parts of the python template that made sense. - The [Julia Smooth Optimizers](https://jso.dev) package ecosystem was one of the main motivations to look for a solution that could be applied and reapplied to existing packages, in particular to help maintainers. ### Contributors
Abel Soares Siqueira
Abel Soares Siqueira

πŸ’» πŸ“† πŸ“– 🚧
Tangi Migot
Tangi Migot

πŸ’» πŸ“– πŸ‘€
Pablo RodrΓ­guez-SΓ‘nchez
Pablo RodrΓ­guez-SΓ‘nchez

πŸ“– πŸ€”
Olga Lyashevska
Olga Lyashevska

πŸ’» πŸ“– πŸ€”
Luisa Orozco
Luisa Orozco

πŸ’» πŸ“– πŸ€”
Netherlands eScience Center
Netherlands eScience Center

πŸ’΅
Suvayu Ali
Suvayu Ali

πŸ› πŸ‘€ πŸ’»
Stefan Verhoeven
Stefan Verhoeven

πŸ’» πŸ€”
Dominique
Dominique

πŸ€” πŸ’»
fdiblen
fdiblen

πŸ’» πŸ‘€
Greg Neustroev
Greg Neustroev

πŸ’»
Luca Ferranti
Luca Ferranti

πŸ€”
Guillaume Dalle
Guillaume Dalle

πŸ€”
Johannes Hidding
Johannes Hidding

πŸ› πŸ‘€
Frames White
Frames White

πŸ’» πŸ› πŸ€”
Lauren Clisby
Lauren Clisby

πŸ€” πŸ’»
Diego Alejandro Tejada Arango
Diego Alejandro Tejada Arango

πŸ€”
LeoXia
LeoXia

πŸ’»
Stefan de Lange
Stefan de Lange

πŸ’»
Misha Mikhasenko
Misha Mikhasenko

πŸ’» πŸ“– πŸ›
Kyle Robert Steffen
Kyle Robert Steffen

πŸ›
Bart Schilperoort
Bart Schilperoort

πŸ›
Mike Boyle
Mike Boyle

πŸ› πŸ’»
Numeryst
Numeryst

πŸ›