|
1 |
| -# LinkML Project Copier Template |
| 1 | +# A Copier Template for LinkML Projects |
2 | 2 |
|
3 |
| -> This is a new LinkML project template that uses copier instead of cruft/cookiecutter and |
4 |
| -> replaces make by [just](https://github.com/casey/just) as command runner. |
5 |
| -> |
6 |
| -> The starting point was https://github.com/linkml/linkml-project-cookiecutter/ (commit [1094cf2](https://github.com/linkml/linkml-project-cookiecutter/commit/1094cf2ce542028ab0017eaa059dd49cdde81fb5), date 2025-01-10). |
7 |
| -> The code from the [just command runner PR](https://github.com/linkml/linkml-project-cookiecutter/pull/127) was included (up to commit [3eb2522](https://github.com/linkml/linkml-project-cookiecutter/tree/3eb2522f5baa9e8f27ffb4ae28c0134a42d72c9d)). |
| 3 | +This template uses the code-scaffolding tool [copier](https://copier.readthedocs.io/) to create a [LinkML](https://github.com/linkml/linkml) project. |
| 4 | +Copier supports code lifecycle management, allowing you to seamlessly incorporate updates into your project when the template is enhanced. |
8 | 5 |
|
9 |
| -A [copier](https://copier.readthedocs.io/) template for projects using [LinkML](https://github.com/linkml/linkml). |
| 6 | +* Early releases (0.1.x) maintain backwards compatibility with [linkml-project-cookiecutter](https://github.com/linkml/linkml-project-cookiecutter/). This facilitates to experiment with the migration of existing cruft/cookiecutter-based projects. |
| 7 | +* Later releases starting with 0.2.0 will gradually give up compatibility. |
| 8 | + |
| 9 | +The generated project uses [just](https://github.com/casey/just) as preferred command runner, even in the 0.1.x releases. |
| 10 | + |
| 11 | +> The starting point of this template was [linkml-project-cookiecutter](https://github.com/linkml/linkml-project-cookiecutter/) (commit [1094cf2](https://github.com/linkml/linkml-project-cookiecutter/commit/1094cf2ce542028ab0017eaa059dd49cdde81fb5), date 2025-01-10). |
| 12 | +> The code from the [just command runner PR](https://github.com/linkml/linkml-project-cookiecutter/pull/127) was also included (up to commit [3eb2522](https://github.com/linkml/linkml-project-cookiecutter/tree/3eb2522f5baa9e8f27ffb4ae28c0134a42d72c9d)). |
10 | 13 |
|
11 | 14 | ## Prerequisites
|
12 | 15 |
|
13 |
| -The following are required and recommended tools for using this copier template and the LinkML project that it generates. This is all one-time setup, so if you have already done it skip to the [next section](#creating-a-new-project)! We assume that you have full internet access. If not please read our section on `working in isolated environments` (tbw). |
| 16 | +The following are required and recommended tools for using this copier template and the LinkML project that it generates. This is all one-time setup, so if you have already done it skip to the [next section](#creating-a-new-project)! We assume that you have full internet access. |
14 | 17 |
|
15 | 18 | * **git / GitHub account**
|
16 | 19 |
|
@@ -125,7 +128,7 @@ just testdoc
|
125 | 128 |
|
126 | 129 | 1. Go to https://github.com/new and follow the instructions, being sure to NOT add a `README` or `.gitignore` file (this copier template will add those files for you)
|
127 | 130 |
|
128 |
| -2. Add the remote to your local git repository |
| 131 | +2. Add the remote to your local git repository: |
129 | 132 |
|
130 | 133 | ```bash
|
131 | 134 | git remote add origin https://github.com/{github-user-or-organization}/{project-name}.git
|
@@ -154,23 +157,23 @@ This is a rough guide on the required steps.
|
154 | 157 | Feedback and suggestions for improvement based on your experiences are very welcome.
|
155 | 158 | The commands are written to be run at the root of your project.
|
156 | 159 |
|
157 |
| -- Start with a clean state of the existing project (check with `git status`) |
158 |
| -- Create a new branch and activate it |
| 160 | +* Start with a clean state of the existing project (check with `git status`). |
| 161 | +* Create a new branch and activate it: |
159 | 162 |
|
160 | 163 | `git switch -c migrate-to-copier`
|
161 | 164 |
|
162 |
| -- Adapt your project and create a copier answers file (`.copier-answers`) by running |
| 165 | +* Adapt your project and create a copier answers file (`.copier-answers`) by running: |
163 | 166 |
|
164 | 167 | `copier copy --trust --skip-tasks --vcs-ref=HEAD gh:dalito/linkml-project-copier .`
|
165 | 168 |
|
166 | 169 | If you start from a linkml-project-cookiecutter based project,
|
167 | 170 | look into the `.cruft.json` file to find out which values you chose when you configured your project.
|
168 | 171 | Be sure to enter the same values when answering the copier questions.
|
169 | 172 |
|
170 |
| -- Carefully review the changes that copier made to your project. |
171 |
| -- If you used a cruft/cookiecutter template before, you may delete the cruft file `.cruft.json`. |
172 |
| -- If you are happy, commit all changes to the `migrate-to-copier` branch. |
173 |
| -- To finalise the migration, merge the `migrate-to-copier` branch to your main branch. |
| 173 | +* Carefully review the changes that copier made to your project. |
| 174 | +* If you used a cruft/cookiecutter template before, you may delete the cruft file `.cruft.json`. |
| 175 | +* If you are happy, commit all changes to the `migrate-to-copier` branch. |
| 176 | +* To finalise the migration, merge the `migrate-to-copier` branch to your main branch. |
174 | 177 |
|
175 | 178 | ## Keeping your project up to date or changing its configuration
|
176 | 179 |
|
|
0 commit comments