You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+15-28Lines changed: 15 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,11 +20,13 @@ For more information on contributing to open source projects,
20
20
is a great starting point. Also, checkout the [Zen of Scientific Software Maintenance](https://jrleeman.github.io/ScientificSoftwareMaintenance/)
21
21
for some guiding principles on how to create high quality scientific software contributions.
22
22
23
+
The canonical, detailed contributing guide for this repository is included in the source tree at `doc/source/contributing-guide.rst`; please consult that file as the single source of truth for developer workflows, testing, and container usage.
24
+
23
25
## Getting Started
24
26
25
27
Interested in helping extend CIME? Have code from your research that you believe others will
26
-
find useful? Have a few minutes to tackle an issue? In this guide we will get you setup and
27
-
integrated into contributing to CIME!
28
+
find useful? Have a few minutes to tackle an issue? This guide will get you set up to contribute
29
+
to CIME.
28
30
29
31
## What Can I Do?
30
32
* Tackle any unassigned [issues](https://github.com/ESMCI/CIME/issues) you wish!
@@ -44,7 +46,7 @@ The goal is to maintain a diverse community that's pleasant for everyone.
44
46
include multiple bug fixes in a single pull request, but they should be related.
45
47
For unrelated changes, please submit multiple pull requests.
46
48
* Do not commit changes to files that are irrelevant to your feature or bugfix
47
-
(eg: .gitignore).
49
+
(e.g., .gitignore).
48
50
* Be willing to accept constructive criticism as part of issuing a pull request,
49
51
since the CIME developers are dedicated to ensuring that new features extend the
50
52
system robustly and do not introduce new bugs.
@@ -53,7 +55,7 @@ The goal is to maintain a diverse community that's pleasant for everyone.
53
55
54
56
## Reporting a bug
55
57
When creating a new issue, please be as specific as possible. Include the version
56
-
of the code you were using, as well as what operating system you are running.
58
+
of the code you were using, as well as what operating system you are running. Include the commit SHA or tag (e.g., output of `git rev-parse HEAD`) and the branch name.
57
59
If possible, include complete, minimal example code that reproduces the problem.
58
60
59
61
## Pull Requests
@@ -62,34 +64,18 @@ We love pull requests from everyone. Fork, then clone the repo:
62
64
63
65
git clone git@github.com:your-username/CIME.git
64
66
65
-
Additionally you may need to checkout the submodules with:
67
+
You will need to initialize and update submodules:
66
68
67
69
cd CIME
68
-
git submodule update --init
69
-
70
-
You will need to install CIME dependencies and edit config files
71
-
to tell CIME about your development machine. See the [CIME users guide](https://esmci.github.io/cime/users_guide/porting-cime.html)
72
-
73
-
Run the scripts_regression_tests:
74
-
75
-
cd CIME/tests
76
-
python scripts_regression_tests.py
77
-
78
-
Alternatively with `pytest`:
79
-
80
-
pytest CIME/tests
81
-
82
-
Make your change. Add tests for your change. Make the tests pass to the same level as before your changes.
70
+
git submodule update --init --recursive
83
71
84
-
cd CIME/tests
85
-
python scripts_regression_tests.py
72
+
From here you can edit the code and run the unit tests following this [guide](https://esmci.github.io/cime/versions/master/html/contributing-guide.html#pytest).
86
73
87
-
Run [pre-commit](https://pre-commit.com/#usage) before committing changes and submitting a PR.
74
+
When running the ``unit`` tests you can specify any valid machine e.g. docker and the tests will run.
88
75
89
-
pip install pre-commit
90
-
pre-commit run -a
76
+
If you need to run the ``system`` tests you will need to have your respective model checked out and on a supported machine. Alternatively you can use CIME [container](https://esmci.github.io/cime/versions/master/html/contributing-guide.html#docker-container) which is used in our GitHub CI testing.
91
77
92
-
Commit the changes you made. Chris Beams has written a [guide](https://chris.beams.io/posts/git-commit/) on how to write good commit messages.
78
+
Before creating your PR you will need to run the code quality checkers; see this [guide](https://esmci.github.io/cime/versions/master/html/contributing-guide.html#code-quality).
93
79
94
80
Push to your fork and [submit a pull request][pr].
95
81
@@ -102,8 +88,9 @@ We may suggest some changes or improvements or alternatives.
102
88
Some things that will increase the chance that your pull request is accepted:
103
89
104
90
* Write tests.
105
-
* Follow [PEP8][pep8] for style. (The `flake8` utility can help with this.)
106
-
* Write a [good commit message][commit].
91
+
* Write documentation.
92
+
* Follow the [Code Quality guide](https://esmci.github.io/cime/versions/master/html/contributing-guide.html#code-quality)
93
+
* Write a good commit message, we recommend using [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/)
107
94
108
95
Pull requests will automatically have tests run by a Github Action. This
109
96
includes running both the unit tests as well as `pre-commit`, which checks
0 commit comments