Skip to content

Commit

Permalink
Merge pull request #62 from kafitzgerald/update_contrib_and_inst
Browse files Browse the repository at this point in the history
Fix broken links and minor updates to contributing guide and installation instructions
  • Loading branch information
kafitzgerald authored Dec 8, 2023
2 parents ff32e18 + bbcc1fa commit f0414ab
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 42 deletions.
40 changes: 20 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
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 data file should be added to this repository,
please refer to the following contribution guidelines:
Please refer to the [GeoCAT website](https://geocat.ucar.edu/) for an overview of the GeoCAT project
and relevant resources.

Below are guidelines for adding new files to geocat-datafiles:

# Policies for adding new files

1. Knowing that Github allows a maximum size of 100 MB for a single file upload, small(ish) example
data sets - on the order of a few MBs - should be chosen for testing or examples.
1. Knowing that Github allows a maximum size of 100 MB for a single file upload, small(ish) example
data sets - on the order of a few MBs - should be chosen for testing or examples.

- Contributors should endeavor to use existing data sets before considering contributing new ones.
- However, if an existing data set simply won’t do the job, new ones may certainly be added.
- Contributors should ensure that contributed files are stripped of irrelevant variables that unnecessarily
take up space.
- Contributors should endeavor to use existing data sets before considering contributing new ones. However,
if an existing data set simply won’t do the job, new ones may be added.
- Contributors should ensure that contributed files are stripped of irrelevant variables that unnecessarily
take up space.

2. Contributors of data sets are responsible for ensuring that they have appropriate permissions for
redistribution of any contributed data sets.
3. Contributors of data sets are responsible for ensuring that they have appropriate permissions for
redistribution of any contributed data sets.


# Adding new data files to the Geocat-datafiles repo
# Adding new data files to the GeoCAT-datafiles repository

1. Add files to appropriate subdirectory based on file format, e.g. “`netcdf_files`”, etc
1. Add files to appropriate subdirectory based on file format, e.g. “`netcdf_files`”, etc.

2. Generate new “registry.txt” by running the command:
2. Generate a new “registry.txt” by running the command:

`python create_registry.py`

- This command requires [PyPi's Pooch framework](https://pypi.org/project/pooch/) to be installed.

- Please follow the [installation instructions](https://github.com/NCAR/geocat-datafiles/INSTALLATION.md)
to ensure an accurate conda environment is installed and activated for GeoCAT-datafiles, including
[PyPi's Pooch framework](https://pypi.org/project/pooch/).
- This command requires [Pooch](https://pypi.org/project/pooch/) to be installed. Please follow the
[installation instructions](https://github.com/NCAR/geocat-datafiles/INSTALLATION.md) to ensure your active
conda environment includes the required packages.

3. Open a pull request with these changes on [NCAR/geocat-datafiles](https://github.com/NCAR/geocat-datafiles). Once
the pull request is merged, the files should be available. No package release is required.

**Note**: Python package in `$GEOCATDATAFILES/src` directory, very minimal maintenance required, does not need to be
updated when a new file is added.
Expand Down
39 changes: 17 additions & 22 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
# Installation

This installation guide includes only the GeoCAT-datafiles installation instructions.
Please refer to [GeoCAT Contributor's Guide](https://geocat.ucar.edu/pages/contributing.html) for installation of
the whole GeoCAT project.
This installation guide includes instructions only for GeoCAT-datafiles.
Please refer to the [GeoCAT website](https://geocat.ucar.edu/pages/software.html) for links to resources for other GeoCAT projects.


## Installing GeoCAT-datafiles via Conda in a New Environment
## Installing GeoCAT-datafiles via Conda in a new environment

The easiest way to install GeoCAT-datafiles is using [Conda](http://conda.pydata.org/docs/):

conda create -n geocat -c conda-forge -c ncar geocat-datafiles
conda create -n geocat -c conda-forge geocat-datafiles

where "geocat" is the name of a new conda environment, which can then be
activated using:

conda activate geocat

If you somewhat need to make use of other software packages, such as Matplotlib, Cartopy, Jupyter, etc. with
GeoCAT-datafiles, you may wish to install into your `geocat` environment. The following `conda create` command can be
used to create a new conda environment that includes some of these additional commonly used Python packages pre-installed:
If you would like to make use of other software packages, such as Matplotlib, Cartopy, Jupyter, etc. with
GeoCAT-datafiles, you may wish to install these under your `geocat` environment as well. The following
command can be run to create a new conda environment that includes some of these additional Python packages:

conda create -n geocat -c conda-forge -c ncar geocat-datafiles matplotlib cartopy jupyter
conda create -n geocat -c conda-forge geocat-datafiles matplotlib cartopy jupyter

Alternatively, if you already created a conda environment using the first command (without the extra packages),
you can activate and install the packages in an existing environment with the following commands:
Alternatively, if you already created a conda environment using the first command (i.e. without
the extra packages), you can activate and install the packages in an existing environment with the following
commands:

```
conda activate geocat # or whatever your environment is called
Expand All @@ -34,17 +34,16 @@ Please note that the use of the **conda-forge** channel is essential to guarante
compatibility between dependency packages.

Also, note that the Conda package manager automatically installs all `required`
dependencies, meaning it is not necessary to explicitly install Python, [Pooch](https://pypi.org/project/pooch/),
etc. when creating an environment.
dependencies, meaning it is not necessary to explicitly install Python, [Pooch](https://pypi.org/project/pooch/), etc. when creating an environment.

If you are interested in learning more about how Conda environments work, please visit
the [managing environments](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html)
page of the Conda documentation.

## Installing GeoCAT-datafiles in a Pre-existing Conda Environment
## Installing GeoCAT-datafiles in a pre-existing Conda environment

If you started a project and later decided to use GeoCAT-datafiles, you will need to install it in your pre-existing
environment.
If you started a project and later decided to use GeoCAT-datafiles, you will need to install it in your
pre-existing environment.

1. Make sure your conda is up to date by running this command from the terminal:

Expand All @@ -56,7 +55,7 @@ environment.

3. Install geocat-datafiles:

`conda install -c ncar -c conda-forge geocat-datafiles`
`conda install -c conda-forge geocat-datafiles`

## Updating GeoCAT-datafiles via Conda

Expand All @@ -80,14 +79,10 @@ It is important to keep your version of `geocat-datafiles` up to date. This can
GeoCAT-datafiles is distributed also in PyPI; therefore, the above Conda installation instructions should, in theory,
apply to PyPI installation through using `pip install` commands instead of `conda install` wherever they occur.

## Installing GeoCAT-datafiles via PyPi
GeoCAT-datafiles is distributed also in PyPI; therefore, the above Conda installation instructions should, in theory,
apply to PyPI installation through using `pip install` commands instead of `conda install` wherever they occur.

## Building GeoCAT-datafiles from source

Building GeoCAT-datafiles from source code is a fairly straightforward task, but
doing so should not be necessary for most users. If you `are` interested in
doing so should not be necessary for most users. If you are interested in
building GeoCAT-datafiles from source, you will need the following packages to be
installed.

Expand Down

0 comments on commit f0414ab

Please sign in to comment.