A Cookiecutter for ReproSchema protocols.
You can find a demo protocol here generated by this cookiecutter. Here is our online document to help you customize your newly generated protocol based on specific research needs. The relevant chapters are as follows:
- Creating a Research Protocol Using Cookiecutter
- Adopting Assessments from the reproschema-library
- Creating New Assessments for Unique Research Needs
- Add a Feedback Section
- Finalizing the Protocol
- Toolkit
The following are required and recommended tools for using this cookiecutter and the ReproSchema protocol it generates. This is all a one-time setup, so if you have already done it, skip to the next section!
-
pipx
pipx is a tool for managing isolated Python-based applications. It is the recommended way to install Poetry and cruft. To install
pipx
follow the instructions here: https://pypa.github.io/pipx/installation/ -
cruft
cruft is a tool for generating projects based on a cookiecutter (like this one!) and keeping those projects updated if the original cookiecutter changes. Install it with
pipx
by running:pipx install cruft
You may also choose to not have a persistent installation of cruft, in which case you would replace any calls to the
cruft
command below withpipx run cruft
.
To generate a new Reproschema protocol, run the following:
cruft create https://github.com/ReproNim/reproschema-protocol-cookiecutter
You will be prompted for a few values. The defaults are fine for most protocols, but do name your protocol something that makes sense to you! The interactive session will guide you through the process:
protocol_name
: Name of the protocol; use kebab-case with no spaces. Suggestions:reproschema-protocol
mood-protocol
media-selection
mental-health-survey
github_org
: Your GitHub username or organization name. This is used to construct links to documentation pages.protocol_description
: Description of the protocol.- A single brief sentence is recommended
- Can easily be modified later
number_of_activities
: How many activities/assessments do you want to create? Choose between 1 and 5; later, it will randomly generate the number of activities you choose for your protocol.full_name
: Your nameemail
: Your emaillicense
: Choose a license for the project. If your desired license is not listed, you can update or remove theLICENSE
file in the generated project.
Then, go to your protocol folder
cd my-reproschema-protocol # using the folder example above
make setup
-
Go to https://github.com/new and follow the instructions, being sure NOT to add a
README
or.gitignore
file (this cookiecutter template will take care of those files for you). Be sure your GitHub repo uses the sameprotocol_name
-
Add the remote to your local git repository
git remote add origin https://github.com/{github-user-or-organization}/{protocol_name}.git git branch -M main git push -u origin main
-
Create the gh-pages branch
- Fetch the latest changes from your repository (if any):
git fetch origin
- Create and switch to the new gh-pages branch:
git checkout -b gh-pages
- Push the gh-pages branch to remote:
git push --set-upstream origin gh-pages
This branch allows you to deploy your ReproSchema UI publicly.
- Fetch the latest changes from your repository (if any):
To be up-to-date with the template, first check if there is a mismatch between the project's boilerplate code and the template by running:
cruft check
This indicates if there is a difference between the current project's boilerplate code and the latest version of the project template. If the project is up-to-date with the template:
SUCCESS: Good work! Protocol's cruft is up to date and as clean as possible :).
Otherwise, it will indicate that the project's boilerplate code is not up-to-date by the following:
FAILURE: Protocol's cruft is out of date! Run `cruft update` to clean this mess up.
This cookiecutter was made with pieces from Cookiecutter and linkml-project-cookiecutter.