@@ -128,9 +128,6 @@ def to_csv_entry(self) -> str:
128
128
}
129
129
return self ._original if self ._original is not None else mapping [self ._status ]
130
130
131
- def is_done (self ) -> bool :
132
- return self ._status == PaperStatus .DONE or self ._status == PaperStatus .NOTHING_TO_DO
133
-
134
131
class PaperInfo :
135
132
paper_number : str
136
133
"""
@@ -250,21 +247,25 @@ def merge(paper: PaperInfo, gh: PaperInfo) -> PaperInfo:
250
247
row with the newer status. Otherwise, report an error if they have a different status because
251
248
something must be wrong.
252
249
250
+ We don't update issues from 'To Do' to 'In Progress', since that only creates churn and the
251
+ status files aim to document user-facing functionality in releases, for which 'In Progress'
252
+ is not useful.
253
+
253
254
In case we don't update the CSV row's status, we still take any updated notes coming
254
255
from the Github issue.
255
256
"""
256
- if paper .status < gh .status :
257
- return gh
258
- elif paper .status != gh .status :
259
- print (f"We found a CSV row and a Github issue with different statuses:\n row: { paper } \n Github issue: { gh } " )
260
- return paper
257
+ if paper .status == PaperStatus (PaperStatus .TODO ) and gh .status == PaperStatus (PaperStatus .IN_PROGRESS ):
258
+ result = copy .deepcopy (paper )
259
+ result .notes = gh .notes
260
+ elif paper .status < gh .status :
261
+ result = copy .deepcopy (gh )
262
+ elif paper .status == gh .status :
263
+ result = copy .deepcopy (paper )
264
+ result .notes = gh .notes
261
265
else :
262
- # Retain the notes from the Github issue, if any
263
- if gh .notes is not None :
264
- cp = copy .deepcopy (paper )
265
- cp .notes = gh .notes
266
- return cp
267
- return paper
266
+ print (f"We found a CSV row and a Github issue with different statuses:\n row: { paper } \n Github issue: { gh } " )
267
+ result = copy .deepcopy (paper )
268
+ return result
268
269
269
270
def load_csv (file : pathlib .Path ) -> List [Tuple ]:
270
271
rows = []
0 commit comments