Spend less time setting up and configuring your new Python packages by using this template. This Copier template includes best practices for research software so your new package will include these practices from the start.
You can choose from various user profiles, each offering a range of features to suit your needs.
The template profiles for a Python package offer varying levels of customization to cater to different user needs. Below are the profiles the template offers.
This profile offers the essential features to begin developing a Python package, making it ideal for first-time research software developers. Additional features can be added as needed.
This option provides a pre-selected set of features for research software, which users can fully customize.
This fully customizable profile enables you to selectively include or exclude features in your Python package.
There are multiple scenarios to use this template:
In all three scenarios, you will need to install Copier first, which we recommend doing with pipx
:
python3 -m pip install --user pipx python3 -m pipx ensurepath pipx install copier
Note
Note that it is also possible to install Copier with regular pip
, but that Copier will then be installed in your common environment and may cause conflicts with its dependencies, while pipx
will install Copier in a separate and dedicated environment.
Run copier copy
with the template:
copier copy https://github.com/nlesc/python-template.git path/to/destination
Note
path/to/destination
is an empty directoryFor an explanation of what's there, read on in the project_setup.md
file.
To apply the template to pre-existing code, you can use the same copier copy
command as when creating a new package, except that you point to the folder containing your existing code rather than a new one:
copier copy https://github.com/nlesc/python-template.git path/to/existing/code
This works because if path/to/destination
already exists, Copier will update what is already there by either adding new files or updating existing files. Copier will ask to overwrite any files that resulted in conflicts. Especially if your files are already under version control, it is recommended to answer 'yes' for all files, you will still be able to review the changes suggested by the template.
Copier provides the functionality for re-applying the template to a previously created project using the copier update
command. This has two effects:
Caution
Do not manually update answers in .copier-answers.yml
, as it will result in unexpected behavior.
cd path/to/project copier update
If you don't want to change any of your answers, but only want to update your project according to the latest template updates, you can provide the --skip-answered
option. This tells Copier to reuse all of your previous answers, and simply bring in all updates from the template into your current project, such as updating which Python versions are supported. You will still be asked to answer any new questions that have been added to the template since you last applied it.
copier update --skip-answered
Many developers have gone before you in using this template to get started quickly. Check out their projects in the list below:
Suggestions/improvements/edits are most welcome. Please read the contribution guidelines before creating an issue or a pull request.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4