Skip to content

Commit

Permalink
Update to latest InterUSS automated_testing_interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminPelletier committed Oct 10, 2023
1 parent fd03c83 commit 4bf2a97
Show file tree
Hide file tree
Showing 9 changed files with 181 additions and 108 deletions.
164 changes: 90 additions & 74 deletions src/uas_standards/interuss/automated_testing/flight_planning/v1/api.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Data types and operations from Geo-Awareness Automated Test Interfaces 0.1.0 OpenAPI"""
"""Data types and operations from Geo-Awareness Automated Test Interfaces 0.2.0 OpenAPI"""

# This file is autogenerated; do not modify manually!

Expand All @@ -12,7 +12,7 @@
from implicitdict import ImplicitDict, StringBasedDateTime


API_VERSION = "0.1.0"
API_VERSION = "0.2.0"
"""Version of Geo-Awareness Automated Test Interfaces OpenAPI specification from which the objects in this package were generated."""

UUIDv4Format = str
Expand All @@ -36,9 +36,6 @@ class StatusResponse(ImplicitDict):
- `Ready`: the USS is ready to receive test requests.
"""

version: Optional[str]
"""Arbitrary string representing the version of the USS system to be tested."""


class GeozoneHttpsSourceFormat(str, Enum):
"""The format of the response expected from the source."""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Data types and operations from Geospatial Map Provider Automated Testing Interface 0.1.0 OpenAPI"""
"""Data types and operations from Geospatial Map Provider Automated Testing Interface 0.2.0 OpenAPI"""

# This file is autogenerated; do not modify manually!

Expand All @@ -12,7 +12,7 @@
from implicitdict import ImplicitDict, StringBasedDateTime


API_VERSION = "0.1.0"
API_VERSION = "0.2.0"
"""Version of Geospatial Map Provider Automated Testing Interface OpenAPI specification from which the objects in this package were generated."""

UUIDv4Format = str
Expand All @@ -36,14 +36,11 @@ class StatusResponse(ImplicitDict):
- `Ready`: the USS is ready to receive test requests.
"""

system_version: Optional[str]
"""Arbitrary string representing the version of the USS system to be tested."""

api_name: Optional[str]
"""Indication of the API implemented at this URL. Must be "Geospatial Map Provider Automated Testing Interface"."""

api_version: Optional[str]
"""Indication of the API version implemented at this URL. Must be "v0.1.0" when implementing this version of the API."""
"""Indication of the API version implemented at this URL. Must be "v0.2.0" when implementing this version of the API."""


class GeospatialHttpsSourceFormat(str, Enum):
Expand Down
36 changes: 19 additions & 17 deletions src/uas_standards/interuss/automated_testing/rid/v1/injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,23 @@ class UASID(ImplicitDict):
"""An altitude, in meters, above the WGS84 ellipsoid."""


class RIDHeightReference(str, Enum):
"""The reference datum above which the height is reported."""

TakeoffLocation = "TakeoffLocation"
GroundLevel = "GroundLevel"


class RIDHeight(ImplicitDict):
"""A relative altitude for the purposes of remote ID."""

distance: float
"""Distance above reference datum. This value is provided in meters and must have a minimum resolution of 1 meter."""

reference: RIDHeightReference
"""The reference datum above which the height is reported."""


OperatorId = str
"""CAA-issued registration/license ID for the remote pilot or operator. """

Expand Down Expand Up @@ -285,23 +302,6 @@ class RIDOperationalStatus(str, Enum):
"""Ground speed of flight in meters per second."""


class RIDHeightReference(str, Enum):
"""The reference datum above which the height is reported."""

TakeoffLocation = "TakeoffLocation"
GroundLevel = "GroundLevel"


class RIDHeight(ImplicitDict):
"""A relative altitude for the purposes of remote ID."""

distance: float
"""Distance above reference datum. This value is provided in meters and must have a minimum resolution of 1 meter."""

reference: RIDHeightReference
"""The reference datum above which the height is reported."""


class RIDAircraftPosition(ImplicitDict):
"""Position of an aircraft as reported for remote ID purposes."""

Expand All @@ -311,6 +311,8 @@ class RIDAircraftPosition(ImplicitDict):

