Skip to content

Commit dbd783e

Browse files
authored
Merge pull request #272 from iiasa/enh/codeowners
Add initial code owners
2 parents d55fbf9 + d36243a commit dbd783e

File tree

4 files changed

+79
-1
lines changed

4 files changed

+79
-1
lines changed

.github/CODEOWNERS

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Notes
2+
# - No owner is assigned for "*". This means that changes to
3+
# all other files can be approved by any user with write
4+
# access to the repo.
5+
6+
# Includes this file, GitHub Actions workflows, and more
7+
/.github @khaeru @glatterf42
8+
9+
/doc/api/tools-costs.rst @measrainsey
10+
/message_ix_models/data/costs @measrainsey
11+
/message_ix_models/data/intratec @measrainsey
12+
/message_ix_models/tests/tools/costs @measrainsey
13+
/message_ix_models/tools/costs @measrainsey
14+
15+
/doc/material @GamzeUnlu95 @macflo8
16+
/message_ix_models/data/material @GamzeUnlu95 @macflo8
17+
/message_ix_models/model/material @GamzeUnlu95 @macflo8
18+
/message_ix_models/tests/model/material @GamzeUnlu95 @macflo8
19+
20+
/doc/transport
21+
/message_ix_models/data/transport @khaeru @r-aneeque
22+
/message_ix_models/model/transport @khaeru @r-aneeque
23+
/message_ix_models/tests/model/transport @khaeru @r-aneeque
24+
25+
/doc/water @adrivinca @awais307
26+
/message_ix_models/data/water @adrivinca @awais307
27+
/message_ix_models/model/water @adrivinca @awais307
28+
/message_ix_models/tests/model/water @adrivinca @awais307
29+
30+
# /message_ix_models/project/advance
31+
# /message_ix_models/project/circeular
32+
# /message_ix_models/project/edits
33+
# /message_ix_models/project/engage
34+
# /message_ix_models/project/gea
35+
36+
/doc/project/navigate.rst @khaeru
37+
/message_ix_models/project/navigate @khaeru
38+
39+
# /message_ix_models/project/shape
40+
# /message_ix_models/project/ssp

doc/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# You can set these variables from the command line, and also
55
# from the environment for the first two.
6-
SPHINXOPTS ?=
6+
SPHINXOPTS ?= --jobs=auto
77
SPHINXBUILD ?= sphinx-build
88
SOURCEDIR = .
99
BUILDDIR = _build

doc/develop.rst

+37
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,43 @@ Code that will only work with certain structures…
4646
Code **may** also check a :class:`.Context` instance and automatically adapt data from certain structures to others, e.g. by interpolating data for certain periods or areas.
4747
To help with validation, code that does this **should** log on the :data:`logging.INFO` level to advertise these steps.
4848

49+
.. _code-owners:
50+
51+
Code owners
52+
===========
53+
54+
The file :file:`.github/CODEOWNERS` (`on GitHub <https://github.com/iiasa/message-ix-models/blob/main/.github/CODEOWNERS>`__) indicates ‘owners’ for some files in the repository.
55+
See `GitHub's documentation of this feature <https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners>`__.
56+
For :mod:`message_ix_models`, we use this to designate people who are capable and responsible to evaluate whether changes in a pull request would have any impact on current or planned research applications of that code, and to suggest whether and how to adjust PRs.
57+
58+
- As of 2025-01-10, we **do not require** pull request approvals from code owners on every PR that modifies files they own.
59+
Owners only are notified of such PRs.
60+
The author of a PR **should**:
61+
62+
- Observe the notified owners, if any.
63+
- In the "How to review" section of the PR template, address those people individually with what (if anything) they need to look at as part of the PR.
64+
This **may** entail saying, "@owner-a @owner-b: no need to review because <reasons>".
65+
66+
- Groups of entries **should** include paths to all of the following, where applicable:
67+
68+
- Documentation, for instance :file:`/doc/{name}` or :file:`/doc/project/{name}.rst`
69+
- Data, for instance :file:`/message_ix_models/data/{name}`
70+
- Code, for instance :file:`/message_ix_models/model/{name}` or :file:`/message_ix_models/project/{name}`
71+
- Tests, for instance :file:`/message_ix_models/tests/model/{name}` or :file:`/message_ix_models/tests/project/{name}`.
72+
73+
- At least 2 people (individually, or via a GitHub team) **should** be designated owners for any file.
74+
This may include one ‘active’ owner and a ‘backup’, or two or more active owners, etc.
75+
76+
- For any pull request thats add new files to :mod:`message_ix_models`, the author(s) and reviewer(s) **should**:
77+
78+
- Consider whether the new files have an identifiable owner.
79+
This may not be the case, for instance for general-purpose utility code.
80+
- Check whether this understanding aligns with the ownership expressed in :file:`CODEOWNERS`.
81+
- Add, remove, or adjust entries accordingly.
82+
- Describe these changes in commit message(s) or their PR description.
83+
84+
- If code owners depart IIASA or are reassigned to other work, they or the :mod:`message_ix_models` maintainers **must** initiate a discussion to identify a new set of owners for their files.
85+
4986
.. _policy-upstream-versions:
5087

5188
Upstream version policy

doc/whatsnew.rst

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Next release
88
- Support for Python 3.8 is dropped (:pull:`250`), as it has reached end-of-life.
99
- Expand :doc:`repro` with sections on :ref:`repro-doc` and :ref:`versioning`, including :ref:`a list of external model names and ‘versions’ <model-names>` like “MESSAGEix-GLOBIOM 2.0” (:issue:`224`, :pull:`226`).
1010
- New code list :ref:`emission-yaml` (:pull:`225`).
11+
- Designate :ref:`code-owners` for certain files (:pull:`272`) and document development practices.
1112

1213
By topic:
1314

0 commit comments

Comments
 (0)