DiamondLightSource / python-copier-template

Replacing Diamond Light Source's python3-pip-skeleton using Copier
Apache License 2.0
4 stars 2 forks source link

<img src="https://raw.githubusercontent.com/DiamondLightSource/python-copier-template/main/docs/images/dls-logo.svg" style="background: none" width="120px" height="120px" align="right">

CI License

python-copier-template

Diamond's opinionated copier template for pure Python projects managed by pip. It can be optionally used to:

Source https://github.com/DiamondLightSource/python-copier-template
Documentation https://DiamondLightSource.github.io/python-copier-template
Releases https://github.com/DiamondLightSource/python-copier-template/releases

It integrates the following tools:

Example

You can see the template in action in the example project. This is an up to date expansion of the template to illustrate how it looks with all the options enabled.

Create a new project via Developer Portal

[!NOTE] Template creation from the developer portal is currently under construction, so these instructions do not work yet

Visit https://dev-portal.diamond.ac.uk/create and you will see a list of templates that you can create. Pick the one marked Python Template and fill in the details of the project.

Create a new project from the commandline

You will need to pip install copier inside an activated venv from python3.10 or later, then you can create a new module via:

mkdir /path/to/my-project
# The --trust argument is required to run setup tasks such as initializing a git repository
copier copy --trust gh:DiamondLightSource/python-copier-template /path/to/my-project

You can also use it via pipx run copier if you have that installed.

See https://DiamondLightSource.github.io/python-copier-template for more detailed documentation.