alan-turing-institute / whatwhat

A reimagining of nowwhat in OCaml
MIT License
0 stars 0 forks source link

Write raw GitHub interface #1

Closed triangle-man closed 2 years ago

triangle-man commented 2 years ago

Download (see #5)

(There is a variety of metadata, which we will eventually want as well:

callummole commented 2 years ago

The yaml metadata looks a bit like this:

+++
turing-project-code: null
earliest-start-date: 2023-04-01
latest-start-date: 2023-07-01
latest-end-date: 2025-03-31
FTE-months: 48
nominal-FTE-percent: 200 (preferred 4 people at 50% - 2 seniors, if possible)
max-FTE-percent: null
min-FTE-percent: null
+++

Note the 200 (preferred 4 people at 50% - 2 seniors, if possible). Does this mean there will be comments added to the field info across other issues? Presumably we should care about this info?

@mhauru For the yaml top, suggested:

type issue =
  { number : int
  ; title : string
  ; body : (metadata * string)
  ; state : string
  ; assignees : person list
  ; reactions : (string * person) list
  }

type metadata =
{turing-project-code: string;
 earliest-start-date: Date.t;
latest-start-date: Date.t;
latest-end-date: Date.t;
FTE-months: float;
nominal-FTE-percent: float?; 
max-FTE-percent: float;
min-FTE-percent: float
}
mhauru commented 2 years ago

Sounds good. I wonder though if it would be easier later if metadata and body were separate fields, rather than getting them as first and second elements of a tuple.

The comments seem quite annoying to deal with. Maybe we should make it a rule that the metadata has to be valid JSON with the right types for each field? Comments like the above example could be either outside the metadata, or in a separate comments field of the metadata.