Skip to content

Commit

Permalink
Contributor's guide (#549)
Browse files Browse the repository at this point in the history
* first pass at new contributor's guide

* fix links to contributor's guide

* fix whitespace

* Update contributing guidelines with more examples specific content

* formatting updates in contrib.rst

* Update contrib.rst

* Update contrib.rst
  • Loading branch information
kafitzgerald committed Oct 23, 2023
1 parent bbca684 commit badce0a
Show file tree
Hide file tree
Showing 5 changed files with 407 additions and 76 deletions.
74 changes: 1 addition & 73 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,73 +1 @@
Please first refer to [GeoCAT Contributor's Guide](https://geocat.ucar.edu/pages/contributing.html) for overall
contribution guidelines (such as detailed description of GeoCAT structure, forking, repository cloning,
branching, etc.). Once you determine that a function should be contributed under this repo, please refer to the
following contribution guidelines:


# Adding new plotting scripts to the Geocat-examples repo

1. Please check the followings to ensure that the example you are about to work on has not been ported yet:

- [GeoCAT-Examples Gallery](https://geocat-examples.readthedocs.io/en/latest/) or
the `Gallery` as well as `GeoCAT-comp-examples` directories of this repo,

- The list of [Issues](https://github.com/NCAR/GeoCAT-examples/issues) for this repo to see if any of
the existing to-do items are something you might be interested in working on.

- If so, please comment (or self-assign the issue if you have permissions to do so) indicating that
you intend to work on it.

- Otherwise, you may create and self-assign an issue that describes need for the plot you are planning
to contribute.

- For reference, NCL scripts can be seen as well: [NCL applications](http://ncl.ucar.edu/Applications/).

2. Determine if any critical computational functions are missing.

- If so, please submit a new issue (or comment on an existing issue) on this repository's GitHub page
containing the script name and explanation of the need for computational function(s).

3. Determine if any data files needed by your script are available in the
[GeoCAT-datafiles](https://github.com/NCAR/GeoCAT-datafiles) repo:

- If not,

- Submit a new issue (or comment on an existing issue) on this repository's GitHub page containing
the name of the missing datafile(s), or

- Check [GeoCAT-datafiles contributing documentation](https://github.com/NCAR/geocat-datafiles/blob/contribuotr_updates/CONTRIBUTING.md)
to see if you can contribute to the [GeoCAT-datafiles](https://github.com/NCAR/geocat-datafiles) by
uploading your own file.

4. Create a new Python script:

- [template_script.py](https://github.com/NCAR/GeoCAT-examples/blob/master/template_script.py)
(at the root of this repo) could be a great starting point for a new script, so you may want to
consider copying that to `NCL_new_script_1.py` instead of starting from scratch.

- If this script originates from an NCL example, use the original NCL script's basename,
but prepended with "NCL_". For example: `new_script_1.ncl` becomes `NCL_new_script_1.py`.

5. When you complete an example script, please try building the
[Sphinx](https://www.sphinx-doc.org/en/master/)-generated documentation (i.e. html files)
from this repo by running the following commands from within the `/docs` directory:

```bash
make html
```

- This is particularly important to see the final look of a plotting example on
[GeoCAT-Examples Gallery](https://geocat-examples.readthedocs.io) as varying IDEs or local development set up of
developers preferences would generate different plotting results from each other.

- Note: Please follow the [installation instructions](https://github.com/NCAR/geocat-examples/INSTALLATION.md)
beforehand to ensure an accurate conda environment is installed and activated for GeoCAT-examples, including
[Sphinx](https://www.sphinx-doc.org/en/master/).

- The generated HTML file can be viewed under `$GEOCAT_EXAMPLES/_build/html/gallery/` to ensure that
any output (text or graphical) matches what you expected. The complete list of the plotting examples can be
viewed by running the following command as well:

```bash
open _build/html/gallery/index.html
```
The contributor's guide for GeoCAT-examples can be found in our [online documentation](https://geocat-examples.readthedocs.io/en/latest/contrib.html).
2 changes: 1 addition & 1 deletion INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
GeoCAT-examples is a collection of standalone visualization examples, and it is not distributed as a conda package;
thus, there is no installation for it (via conda or other package management systems). Because of this, this section
refers to accessing the GeoCAT-examples scripts and how to build a conda environment to run them in. These instructions
can be followed better through the [installation webpage](https://geocat-examples.readthedocs.io/en/latest/install.html)
can be followed better through the [installation page](https://geocat-examples.readthedocs.io/en/latest/install.html)
on the GeoCAT-examples gallery website.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ in the function's doc string and/or requires visualization for improved demonstr

[GeoCAT Homepage](https://geocat.ucar.edu/)

[GeoCAT Contributor's Guide](https://geocat.ucar.edu/pages/contributing.html)
[GeoCAT Contributor's Guide](https://geocat-examples.readthedocs.io/en/latest/contrib.html)

[GeoCAT-Examples Gallery](https://geocat-examples.readthedocs.io)

Expand All @@ -43,7 +43,7 @@ in the function's doc string and/or requires visualization for improved demonstr

# Installation instructions

Please see our documentation for [installation instructions](INSTALLATION.md).
Please see our documentation for [installation instructions](https://geocat-examples.readthedocs.io/en/latest/install.html).

# Citing GeoCAT-examples

Expand Down

0 comments on commit badce0a

Please sign in to comment.