Template repository for model codes
This is a template for repository for model codes. These should be kept separate from the codes used for specific experiments tied to papers, but rather for the model code itself along with relevant scripts for testing, examples, etc. This keeps each repository focused on a specific purpose, and helps organize code when models are used for multiple experiments.
Click Use this template
on the main repository page (shows up to the left of Code
). Name your repository, fill in a description, select whether you want the repository to be Public
or Private
, and leave Include all branches
unchecked.
The .gitignore
supplied with this template is configured for Julia. If you're using a different language, update the .gitignore
accordingly, and also modify as needed for your particular project.
By default, this template uses the MIT license. This is a good, general, permissive choice, but if you want to use a different license, delete the existing LICENSE.md
and add a new license file corresponding to the desired license.
- The repository is not a place to store large amounts of raw data. If the data is available using a DOI, provide a reference and link, and document how to download the data and place it in
data/
in the appropriate format for the model scripts to access. For small amounts of data, place directly indata/
. - Create complete documentation in the
README.md
, as well as in the scripts themselves, which will help debugging and code handoffs. Have others read your documentation and test to ensure that the instructions are clear and that they can install and execute the model. - Try to avoid hard-coding absolute paths into your code. Instead, make them relative to the repository root so they will work regardless of how someone clones the relevant repositories.
"Stable" versions of your model should be released, so they can be used for reproducible analyses. You should use a released version in any experiments.
To generate a DOI for the release, you can link your GitHub repository to Zenodo. Then it will automatically generate a DOI when you create a release.
A sample meta-repository README markdown template is provided in this repository in the file repo_readme_template.md
.
To use it, after creating a new repository using this template and cloning to your local machine:
- Change your directory to the local repository path.
- Run
git rm README.md
to delete this file (README.md
) and commit it usinggit commit -m 'remove default README'
. - Run
git mv repo_readme_template.md README.md
to renamerepo_readme_template.md
asREADME.md
. - Run
git add README.md
to stage the new file that will show up on load in your remote GitHub repository. - Run
git rm repo_readme_template.md
to remove the original template. - Run
git commit -m 'create new README'
to set the changes. - Run
git push
to send the changes to the remote GitHub repository. - Modify the
README.md
file appropriately to represent your model and use theadd
,commit
,push
workflow to update your remote repository.