Skip to content

Commit

Permalink
clean up one-off scripts (#843)
Browse files Browse the repository at this point in the history
  • Loading branch information
panentheos authored Nov 4, 2024
1 parent b9c3754 commit a0d7cf1
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 203 deletions.
55 changes: 0 additions & 55 deletions scripts/one_offs/bus_config.exs

This file was deleted.

43 changes: 0 additions & 43 deletions scripts/one_offs/bus_routes.exs

This file was deleted.

28 changes: 0 additions & 28 deletions scripts/one_offs/platform_config.exs

This file was deleted.

27 changes: 0 additions & 27 deletions scripts/one_offs/scu_ids.exs

This file was deleted.

26 changes: 26 additions & 0 deletions scripts/one_offs/signs_analysis.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Mix.install([{:jason, "~> 1.4.0"}])

signs =
File.read!("priv/signs.json")
|> Jason.decode!(keys: :atoms)

case System.argv() do
# Configs that have atypical announcement settings
["announcements"] ->
for %{source_config: source_config} <- signs,
config <- List.wrap(source_config),
[announce_arriving?] = Enum.map(config.sources, & &1.announce_arriving) |> Enum.uniq(),
[announce_boarding?] = Enum.map(config.sources, & &1.announce_boarding) |> Enum.uniq(),
announce_arriving? == config.terminal or announce_boarding? != config.terminal do
config
end
|> IO.inspect(limit: :infinity)

# Signs with mismatched text/audio zones
["zones"] ->
for %{text_zone: text_zone, audio_zones: audio_zones} = sign <- signs,
[text_zone] != audio_zones do
[id: sign.id, text: [text_zone], audio: audio_zones]
end
|> IO.inspect(limit: :infinity)
end
32 changes: 0 additions & 32 deletions scripts/one_offs/terminal_config.exs

This file was deleted.

18 changes: 0 additions & 18 deletions scripts/one_offs/zone_mapping.exs

This file was deleted.

0 comments on commit a0d7cf1

Please sign in to comment.