Skip to content

Commit 39d374c

Browse files
committed
Update README.md to use copier
1 parent d8ad6a8 commit 39d374c

File tree

1 file changed

+60
-63
lines changed

1 file changed

+60
-63
lines changed

README.md

Lines changed: 60 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
# Netherlands eScience Center Python Template
22

3-
Spend less time setting up and configuring your new Python packages and comply with the
4-
[Netherlands eScience Center Software Development Guide](https://guide.esciencecenter.nl/)
5-
from the start.
3+
Spend less time setting up and configuring your new Python packages and comply with the [Netherlands eScience Center Software Development Guide](https://guide.esciencecenter.nl/) from the start.
64

7-
Use this [Cookiecutter](https://cookiecutter.readthedocs.io) template to generate
8-
an empty Python package. Features include:
5+
Use this [Copier](https://copier.readthedocs.io) template to generate an empty Python package. Features include:
96

107
- Boilerplate unit tests and documentation,
118
- [Python static setup configuration]({{directory_name}}/pyproject.toml),
129
- Open source software license,
13-
- Continuous integration with [GitHub action workflows]({{cookiecutter.directory_name}}/.github/workflows) for building, testing, link checking and linting,
10+
- Continuous integration with [GitHub action workflows]({{directory_name}}/.github/workflows) for building, testing, link checking and linting,
1411
- Code style checking with [ruff](https://beta.ruff.rs/),
15-
- [Editorconfig]({{cookiecutter.directory_name}}/.editorconfig),
12+
- [Editorconfig]({{directory_name}}/.editorconfig),
1613
- Usage and contribution documents:
17-
- [README.md]({{cookiecutter.directory_name}}/README.md) for package users,
18-
- [README.dev.md]({{cookiecutter.directory_name}}/README.dev.md) for package developer,
19-
- [project_setup.md]({{cookiecutter.directory_name}}/project_setup.md) with extensive documentation about project setup,
20-
- [Change log]({{cookiecutter.directory_name}}/CHANGELOG.md),
21-
- [Code of Conduct]({{cookiecutter.directory_name}}/CODE_OF_CONDUCT.md),
22-
- [Contributing guidelines]({{cookiecutter.directory_name}}/CONTRIBUTING.md),
14+
- [README.md]({{directory_name}}/README.md) for package users,
15+
- [README.dev.md]({{directory_name}}/README.dev.md) for package developer,
16+
- [project_setup.md]({{directory_name}}/project_setup.md) with extensive documentation about project setup,
17+
- [Change log]({{directory_name}}/CHANGELOG.md),
18+
- [Code of Conduct]({{directory_name}}/CODE_OF_CONDUCT.md),
19+
- [Contributing guidelines]({{directory_name}}/CONTRIBUTING.md),
2320
- Continuous code quality and code coverage reporting using [Sonarcloud](https://sonarcloud.io/),
24-
- Automatic creation of [issues]({{cookiecutter.directory_name}}/.github/next_steps) with instructions how to pass all GitHub action workflows and integrate with services like Zenodo and Read the Docs,
25-
- Instructions how to make package [citable]({{cookiecutter.directory_name}}/.github/next_steps/02_citation.md)
21+
- Automatic creation of [issues]({{directory_name}}/.github/next_steps) with instructions how to pass all GitHub action workflows and integrate with services like Zenodo and Read the Docs,
22+
- Instructions how to make package [citable]({{directory_name}}/.github/next_steps/02_citation.md)
2623
- FAIR software recommendation badge,
27-
- Optional [pre commit hook]({{cookiecutter.directory_name}}/README.dev.md#running-linters-locally) to catch lint errors early
24+
- Optional [pre commit hook]({{directory_name}}/README.dev.md#running-linters-locally) to catch lint errors early
2825

2926
## Badges
3027

@@ -45,24 +42,21 @@ an empty Python package. Features include:
4542

4643
## How to use
4744

48-
### Step 1/3: Install `cookiecutter`
49-
50-
We recommend installing `cookiecutter` in user space as per `cookiecutter`'s instructions. This way, you don't have to
51-
install `cookiecutter` for every new project.
45+
### Step 1/3: Install `copier`
5246

5347
```shell
54-
python -m pip install --user --upgrade cookiecutter
48+
pipx install copier
5549
```
5650

5751
### Step 2/3: Generate the files and directory structure
5852

59-
Run `cookiecutter` with the template:
53+
Run `copier` with the template:
6054

6155
```shell
6256
# Notes:
6357
# 1. See table below for explanation of each question
6458
# 2. The files will be generated in a new directory
65-
cookiecutter https://github.com/nlesc/python-template.git
59+
copier copy https://github.com/nlesc/python-template.git path/to/destination
6660
```
6761

6862
| Name | Default value | Explanation |
@@ -81,64 +75,67 @@ cookiecutter https://github.com/nlesc/python-template.git
8175
| code_of_conduct_email | [email protected] | Email address of the person who should be contacted in case of violations of the Code of Conduct. |
8276

8377
Once the project files have been generated, follow the steps outlined in
84-
[{{cookiecutter.directory_name}}/next_steps.md]({{cookiecutter.directory_name}}/next_steps.md).
78+
[{{directory_name}}/next_steps.md]({{directory_name}}/next_steps.md).
8579

8680
### Step 3/3: Read about what was just generated
8781

8882
Good job! You have now generated the skeleton for your package:
8983

9084
```text
91-
my-python-project/
92-
├── .editorconfig
93-
├── .githooks
94-
│ └── pre-commit
95-
├── .github
96-
│ ├── next_steps
97-
│ │ ├── 01_sonarcloud_integration.md
98-
│ │ ├── 02_citation.md
99-
│ │ ├── 03_readthedocs.md
100-
│ │ ├── 04_zenodo_integration.md
101-
│ │ └── 05_linting.md
102-
│ └── workflows
103-
│ ├── build.yml
104-
│ ├── cffconvert.yml
105-
│ ├── documentation.yml
106-
│ ├── markdown-link-check.yml
107-
│ ├── next_steps.yml
108-
│ └── sonarcloud.yml
109-
├── .gitignore
110-
├── .mlc-config.json
111-
├── .readthedocs.yaml
85+
.
11286
├── CHANGELOG.md
11387
├── CITATION.cff
11488
├── CODE_OF_CONDUCT.md
11589
├── CONTRIBUTING.md
116-
├── LICENSE
117-
├── MANIFEST.in
118-
├── NOTICE
119-
├── README.dev.md
120-
├── README.md
90+
├── .copier-answers.yml
12191
├── docs
122-
│ ├── Makefile
123-
│ ├── _templates
124-
│ │ └── .gitignore
125-
│ ├── conf.py
126-
│ ├── index.rst
127-
│ └── make.bat
92+
│   ├── conf.py
93+
│   ├── index.rst
94+
│   ├── make.bat
95+
│   ├── Makefile
96+
│   └── _templates
97+
│   └── .gitignore
98+
├── .editorconfig
99+
├── .githooks
100+
│   └── pre-commit
101+
├── .github
102+
│   ├── next_steps
103+
│   │   ├── 01_sonarcloud_integration.md
104+
│   │   ├── 02_citation.md
105+
│   │   ├── 03_readthedocs.md
106+
│   │   ├── 04_zenodo_integration.md
107+
│   │   └── 05_linting.md
108+
│   └── workflows
109+
│   ├── build.yml
110+
│   ├── cffconvert.yml
111+
│   ├── documentation.yml
112+
│   ├── markdown-link-check.yml
113+
│   ├── next_steps.yml
114+
│   └── sonarcloud.yml
115+
├── .gitignore
116+
├── MANIFEST.in
117+
├── .mlc-config.json
128118
├── next_steps.md
119+
├── NOTICE
129120
├── project_setup.md
130121
├── pyproject.toml
122+
├── README.dev.md
123+
├── README.md
124+
├── .readthedocs.yaml
131125
├── sonar-project.properties
132126
├── src
133-
│ └── my_python_package
134-
│ ├── __init__.py
135-
│ └── my_module.py
136-
└── tests
137-
├── __init__.py
138-
└── test_my_module.py
127+
│   └── my_python_package
128+
│   ├── __init__.py
129+
│   └── my_module.py
130+
├── tests
131+
│   ├── __init__.py
132+
│   ├── test_my_module.py
133+
│   ├── test_project.py
134+
│   └── test_values.py
135+
└── .zenodo.json
139136
```
140137

141-
For an explanation of what's there, read on in the [project_setup.md]({{cookiecutter.directory_name}}/project_setup.md) file.
138+
For an explanation of what's there, read on in the [project_setup.md]({{directory_name}}/project_setup.md) file.
142139
There are also instructions on how to [apply the template to an existing Python package](ADD_TO_EXISTING_PACKAGE.md).
143140

144141
## Examples

0 commit comments

Comments
 (0)