Skip to content

Commit

Permalink
#18 updated the contributors guide and added several images.
Browse files Browse the repository at this point in the history
  • Loading branch information
Castronova committed Apr 5, 2022
1 parent 86ed709 commit 5171b81
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 19 deletions.
72 changes: 53 additions & 19 deletions help/contributors-guide.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,29 @@
# Guide for Contributors

This page explains how to add an example to the CUAHSI Gallery. The sections
below provide a step-by-step guide.
This page explains how to contribute an example to the CUAHSI Gallery. The
sections below provide a step-by-step guide that should be followed in
numerical order.

## 1. Fork this repository
## 1. Fork this Repository

## 2. Create a directory for your example
The first step is to fork this repository under your own GitHub account. This
will enable you to make changes to the Gallery code, after which you can
request that they be included in the production CUAHSI gallery website.

To fork this repository, simply select the "Fork" button in the top right
corner of the repository interface.

![GitHub Fork](img/fork.png)

After forking, clone the codebase from your new repository. As you make
changes, commit and push these to your repository.

## 2. Create a Directory for your New Example

All gallery content follows a consistent directory structure;
`Root/Sub-Gallery/Category/Example`, where
`[root]/Sub-Gallery/Category/Example`, where

- `Root` is the root directory of the gallery, i.e. `source/gallery`
- `root` is the root directory of the gallery, i.e. `source/gallery`
- `Sub-Gallery` is a grouping categories around a programming language or
technology, e.g. `Python`, `R`, `ShinyR`.
- `Category` is a grouping of examples around a similar theme or topic, e.g.
Expand All @@ -20,8 +33,8 @@ All gallery content follows a consistent directory structure;
self-descriptive, and contain no spaces.

All content within the Gallery must must follow the pattern. The category and
sub-gallery that you choose is dependent on the example together define where
the example is displayed on the webpage. While, new sub-galleries and
sub-gallery that you choose is dependent on the example and together define
where the example is displayed in the gallery. While, new sub-galleries and
categories can be created, contributors are encouraged to use existing ones
wherever possible. For example, a instructional notebook that demonstrates
using the Python Pandas library for a data science application would be located
Expand All @@ -37,30 +50,51 @@ in:

### Directory Structure

After creating the directory which will hold your example, populated it with
the following files.
After choosing a location creating the directory to hold your example,
populated it with the following files.

1. `conf.yaml`: a yaml configuration file that is used to populate the metadata
for your example on the website. The contents of this file are described in
detail HERE.
detail in [configuration-options.md](./configuration-options.md).

2. A thumbnail image that will be displayed in the gallery, e.g.
`thumbnail.png`. Use a eye-catching and visually appeal (but relevant) image
that gives a preview of example results.
`thumbnail.png`. Use a eye-catching and visually appealing (but relevant)
image that gives a preview of example results.

3. A directory for code, data, and/or notebooks that will be rendered on the
page, e.g. `/notebooks`. Place any relevant content for your example in this
directory, it will be referenced in the configuration file.

There are many options for configuring your example, read through the
[configuration guide](configuration-options.md) for a full list options.

### Build the Gallery

Build the gallery on your local machine by following the instructions HERE.
Once everything is appearing as expected, proceed to the next step.
Build the gallery on your local machine by following the local development
instructions in the [README.md](../README.md). Once everything is appearing
the way you like, proceed to the next step.

### Merge your Example

Create a Pull Request to merge your code into the CUAHSI/Gallery repository.
Once your contributions have been reviewed they will be merged and be made
publicly available on the gallery website. Note, you may be asked to make
changes prior to your work being merged.
Since your code is located in a fork of the Gallery, you need to request that
it is included (i.e. merged) into the production web site. This is done via
Pull Requests.

Create a Pull Request to merge your code into the CUAHSI/Gallery repository by
first selecting the "Pull requests" menu item in GitHub

![PR Menu](img/pull-request.png)

then, open a "New pull request"

![New PR](img/new-pull-request.png)

When creating your pull request, make sure that "base" branch is `develop`.
Also make sure to include a summary of your changes to make the code review
process as seamless as possible.

Issuing a pull request will notify CUAHSI staff to review your code and
example. Once your contributions have been reviewed they will be merged into
production Gallery website and will be publicly available. Note, you may be
asked to make changes prior to your work being merged.

Binary file added help/img/fork.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added help/img/new-pull-request.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added help/img/pull-request.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5171b81

Please sign in to comment.