Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import datetime
from typing import List, Optional, Self

import arrow
import s2sphere
from implicitdict import ImplicitDict
from uas_standards.astm.f3548.v21.api import PutSubscriptionParameters
Expand Down
22 changes: 21 additions & 1 deletion monitoring/uss_qualifier/resources/astm/f3548/v21/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
from .dss import DSSInstanceResource, DSSInstancesResource
import warnings

__all__ = ["DSSInstanceResource", "DSSInstancesResource", "PlanningAreaResource"]


# TODO remove the exposure of PlanningAreaResource (and revert this __init__.py file to a normal state) when enough time has passed
def __getattr__(name):
if name == "PlanningAreaResource":
warnings.warn(
"PlanningAreaResource has moved from 'resources.astm.f3548.v21' to 'resources'. Importing it from its current location is deprecated and will be removed in the future.",
UserWarning,
stacklevel=2,
)
from monitoring.uss_qualifier.resources import PlanningAreaResource

return PlanningAreaResource
elif name in {"DSSInstanceResource", "DSSInstancesResource"}:
from .dss import DSSInstanceResource, DSSInstancesResource

return locals()[name]
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
4 changes: 1 addition & 3 deletions monitoring/uss_qualifier/resources/planning_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@

from monitoring.monitorlib.geo import Volume3D, make_latlng_rect
from monitoring.monitorlib.geotemporal import Volume4D
from monitoring.monitorlib.subscription_params import SubscriptionParams
from monitoring.monitorlib.temporal import Time
from monitoring.monitorlib.testing import make_fake_url
from monitoring.uss_qualifier.resources.astm.f3548.v21.subscription_params import (
SubscriptionParams,
)
from monitoring.uss_qualifier.resources.resource import Resource


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

from monitoring.monitorlib.fetch.rid import FetchedSubscription
from monitoring.monitorlib.mutate.scd import MutatedSubscription
from monitoring.monitorlib.subscription_params import SubscriptionParams
from monitoring.uss_qualifier.resources.astm.f3548.v21.dss import DSSInstance
from monitoring.uss_qualifier.resources.astm.f3548.v21.subscription_params import (
SubscriptionParams,
)
from monitoring.uss_qualifier.scenarios.scenario import TestScenarioType

# TODO: add functions implementing checks documented in this package
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@

from monitoring.monitorlib.fetch import QueryError
from monitoring.monitorlib.geotemporal import Volume4D
from monitoring.monitorlib.subscription_params import SubscriptionParams
from monitoring.prober.infrastructure import register_resource_type
from monitoring.uss_qualifier.resources import PlanningAreaResource
from monitoring.uss_qualifier.resources.astm.f3548.v21.dss import (
DSSInstance,
DSSInstanceResource,
)
from monitoring.uss_qualifier.resources.astm.f3548.v21.subscription_params import (
SubscriptionParams,
)
from monitoring.uss_qualifier.resources.communications import ClientIdentityResource
from monitoring.uss_qualifier.resources.interuss.id_generator import IDGeneratorResource
from monitoring.uss_qualifier.resources.planning_area import PlanningAreaSpecification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
from monitoring.monitorlib.fetch.scd import FetchedSubscription, FetchedSubscriptions
from monitoring.monitorlib.mutate.scd import MutatedSubscription
from monitoring.monitorlib.schema_validation import F3548_21
from monitoring.uss_qualifier.resources.astm.f3548.v21.subscription_params import (
SubscriptionParams,
)
from monitoring.monitorlib.subscription_params import SubscriptionParams
from monitoring.uss_qualifier.scenarios.astm.utm.dss.validators import (
fail_with_schema_errors,
)
Expand Down
Loading