Skip to content

unifhy-org/unifhycontrib-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A template to create unifhy-compliant components

This repository features the package structure and contains the files one needs to create component(s) that can be used with the Community Model for the Terrestrial Water Cycle (unifhy) Python package.

How to use the template?

  1. Choose a model name for your component(s) (to replace <model_name> in the steps below), following PEP 8 naming convention i.e. all-lowercase names with underscores if this improves readability only.
  2. Create a new local directory using your model name and adding the prefix unifhycontrib- to it:
mkdir unifhycontrib-<model_name>
  1. Initialise a local git repository in it:
cd unifhycontrib-<model_name>
git init
  1. Download the template source available at https://github.com/unifhy-org/unifhycontrib-template (click 'Code' then click 'Download ZIP') and place the unzipped source in the newly created directory.
  2. Rename the existing Python package using your model name:
mv unifhycontrib/template unifhycontrib/<model_name>
  1. Add and commit those files to the repository:
git commit -am "commit template"
  1. Create a remote git repository on GitHub and name it unifhycontrib-<model_name>. Note, using GitHub is not mandatory, simply adjust the steps below accordingly if using another host.
  2. Set it as a remote repository for your local repository (replace <github_id> with your actual GitHub username):
git remote add origin https://github.com/<github_id>/unifhycontrib-<model_name>.git
  1. Push your commit to the remote repository:
git push -u origin main
  1. Develop your own component contribution(s) following the Guide for Contributors.
  2. List your package dependencies in requirements.txt.
  3. Overwrite the content in README.rst to describe your component(s).
  4. Update the first part of setup.py with your own details.