Skip to content

Commit

Permalink
rename stand property
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoKle committed Jun 28, 2024
1 parent 480919e commit 54d301a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/tasks/export_stands.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ def export_hp_csv(airports: dict, output_path: str):
for stand in stands:
lat = mean(stand.lat) if isinstance(stand.lat, list) else stand.lat
lon = mean(stand.lon) if isinstance(stand.lon, list) else stand.lon
writer.writerow([parse_stand_name(stand.stand), lat, lon])
writer.writerow([parse_stand_name(stand.name), lat, lon])
6 changes: 3 additions & 3 deletions src/tasks/read_grp_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def process_stand_files(self, root_dir):
def add_stand(self, stand: Stand):
if stand.icao in self.airports:
if not any(
existing_stand.stand == stand.stand
existing_stand.name == stand.name
for existing_stand in self.airports[stand.icao]
):
self.airports[stand.icao].append(stand)
Expand Down Expand Up @@ -69,7 +69,7 @@ def process_file(self, file_path):
self.add_stand(
Stand(
icao=icao,
stand=stand_name,
name=stand_name,
lat=latitudes,
lon=longitudes,
)
Expand All @@ -80,7 +80,7 @@ def process_file(self, file_path):
self.add_stand(
Stand(
icao=icao,
stand=stand_name,
name=stand_name,
lat=parse_latitude(lat_str),
lon=parse_longitude(lon_str),
)
Expand Down
2 changes: 1 addition & 1 deletion src/views/stand.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

class Stand(BaseModel):
icao: str
stand: str
name: str
lat: Union[float, List[float]]
lon: Union[float, List[float]]

0 comments on commit 54d301a

Please sign in to comment.