Skip to content

Latest commit

 

History

History
113 lines (79 loc) · 4.9 KB

CONTRIBUTING.md

File metadata and controls

113 lines (79 loc) · 4.9 KB

Contributing

Introduction

First off, thank you for considering contributing to CIME. CIME is a community-driven project, so it's people like you that make CIME useful and successful.

Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue, assessing changes, and helping you finalize your pull requests.

We love contributions from community members, just like you! There are many ways to contribute, from writing tutorials or examples, improvements to the documentation, submitting bug report and feature requests, or even writing code which can be incorporated into CIME for everyone to use. If you get stuck at any point you can create an issue on GitHub.

For more information on contributing to open source projects, GitHub's own guide is a great starting point. Also, checkout the Zen of Scientific Software Maintenance for some guiding principles on how to create high quality scientific software contributions.

Getting Started

Interested in helping extend CIME? Have code from your research that you believe others will find useful? Have a few minutes to tackle an issue? In this guide we will get you setup and integrated into contributing to CIME!

What Can I Do?

  • Tackle any unassigned issues you wish!

  • Contribute code you already have. It doesn’t need to be perfect! We will help you clean things up, test it, etc.

  • Make a tutorial or example of how to do something.

How Can I Talk to You?

Discussion of CIME development often happens in the issue tracker and in pull requests.

Ground Rules

The goal is to maintain a diverse community that's pleasant for everyone.

  • Each pull request should consist of a logical collection of changes. You can include multiple bug fixes in a single pull request, but they should be related. For unrelated changes, please submit multiple pull requests.
  • Do not commit changes to files that are irrelevant to your feature or bugfix (eg: .gitignore).
  • Be willing to accept constructive criticism as part of issuing a pull request, since the CIME developers are dedicated to ensuring that new features extend the system robustly and do not introduce new bugs.
  • Be aware that the pull request review process is not immediate, and is generally proportional to the size of the pull request.

Reporting a bug

When creating a new issue, please be as specific as possible. Include the version of the code you were using, as well as what operating system you are running. If possible, include complete, minimal example code that reproduces the problem.

Pull Requests

Working on your first Pull Request? You can learn how from this free video series How to Contribute to an Open Source Project on GitHub or the guide “How to Contribute to Open Source". We love pull requests from everyone. Fork, then clone the repo:

git clone [email protected]:your-username/CIME.git

Additionally you may need to checkout the submodules with:

cd CIME
git submodule update --init

You will need to install CIME dependencies and edit config files to tell CIME about your development machine. See the CIME users guide

Run the scripts_regression_tests:

cd CIME/tests
python scripts_regression_tests.py

Alternatively with pytest:

pytest CIME/tests

Make your change. Add tests for your change. Make the tests pass to the same level as before your changes.

cd CIME/tests
python scripts_regression_tests.py

Run pre-commit before committing changes and submitting a PR.

pip install pre-commit
pre-commit run -a

Commit the changes you made. Chris Beams has written a guide on how to write good commit messages.

Push to your fork and submit a pull request.

Code Review

Once you have submitted a pull request, expect to hear at least a comment within a couple of days. We may suggest some changes or improvements or alternatives.

Some things that will increase the chance that your pull request is accepted:

Pull requests will automatically have tests run by a Github Action. This includes running both the unit tests as well as pre-commit, which checks linting.