A Copier template for creating Panel extensions, leveraging the Pixi package manager to simplify setup and management.
This template comes preconfigured with essential tools and best practices to help you develop, document, and distribute high-quality Panel-based applications or extensions.
- Hatch-based Packaging: Managed by Hatch for streamlined dependency management and build processes.
- Linting and Code Quality with
ruff: A fast and configurable linting tool for maintaining consistent code style. - Testing with
pytest: Includes support for async tests and thorough configuration for reliable testing. - Documentation Generation: Leverages Zensical for beautiful documentation and mkdocstrings for automatic API documentation.
- GitHub Actions CI/CD: Preconfigured workflows for automated testing, building, and publishing.
- Pixi Package Management: Integrated with Pixi for efficient and reproducible environment management.
- Update Flexibility: Easily update your project to newer template versions with minimal disruption.
- BSD License: Uses the OSI-approved BSD license, ideal for open-source projects.
To install and get started with Pixi, please refer to the Pixi documentation.
To create a new Panel extension:
pixi exec --spec copier --spec ruamel.yaml -- copier copy --trust https://github.com/panel-extensions/copier-template-panel-extension <panel-extension-name>Or, to use a specific branch of copier-template-panel-extension, additionally specify vcs-ref:
pixi exec --spec copier --spec ruamel.yaml -- copier copy --trust https://github.com/panel-extensions/copier-template-panel-extension <panel-extension-name> --vcs-ref <branch_name>Go to Github and create your repository with the . Then set the remote:
git remote add origin https://github.com/<github-user>/<panel-extension-name>.gitThe push your new repository
pre-commit install && git push --set-upstream origin mainEnable GitHub Pages through Settings > Pages on the GitHub toolbar:
On your GitHub repo's About section in the sidebar, be sure to add the link to your docs page by toggling the checkbox:
https://<github-user>.github.io/<panel-extension-name>/
If your docs page is missing a sidebar, remember to add imports to src/__init__.py and include them in __all__.
Head over to PyPI and fill out the form:
Once you've populated the template, you can release to PyPI by creating a tag!
The docs page is served with Zensical and mkdocstrings. Configuration lives in the root's zensical.toml file. See mkdocstrings usage for available API documentation options.
We welcome contributions to this template! To get started:
git clone https://github.com/panel-extensions/copier-template-panel-extension
cd copier-template-panel-extensionThis project uses Pixi to manage dependencies. Install them with:
pixi installpixi run pre-commit-installThis repository is a Copier template. The key files are:
copier.yml: Defines the template questions (e.g.project_slug,author_name) and configuration. See the Copier docs on configuring a template for details.template/: Contains the files that get copied and rendered into each new project. Files ending in.jinjaare rendered using Jinja2 with answers fromcopier.ymlas variables.tasks/: Contains post-generation scripts run by Copier after copying the template.migrations/: Contains migration scripts used when updating a project to a newer template version.
To generate a temporary project from your local changes and inspect the output:
pixi run generate-temp-repoThis copies the template using your current working tree (--vcs-ref=HEAD) into a temporary directory and prints its path. You can then inspect or manually test the generated project.
The test suite generates projects from the template and validates the output:
pixi run testpixi run -e lint pre-commit-runTo update to the latest template version run:
pixi exec --spec copier --spec ruamel.yaml -- copier update --defaults --trustNote: copier will show Conflict for files with manual changes during an update. This is normal. As long as there are no merge conflict markers, all patches applied cleanly.



