You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please note that if you are working from some other branch than `main`, you should switch to that branch. For example, if you are working from the `dev` branch, you should do:
29
+
30
+
```shell
31
+
git fetch origin
32
+
git switch -c dev origin/dev
33
+
```
34
+
26
35
### Create a virtual environment
27
36
28
37
Next, make a virtual environment, activate it, and install the development dependencies in it. This will enable you to
@@ -53,27 +62,28 @@ pytest
53
62
pytest tests/
54
63
```
55
64
56
-
## Using `cookiecutter` to generate a new package from the command line
65
+
## Using `copier` to generate a new package from the command line
57
66
58
67
While making changes to the template, you'll regularly want to verify that the packages generated with the template
59
68
still work. Any easy way to do this is to generate new packages in a temporary directory (which will get removed
# run cookiecutter with the template to generate a new package
67
-
cookiecutter <path to where your template is>
75
+
# run copier with the template to generate a new package
76
+
copier copy --vcs-ref HEAD <path/to/project/template> my-python-project
68
77
69
78
# when it asks you for the GitHub organization, put in your own name;
70
79
# for the other questions, just accept the default
71
80
72
81
# 'ls' should return just the one directory called 'my-python-project'
73
82
ls
74
83
```
84
+
Notice, that the `--vcs-ref HEAD` flag is used to make sure that the current checked out version of the local template is used.
75
85
76
-
If your Python package was created successfully, `cookiecutter` will point you to a file
86
+
If your Python package was created successfully, `copier` will point you to a file
77
87
(`my-python-project/next_steps.md`) that contains information on next steps.
78
88
79
89
In addition to the information in `my-python-project/project_setup.md`, the developer documentation
@@ -95,7 +105,7 @@ Follow the instructions from `my-python-project/README.dev.md` and make sure tha
95
105
2. Verify that the information in `CITATION.cff` is correct.
96
106
3. Make sure that `version` in [setup.cfg](setup.cfg) and `version` in [CITATION.cff](CITATION.cff) have been bumped to the to-be-released version of the template
97
107
4. Run the unit tests with `pytest tests/`
98
-
5. Go through the steps outlined above for [generating a new package from the command line](#using-cookiecutter-to-generate-a-new-package-from-the-command-line), and verify that the generated package works as it should.
108
+
5. Go through the steps outlined above for [generating a new package from the command line](#using-copier-to-generate-a-new-package-from-the-command-line), and verify that the generated package works as it should.
0 commit comments