alt: Altitude

height: Optional[RIDHeight]

accuracy_h: Optional[HorizontalAccuracy]
"""Horizontal error that is likely to be present in this reported position. Required when `extrapolated` field is true and always in the entry for the current state."""

Expand Down
7 changes: 2 additions & 5 deletions src/uas_standards/interuss/automated_testing/scd/v1/api.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Data types and operations from Strategic Coordination Test Data Injection 0.1.0 OpenAPI"""
"""Data types and operations from Strategic Coordination Test Data Injection 0.2.0 OpenAPI"""

# This file is autogenerated; do not modify manually!

Expand All @@ -12,7 +12,7 @@
from implicitdict import ImplicitDict, StringBasedDateTime


API_VERSION = "0.1.0"
API_VERSION = "0.2.0"
"""Version of Strategic Coordination Test Data Injection OpenAPI specification from which the objects in this package were generated."""

class StatusResponseStatus(str, Enum):
Expand All @@ -32,9 +32,6 @@ class StatusResponse(ImplicitDict):
- `Ready`: the USS is ready to receive test requests.
"""

version: Optional[str]
"""Arbitrary string representing the version of the USS system to be tested."""


UUIDv4Format = str
"""String whose format matches a version-4 UUID according to RFC 4122."""
Expand Down
51 changes: 51 additions & 0 deletions src/uas_standards/interuss/automated_testing/versioning/api.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
"""Data types and operations from Versioning Automated Testing Interface 0.1.0 OpenAPI"""

# This file is autogenerated; do not modify manually!

from __future__ import annotations

from enum import Enum
from typing import Dict, Optional

from uas_standards import Operation

from implicitdict import ImplicitDict


API_VERSION = "0.1.0"
"""Version of Versioning Automated Testing Interface OpenAPI specification from which the objects in this package were generated."""

SystemBoundaryIdentifier = str
"""Identifier of a system boundary, known to both the client and the USS separate from this API, for which a USS can provide a version. While the format is not prescribed by this API, any value must be URL-safe. It is recommended to use an approach similar to reverse-order Internet domain names and Java packages where the global scope is described with increasingly-precise identifiers joined by periods. For instance, the system boundary containing the mandatory Network Identification U-space service might be identified with `gov.eu.uspace.v1.netid` because the authority defining this system boundary is a governmental organization (specifically, the European Union) with requirements imposed on the system under test by the U-space regulation (first version) -- specifically, the Network Identification Service section."""


VersionIdentifier = str
"""Identifier of a particular version of a system (defined by a known system boundary). While the format is not prescribed by this API, a semantic version (https://semver.org/) prefixed with a `v` is recommended."""


class GetVersionResponse(ImplicitDict):
system_identity: Optional[SystemBoundaryIdentifier]
"""The requested system identity/boundary."""

system_version: Optional[VersionIdentifier]
"""The USS's version for the system with the specified system identity/boundary."""


class OperationID(str, Enum):
GetVersion = "GetVersion"


OPERATIONS: Dict[OperationID, Operation] = {
OperationID.GetVersion: Operation(
id="GetVersion",
path="/versions/{system_identity}",
verb="GET",
request_body_type=None,
response_body_type={
200: GetVersionResponse,
401: None,
403: None,
404: None,
}
),
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from enum import Enum


class Scope(str, Enum):
ReadSystemVersions = "interuss.versioning.read_system_versions"
8 changes: 8 additions & 0 deletions tools/openapi_conversion/generate_apis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,11 @@ docker container run -it \
openapi-python-converter \
--api /resources/interfaces/interuss/automated_testing/flight_planning/v1/flight_planning.yaml \
--python_output /resources/src/uas_standards/interuss/automated_testing/flight_planning/v1/api.py

echo "Versioning for automated testing"
mkdir -p $(pwd)/../../src/uas_standards/interuss/automated_testing/versioning
docker container run -it \
-v "$(pwd)/../..:/resources" \
openapi-python-converter \
--api /resources/interfaces/interuss/automated_testing/versioning/versioning.yaml \
--python_output /resources/src/uas_standards/interuss/automated_testing/versioning/api.py

0 comments on commit 4bf2a97

Please sign in to comment.