Installation¶
This guide covers setting up and using the Copier Data Science template.
Prerequisites¶
Before you begin, make sure you have the following installed:
-
- Install using winget in PowerShell:
winget install --id Git.Git
- Install using winget in PowerShell:
-
copier installed for template management
- Install
uvand copier by running
- Install
winget install --id astral.uv
uv tool install copier
Installing Copier
copier can be installed using a number of Python package managers. We recommend
uv as it is also used by the template, but you are free to use pip, conda,
or others as you like.
Creating a New Project from the Template¶
Steps¶
- Create a directory where you'd like the project created:
mkdir path/to/project
- Enter the directory:
cd path/to/project
- Create the project:
copier copy --trust git+https://github.com/PatternLabs-XYZ/CopierDataScience.git .
Windows Users
If copier is not found on your PATH, you may need to use copier.exe instead.
Always Use --trust Flag
The --trust flag is required when using this copier template. This is due to the
template running commands that initialize new git repositories during project
generation.
What Happens During Installation¶
When you create a new project using copier, several actions occur:
- The template is copied to your local directory
- Files are rendered based on your answers to the template questions
- A local Git repository is created with an initial commit labeled "init"
Updating an Existing Project¶
To pull in the latest template changes to an existing project:
-
Make sure your working directory is clean — commit or stash any uncommitted changes.
-
Run the update command:
copier update --trust
- Review the changes in your git staging area before committing. Copier applies
template updates as file modifications, so you can inspect them with
git diff --staged.
How Template Updates Work
Copier tracks the template version your project was generated from. When you run
copier update, it diffs the old and new template versions and applies the changes
to your project files. The result shows up as modified files in git, giving you full
control over what to accept.
Next Steps¶
After creating your project, you'll need to set up your development environment. See the Environment Setup guide for instructions.