Skip to content

Commit

Permalink
fix old choices with enum
Browse files Browse the repository at this point in the history
  • Loading branch information
scottstanie committed Dec 16, 2024
1 parent 11723cc commit df3192b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/sweets/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import zipfile
from concurrent.futures import ThreadPoolExecutor
from datetime import date, datetime
from enum import Enum
from functools import lru_cache
from pathlib import Path
from typing import Any, Optional
Expand All @@ -45,6 +46,11 @@
DIRNAME = os.path.dirname(os.path.abspath(__file__))


class FlightDirection(str, Enum):
ASCENDING = "ASCENDING"
DESCENDING = "DESCENDING"


class ASFQuery(YamlModel):
"""Class holding the Sentinel-1 ASF query parameters."""

Expand Down Expand Up @@ -83,11 +89,10 @@ class ASFQuery(YamlModel):
alias="relativeOrbit",
description="Path number",
)
flight_direction: Optional[str] = Field(
flight_direction: Optional[FlightDirection] = Field(
None,
alias="flightDirection",
choices=["ASCENDING", "DESCENDING"],
description="Ascending or descending",
description="Direction of satellite during acquisition.",
)
frames: Optional[tuple[int, int]] = Field(
None,
Expand Down

0 comments on commit df3192b

Please sign in to comment.