diff options
| author | Ariel Costas Guerrero <ariel@costas.dev> | 2025-11-07 11:04:43 +0100 |
|---|---|---|
| committer | Ariel Costas Guerrero <ariel@costas.dev> | 2025-11-07 11:04:43 +0100 |
| commit | 86ceab13fa9eab173522d67e5917c90840fb563f (patch) | |
| tree | 14486b3c8e0ac437b7bb5e5b1ad68e484b89a667 | |
| parent | 1186795ace3075e309f984182951f47212786444 (diff) | |
Remove outdated stop overrides and examples for Vigo transit data
| -rw-r--r-- | .github/workflows/update-stops-data.yml | 4 | ||||
| -rw-r--r-- | Taskfile.yml | 4 | ||||
| -rw-r--r-- | src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj | 6 | ||||
| -rw-r--r-- | src/frontend/public/stops/vigo.json | 2 | ||||
| -rw-r--r-- | src/stop_downloader/README.md (renamed from data/README.md) | 0 | ||||
| -rw-r--r-- | src/stop_downloader/santiago/download-stops.py (renamed from data/santiago/download-stops.py) | 14 | ||||
| -rw-r--r-- | src/stop_downloader/santiago/overrides/.gitkeep (renamed from data/santiago/overrides/.gitkeep) | 0 | ||||
| -rw-r--r-- | src/stop_downloader/vigo/download-stops.py (renamed from data/vigo/download-stops.py) | 2 | ||||
| -rw-r--r-- | src/stop_downloader/vigo/overrides/amenities.yaml (renamed from data/vigo/overrides/amenities.yaml) | 0 | ||||
| -rw-r--r-- | src/stop_downloader/vigo/overrides/example-new-stops.yaml (renamed from data/vigo/overrides/example-new-stops.yaml) | 0 | ||||
| -rw-r--r-- | src/stop_downloader/vigo/overrides/fix-gregorio-espino.yaml (renamed from data/vigo/overrides/fix-gregorio-espino.yaml) | 0 | ||||
| -rw-r--r-- | src/stop_downloader/vigo/overrides/hide-virtual-stops.yaml (renamed from data/vigo/overrides/hide-virtual-stops.yaml) | 0 | ||||
| -rw-r--r-- | src/stop_downloader/vigo/overrides/improve-coordinates-misc.yaml (renamed from data/vigo/overrides/improve-coordinates-misc.yaml) | 0 | ||||
| -rw-r--r-- | src/stop_downloader/vigo/overrides/navidad-2025.yaml (renamed from data/vigo/overrides/navidad-2025.yaml) | 0 |
14 files changed, 18 insertions, 14 deletions
diff --git a/.github/workflows/update-stops-data.yml b/.github/workflows/update-stops-data.yml index fcf15a3..8b63b3e 100644 --- a/.github/workflows/update-stops-data.yml +++ b/.github/workflows/update-stops-data.yml @@ -60,8 +60,8 @@ jobs: - name: Run download script run: | - uv run data/vigo/download-stops.py - uv run data/santiago/download-stops.py + uv run src/stop_downloader/vigo/download-stops.py + uv run src/stop_downloader/santiago/download-stops.py - name: Commit and push changes if any id: commit diff --git a/Taskfile.yml b/Taskfile.yml index a7080db..983b05a 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -41,5 +41,5 @@ tasks: gen-stop-json: desc: Generate stop-based JSON files for specified dates or date ranges. cmds: - - uv --directory ./data/vigo run ./download-stops.py - - uv --directory ./data/santiago run ./download-stops.py + - uv --directory ./src/stop_downloader/vigo run ./download-stops.py + - uv --directory ./src/stop_downloader/santiago run ./download-stops.py diff --git a/src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj b/src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj index 4f5747c..abc9ad5 100644 --- a/src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj +++ b/src/Costasdev.Busurbano.Backend/Costasdev.Busurbano.Backend.csproj @@ -5,6 +5,10 @@ <ImplicitUsings>enable</ImplicitUsings> <RootNamespace>Costasdev.Busurbano.Backend</RootNamespace> <UserSecretsId>0eff397c-f98e-4c3a-95ec-9d900f1b938c</UserSecretsId> + + <NeutralLanguage>es</NeutralLanguage> + <Deterministic>true</Deterministic> + <PathMap>$(MSBuildProjectDirectory)=.</PathMap> </PropertyGroup> <ItemGroup> @@ -19,4 +23,4 @@ <ItemGroup> <Folder Include="wwwroot\" /> </ItemGroup> -</Project>
\ No newline at end of file +</Project> diff --git a/src/frontend/public/stops/vigo.json b/src/frontend/public/stops/vigo.json index ae373e6..3a4bc99 100644 --- a/src/frontend/public/stops/vigo.json +++ b/src/frontend/public/stops/vigo.json @@ -15246,4 +15246,4 @@ "28" ] } -] +]
\ No newline at end of file diff --git a/data/README.md b/src/stop_downloader/README.md index 2cf8151..2cf8151 100644 --- a/data/README.md +++ b/src/stop_downloader/README.md diff --git a/data/santiago/download-stops.py b/src/stop_downloader/santiago/download-stops.py index 4900c41..14ffc32 100644 --- a/data/santiago/download-stops.py +++ b/src/stop_downloader/santiago/download-stops.py @@ -11,7 +11,7 @@ import urllib.request import yaml # Add YAML support for overrides OVERRIDES_DIR = "overrides" -OUTPUT_FILE = "../../src/frontend/public/stops/santiago.json" +OUTPUT_FILE = "../../frontend/public/stops/santiago.json" def load_stop_overrides(file_path): """Load stop overrides from a YAML file""" @@ -32,7 +32,7 @@ def apply_overrides(stops, overrides): """Apply overrides to the stop data and add new stops""" # Track existing stop IDs existing_stop_ids = {stop.get("stopId") for stop in stops} - + # Apply overrides to existing stops for stop in stops: stop_id = stop.get("stopId") @@ -78,7 +78,7 @@ def apply_overrides(stops, overrides): # Add alternate codes if "alternateCodes" in override: stop["alternateCodes"] = override["alternateCodes"] - + # Add new stops (those with "new: true" parameter) new_stops_added = 0 for stop_id, override in overrides.items(): @@ -86,7 +86,7 @@ def apply_overrides(stops, overrides): if override.get("new") and stop_id not in existing_stop_ids: # Ensure stop_id is an integer for consistency stop_id_int = int(stop_id) if isinstance(stop_id, str) else stop_id - + # Create the new stop new_stop = { "stopId": stop_id_int, @@ -97,7 +97,7 @@ def apply_overrides(stops, overrides): "longitude": override.get("location", {}).get("longitude"), "lines": override.get("lines", []) } - + # Add optional fields (excluding the 'new' parameter) if "alternateNames" in override: for key, value in override["alternateNames"].items(): @@ -112,10 +112,10 @@ def apply_overrides(stops, overrides): new_stop["message"] = override["message"] if "alternateCodes" in override: new_stop["alternateCodes"] = override["alternateCodes"] - + stops.append(new_stop) new_stops_added += 1 - + if new_stops_added > 0: print(f"Added {new_stops_added} new stops from overrides") diff --git a/data/santiago/overrides/.gitkeep b/src/stop_downloader/santiago/overrides/.gitkeep index e69de29..e69de29 100644 --- a/data/santiago/overrides/.gitkeep +++ b/src/stop_downloader/santiago/overrides/.gitkeep diff --git a/data/vigo/download-stops.py b/src/stop_downloader/vigo/download-stops.py index 3211f99..8771e53 100644 --- a/data/vigo/download-stops.py +++ b/src/stop_downloader/vigo/download-stops.py @@ -11,7 +11,7 @@ import urllib.request import yaml # Add YAML support for overrides OVERRIDES_DIR = "overrides" -OUTPUT_FILE = "../../src/frontend/public/stops/vigo.json" +OUTPUT_FILE = "../../frontend/public/stops/vigo.json" def load_stop_overrides(file_path): """Load stop overrides from a YAML file""" diff --git a/data/vigo/overrides/amenities.yaml b/src/stop_downloader/vigo/overrides/amenities.yaml index fa2067a..fa2067a 100644 --- a/data/vigo/overrides/amenities.yaml +++ b/src/stop_downloader/vigo/overrides/amenities.yaml diff --git a/data/vigo/overrides/example-new-stops.yaml b/src/stop_downloader/vigo/overrides/example-new-stops.yaml index 6937471..6937471 100644 --- a/data/vigo/overrides/example-new-stops.yaml +++ b/src/stop_downloader/vigo/overrides/example-new-stops.yaml diff --git a/data/vigo/overrides/fix-gregorio-espino.yaml b/src/stop_downloader/vigo/overrides/fix-gregorio-espino.yaml index 2e035a2..2e035a2 100644 --- a/data/vigo/overrides/fix-gregorio-espino.yaml +++ b/src/stop_downloader/vigo/overrides/fix-gregorio-espino.yaml diff --git a/data/vigo/overrides/hide-virtual-stops.yaml b/src/stop_downloader/vigo/overrides/hide-virtual-stops.yaml index a2bf0b1..a2bf0b1 100644 --- a/data/vigo/overrides/hide-virtual-stops.yaml +++ b/src/stop_downloader/vigo/overrides/hide-virtual-stops.yaml diff --git a/data/vigo/overrides/improve-coordinates-misc.yaml b/src/stop_downloader/vigo/overrides/improve-coordinates-misc.yaml index 922f103..922f103 100644 --- a/data/vigo/overrides/improve-coordinates-misc.yaml +++ b/src/stop_downloader/vigo/overrides/improve-coordinates-misc.yaml diff --git a/data/vigo/overrides/navidad-2025.yaml b/src/stop_downloader/vigo/overrides/navidad-2025.yaml index cb20222..cb20222 100644 --- a/data/vigo/overrides/navidad-2025.yaml +++ b/src/stop_downloader/vigo/overrides/navidad-2025.yaml |
