Skip to content

Commit c782c30

Browse files
authored
Add code owners for .workflow (#278)
* Copyedit doc/api/workflow.rst
1 parent 4fad5ac commit c782c30

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/CODEOWNERS

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
# Includes this file, GitHub Actions workflows, and more
77
/.github @khaeru @glatterf42
88

9+
/doc/api/workflow.rst @khaeru @glatterf42
10+
/message_ix_models/workflow.py @khaeru @glatterf42
11+
/message_ix_models/tests/test_workflow.py @khaeru @glatterf42
12+
913
/doc/api/tools-costs.rst @measrainsey
1014
/message_ix_models/data/costs @measrainsey
1115
/message_ix_models/data/intratec @measrainsey

doc/api/workflow.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The generic pattern for workflows is:
3535

3636
- Solve the target scenario.
3737
- Invoke reporting.
38-
4. The resulting function is passed to the next workflow step.
38+
4. The resulting scenario is passed to the next workflow step.
3939

4040
- A workflow can consist of any number of scenarios and steps.
4141
- The same precursor scenario can be used as the basis for multiple target scenarios.
@@ -56,7 +56,7 @@ These functions **must**:
5656

5757
1. A :class:`.Context` instance.
5858
2. The precursor scenario.
59-
3. Optionally additional, keyword-only arguments.
59+
3. (Optional) Additional, keyword-only arguments.
6060

6161
- Return either:
6262

@@ -75,14 +75,14 @@ and they **should**:
7575

7676
.. code-block:: python
7777
78-
def changes_a(s: Scenario) -> None:
78+
def changes_a(c: Context, s: Scenario) -> None:
7979
"""Change a scenario by modifying structure data, but not data."""
8080
with s.transact():
8181
s.add_set("technology", "test_tech")
8282
8383
# Here, invoke other code to further modify `s`
8484
85-
def changes_b(s: Scenario, value=100.0) -> None:
85+
def changes_b(c: Context, s: Scenario, *, value=100.0) -> None:
8686
"""Change a scenario by modifying parameter data, but not structure.
8787
8888
This function takes an extra argument, `values`, so functools.partial()

0 commit comments

Comments
 (0)