Git Product home page Git Product logo

reproschema-protocol-cookiecutter's Introduction

reproschema-protocol-cookiecutter

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:

Prerequisites

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 with pipx run cruft.

Creating a new protocol

Step 1: Generate the protocol files

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:

  1. protocol_name: Name of the protocol; use kebab-case with no spaces. Suggestions:
    • reproschema-protocol
    • mood-protocol
    • media-selection
    • mental-health-survey
  2. github_org: Your GitHub username or organization name. This is used to construct links to documentation pages.
  3. protocol_description: Description of the protocol.
    • A single brief sentence is recommended
    • Can easily be modified later
  4. 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.
  5. full_name: Your name
  6. email: Your email
  7. license: Choose a license for the project. If your desired license is not listed, you can update or remove the LICENSE file in the generated project.

Then, go to your protocol folder

cd my-reproschema-protocol  # using the folder example above
make setup

Step 2: Create a GitHub repository

  1. 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 same protocol_name

  2. 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
  3. 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.

Keeping your project up to date

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.

Credits

This cookiecutter was made with pieces from Cookiecutter and linkml-project-cookiecutter.

reproschema-protocol-cookiecutter's People

Contributors

yibeichan avatar actions-user avatar dependabot[bot] avatar

Watchers

Yaroslav Halchenko avatar Satrajit Ghosh avatar Jean-Baptiste Poline avatar  avatar David Keator avatar David Kennedy avatar Jeffrey S. Grethe, Ph.D. avatar Dorota Jarecka avatar  avatar

reproschema-protocol-cookiecutter's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.