Skip to content

uchicago-dsi/clinic-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Clinic Cookiecutter

The goal of this repository is to be a central location for templating University of Chicago Data Clinic projects. When updating this repository the following principals should be followed:

  • Low overhead on developers: This cookiecutter is meant to create templates that can be used to quickly spin up new project repositories. Adding additional steps post creation or an endless series of prompts will reduce its usefullness.
  • Up to date with best practices: The tools used here should adhere as closely as possible to modern and popular methods
  • Justify decisions: Decisions should be justified so future collaborators can make informed decisions as conditions change

Usage

  1. Install cookiecutter. pip install cookiecutter

  2. Select this template to create a repository in the current directory. cookiecutter https://github.com/uchicago-dsi/clinic-template

  3. Follow the prompts in your terminal.

  4. Turn the directory into a git repository

    git init
    git add .
    git commit -m "Initial Commit"
  5. We will follow the steps here to create repo on github and then push this repository.

    1. Step #1 is to crete an empty repo
    2. Step #2 is to set the remote branch and then push. Note that the code below requires replacing the GH_ORG and the REPO_NAME.
    git remote add origin git@github.com:{{GH_ORG}}/{{REPO_NAME}}.git
    git branch -M main
    git push -u origin main

Next steps

  1. Did you add branch protections?
  2. Set up additional users and permissions.

Notes once complete

The file ``DataPolicy.md" contains the default data and code sharing policies for the project.

Linter

To check for style, we use flake8, black, and isort. These are all run using pre-commit. pre-commit is a tool for managing git hook scripts that we can use to run code checkers before git actions (like run flake8 before every commit). If it fails, the commit will be blocked and the user will be shown what needs to be changed. We configure our linters with setup.cfg

GitHub

To run checkers on pull requests to main and dev, we use the .github/workflows/main.workflow.yml file.

Contributing

The root directory of this repository contains files related to the cookiecutter itself. All generated repositories will have {{ cookiecutter.project_slug }} as its root directory. To make additions that are dependent on user prompts, add the variable to the cookiecutter.json file and reference the variable withing the {{ cookiecutter.project_slug }} directory using Jinja templating.

For more information on cookiecutter, visit its git repository

About

Small repository containing desired starting files for clinic projects and documentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published