Skip to content

how to contribute a recipe

Bradley Huffaker edited this page Jul 14, 2023 · 5 revisions

You will be making a sentence, choose an id, create a working directory, and update related object JSON files.

example:

License

Please add the following to your recipe and related scripts, with the correct dates :

Copyright (c) 20** The Regents of the University of California
All Rights Reserved

Steps

First follow the sets in the general how to update. then add the following notes for recipes:

  1. select id : select an "id" that matches your sentence using only numbers and lower case characters, and doesn't match the directory name of an existing recipe.
    • "How to make a recipe." could be how_to_make_a_recipe
  2. create an issue : create an issue with the title "draft "+id with a link to your recipe's directory
    • '''draft how-to-make-a-recipe'''
    • take the issue's number and place it at the front of your branch. The names do not need to match.
  3. create a branch with your issue_id and something understandable as your selected_id name.
  • 345-how-to-make-a-recipe
  • if this recipe is part of a wide group of changes, it should use the group's branch
  1. create directory : create a Readme.md in a directory with the same name as the recipe's id in recipe
    • '''sources/recipe/(issue number)-how-to-make-a-recipe/Readme.md'''
  2. add metadata : at the top of the recipe you will create a JSON file that contains the recipe's metadata in JSON. Below is the standard format we use:
{
    "id" : ,
    "name" : ,
    "description": ,
    "links": [
        
    ],
    "tags" : [
        
    ],
    "authors":[
        
    ]
}
  1. add content : all the text below the metadata is stored as markdown in the recipe's content.
    • code recipes suggested structure:
      • introduction : targeted to domain expert with context for code
      • code : code snippet
        • we suggest putting the full script in the directory and only the relevant code into the Readme.md
      • background/caveats : information needed by none domain experts
      • caveats : caveats about the dataset or the recipe, such as limitations
  2. commit for review : after the first draft is done a second individual will review and test the sample code
    • repeat as nessary
  3. pull your branch to master : after finishing review, the recipe will be merged with master
  4. pull master to v1 : once any conflicts have been resolved from merging with master, master will be merged with v1

catalog markdown != github markdown

The markdown module that we are currently using for recipes does not parse markdown the same way that github does.

  • You must use ~~~ not ``` for code blocks
  • There must be white space above and below the first and last ~~~
    • will not work
    something above
    ~~~
    this block will not be parsed correctly
    ~~~
    something below
    
    • this will work
    
    ~~~
    this block will be parsed correctly
    ~~~
    
    
  • Tables also require white space above and below.
  • use dash (-) instead of special characters (•)
 • wrong 
 - right
    - right also