Skip to content

Commit

Permalink
Drop upload-grid, return grid data as YAML
Browse files Browse the repository at this point in the history
The `upload-grid` tool has essentially become useless now that `suggest-grid`
handles everything. As such, the JSON data at the end of the grid page in HTML
was correct but useless. The HTML page now includes the data as YAML. The YAML
can directly be fed as a list of changes to the `suggest-grid` tool (with or
without adjustments) to re-create the schedule in a more predictable way than
through passing the seed (passing the seed only re-creates the same schedule if
data has not changed in the meantime).
  • Loading branch information
tidoust committed Apr 29, 2024
1 parent 071ef91 commit c170936
Show file tree
Hide file tree
Showing 8 changed files with 802 additions and 775 deletions.
6 changes: 3 additions & 3 deletions test/check-group-meetings.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ describe('The group meetings module', function () {

it('parses a YAML file that describes meeting changes', function () {
const changes = parseMeetingsChanges(`
1:
- number: 1
reset:
- day
- slot
Expand All @@ -361,10 +361,10 @@ describe('The group meetings module', function () {
meeting:
- Monday
- Tuesday
2:
- number: 2
reset: all
room: Room 1
3:
- number: 3
reset: day
`);
assert.deepStrictEqual(changes, [
Expand Down
214 changes: 97 additions & 117 deletions test/data/ref-breakouts-day-2024.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,125 +254,105 @@ <h3>2024-03-12</h3>
</section>
</section>

<section id="json">
<section id="yaml">
<h2>Data for Saving/Restoring Schedule</h2>
<pre id="data">
[
{
"number": 24,
"room": "Kora",
"day": "2024-03-12",
"slot": "22:00-23:00"
},
{
"number": 22,
"room": "Koto",
"day": "2024-03-12",
"slot": "14:00-15:00"
},
{
"number": 21,
"room": "Erhu",
"day": "2024-03-12",
"slot": "13:00-14:00"
},
{
"number": 20,
"room": "Koto",
"day": "2024-03-12",
"slot": "21:00-22:00"
},
{
"number": 19,
"room": "Lyre",
"day": "2024-03-12",
"slot": "21:00-22:00"
},
{
"number": 18,
"room": "Kora",
"day": "2024-03-12",
"slot": "13:00-14:00"
},
{
"number": 17,
"room": "Gamba",
"day": "2024-03-12",
"slot": "22:00-23:00"
},
{
"number": 16,
"room": "Gamba",
"day": "2024-03-12",
"slot": "14:00-15:00"
},
{
"number": 15,
"room": "Kora",
"day": "2024-03-12",
"slot": "14:00-15:00"
},
{
"number": 14,
"room": "Koto",
"day": "2024-03-12",
"slot": "22:00-23:00"
},
{
"number": 13,
"room": "Gamba",
"day": "2024-03-12",
"slot": "13:00-14:00"
},
{
"number": 12,
"room": "Ukulele",
"day": "2024-03-12",
"slot": "13:00-14:00"
},
{
"number": 11,
"room": "Lyre",
"day": "2024-03-12",
"slot": "13:00-14:00"
},
{
"number": 10,
"room": "Lyre",
"day": "2024-03-12",
"slot": "14:00-15:00"
},
{
"number": 9,
"room": "Ukulele",
"day": "2024-03-12",
"slot": "21:00-22:00"
},
{
"number": 7,
"room": "Ukulele",
"day": "2024-03-12",
"slot": "14:00-15:00"
},
{
"number": 6,
"room": "Erhu",
"day": "2024-03-12",
"slot": "21:00-22:00"
},
{
"number": 3,
"room": "Ukulele",
"day": "2024-03-12",
"slot": "22:00-23:00"
},
{
"number": 2,
"room": "Gamba",
"day": "2024-03-12",
"slot": "21:00-22:00"
}
]
- number: 24
reset: all
room: Kora
day: 2024-03-12
slot: 22:00-23:00
- number: 22
reset: all
room: Koto
day: 2024-03-12
slot: 14:00-15:00
- number: 21
reset: all
room: Erhu
day: 2024-03-12
slot: 13:00-14:00
- number: 20
reset: all
room: Koto
day: 2024-03-12
slot: 21:00-22:00
- number: 19
reset: all
room: Lyre
day: 2024-03-12
slot: 21:00-22:00
- number: 18
reset: all
room: Kora
day: 2024-03-12
slot: 13:00-14:00
- number: 17
reset: all
room: Gamba
day: 2024-03-12
slot: 22:00-23:00
- number: 16
reset: all
room: Gamba
day: 2024-03-12
slot: 14:00-15:00
- number: 15
reset: all
room: Kora
day: 2024-03-12
slot: 14:00-15:00
- number: 14
reset: all
room: Koto
day: 2024-03-12
slot: 22:00-23:00
- number: 13
reset: all
room: Gamba
day: 2024-03-12
slot: 13:00-14:00
- number: 12
reset: all
room: Ukulele
day: 2024-03-12
slot: 13:00-14:00
- number: 11
reset: all
room: Lyre
day: 2024-03-12
slot: 13:00-14:00
- number: 10
reset: all
room: Lyre
day: 2024-03-12
slot: 14:00-15:00
- number: 9
reset: all
room: Ukulele
day: 2024-03-12
slot: 21:00-22:00
- number: 7
reset: all
room: Ukulele
day: 2024-03-12
slot: 14:00-15:00
- number: 6
reset: all
room: Erhu
day: 2024-03-12
slot: 21:00-22:00
- number: 3
reset: all
room: Ukulele
day: 2024-03-12
slot: 22:00-23:00
- number: 2
reset: all
room: Gamba
day: 2024-03-12
slot: 21:00-22:00

</pre>
</section>
</body>
Expand Down
Loading

0 comments on commit c170936

Please sign in to comment.