From 1b5e2c2423014b87f454fd45ae4d724e74900ea1 Mon Sep 17 00:00:00 2001 From: Benjamin Pelletier Date: Thu, 7 Dec 2023 08:04:31 -0800 Subject: [PATCH 1/4] [uss_qualifier] Change reusable test steps to reusable test step fragments (#386) Change reusable test steps to reusable test step fragments --- monitoring/uss_qualifier/scenarios/README.md | 24 ++++++++++++++-- .../v19/dss/test_steps/clean_workspace.md | 2 +- .../netrid/v19/dss/test_steps/delete_isa.md | 2 +- .../astm/netrid/v19/dss/test_steps/put_isa.md | 2 +- .../netrid/v19/dss/test_steps/search_isas.md | 2 +- .../v22a/dss/test_steps/clean_workspace.md | 2 +- .../netrid/v22a/dss/test_steps/delete_isa.md | 2 +- .../netrid/v22a/dss/test_steps/put_isa.md | 2 +- .../netrid/v22a/dss/test_steps/search_isas.md | 2 +- .../plan_flight_intent_expect_failed.md | 2 +- .../validate_get_operational_intent.md | 2 +- ...date_no_notification_operational_intent.md | 2 +- ...alidate_notification_operational_intent.md | 2 +- ...l_intent_but_with_invalid_interuss_data.md | 2 +- .../conflict_equal_priority_not_permitted.md | 4 ++- .../scenarios/astm/utm/set_uss_available.md | 2 +- .../scenarios/astm/utm/set_uss_down.md | 2 +- .../validate_not_shared_operational_intent.md | 2 +- .../utm/validate_shared_operational_intent.md | 2 +- .../scenarios/documentation/parsing.py | 28 +++++++++++++------ .../activate_conflict_flight_intent.md | 2 +- .../flight_planning/activate_flight_intent.md | 2 +- ...tivate_permitted_conflict_flight_intent.md | 2 +- ...ctivate_priority_conflict_flight_intent.md | 2 +- .../flight_planning/delete_flight_intent.md | 2 +- ...modify_activated_conflict_flight_intent.md | 2 +- .../modify_activated_flight_intent.md | 2 +- ...ivated_permitted_conflict_flight_intent.md | 2 +- ...tivated_priority_conflict_flight_intent.md | 2 +- .../modify_planned_conflict_flight_intent.md | 2 +- .../modify_planned_flight_intent.md | 2 +- ...lanned_permitted_conflict_flight_intent.md | 2 +- ...planned_priority_conflict_flight_intent.md | 2 +- .../plan_conflict_flight_intent.md | 2 +- .../flight_planning/plan_flight_intent.md | 2 +- .../plan_permitted_conflict_flight_intent.md | 2 +- .../plan_priority_conflict_flight_intent.md | 2 +- 37 files changed, 78 insertions(+), 46 deletions(-) diff --git a/monitoring/uss_qualifier/scenarios/README.md b/monitoring/uss_qualifier/scenarios/README.md index fa2d37a7a6..d5aa057f23 100644 --- a/monitoring/uss_qualifier/scenarios/README.md +++ b/monitoring/uss_qualifier/scenarios/README.md @@ -10,7 +10,7 @@ A test scenario is separated into of a list of test cases, each of which are sep ### Test cases -1. A test case is a single wholistic operation or action performed as part of a larger test scenario. +1. A test case is a single holistic operation or action performed as part of a larger test scenario. * Test cases are like acts in the "play" of the test scenario they are a part of. * Test cases are typically the "gray headers” of the overview sequence diagrams. 2. A given test case belongs to exactly one test scenario. @@ -22,7 +22,7 @@ A test scenario is separated into of a list of test cases, each of which are sep 1. A test step is a single task that must be performed in order to accomplish its associated test case. * Test steps are like scenes in the "play/act" of the test scenario/test case they are a part of. 2. A given test step belongs to exactly one test case. -3. A test step may have a list of checks associated with it. +3. A test step should generally have a list of checks associated with it. ### Checks @@ -30,6 +30,8 @@ A test scenario is separated into of a list of test cases, each of which are sep 2. A check evaluates information collected during the actions performed for a test step. 3. A given check belongs to exactly one test step. 4. Each check defines which requirement(s) are not met if the check fails. +5. In nearly all cases, the test participant(s) to which a check pertains should be specified when performing the check. + * If the test participant is not specified, then either everyone involved in a test or no one is responsible for meeting the requirements of that check, and this is very rarely appropriate. ## Creation @@ -79,7 +81,23 @@ A scenario must document at least one test case (otherwise the scenario is doing Each test case in the documentation must document at least one test step (otherwise nothing is happening in the test case). Each test step must be documented via a subsection of the parent test case named with a " test step" suffix (example: `### Injection test step`). -If the entire test step heading is enclosed in a link, the contents of that linked file will be used to populate the test step (example: `### [Plan flight test step](plan_flight_step.md)`) and any content in this section will be ignored. The linked file must follow the format requirements for a test step, starting with the first line being a top-level heading ending with " test step" (example: `# Plan flight test step`). +If the entire test step heading is enclosed in a link, the contents of that linked file will be used to pre-populate the test step (example: `### [Plan flight test step](plan_flight_fragment.md)`) before reading the content in this section. The linked file must follow the format requirements for a test step, but with the first line being a top-level heading ending with " test step fragment" (example: `# Plan flight test step fragment`). + +Multiple test step fragments may be included in a test step by linking to the test step fragment in a heading one level lower than the test step itself, and these lower-level headings may be combined with [checks](#test-checks) specific to the test step; for instance: + +```markdown +### Plan flight test step + +This step does (a particular thing). + +#### [Actually plan flight](plan_flight_fragment.md) + +#### Special check + +If the system under test doesn't Foo, then requirement **Bar** will not be met. + +#### [Ensure flight baz](check_flight_baz_fragment.md) +``` ### Test checks diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/clean_workspace.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/clean_workspace.md index 028387aa26..6f4f92fa82 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/clean_workspace.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/clean_workspace.md @@ -1,4 +1,4 @@ -# Ensure clean workspace test step +# Ensure clean workspace test step fragment This page describes the content of a common test step that ensures a clean workspace for testing interactions with a DSS diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/delete_isa.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/delete_isa.md index f4980de7ec..13923cae16 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/delete_isa.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/delete_isa.md @@ -1,4 +1,4 @@ -# Delete ISA test step +# Delete ISA test step fragment This page describes the content of a common test step where a deletion of an ISA should be successful. See `DSSWrapper.del_isa` in [`dss_wrapper.py`](../../../dss_wrapper.py). diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/put_isa.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/put_isa.md index 57bd29e228..17be55b1b3 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/put_isa.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/put_isa.md @@ -1,4 +1,4 @@ -# Create or update ISA test step +# Create or update ISA test step fragment This page describes the content of a common test step where a creation or an update of an ISA should be successful. See `DSSWrapper.put_isa` in [`dss_wrapper.py`](../../../dss_wrapper.py). diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/search_isas.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/search_isas.md index 9da9490fb5..e90b202c83 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/search_isas.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/search_isas.md @@ -1,4 +1,4 @@ -# Search ISAs test step +# Search ISAs test step fragment This page describes the content of a common test step where a search for ISAs should be successful. See `DSSWrapper.search_isa` in [`dss_wrapper.py`](../../../dss_wrapper.py). diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/clean_workspace.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/clean_workspace.md index c91d505559..586a2ed6a4 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/clean_workspace.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/clean_workspace.md @@ -1,4 +1,4 @@ -# Ensure clean workspace test step +# Ensure clean workspace test step fragment This page describes the content of a common test step that ensures a clean workspace for testing interactions with a DSS diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/delete_isa.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/delete_isa.md index fa77a2f9ed..e9f3bc5d27 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/delete_isa.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/delete_isa.md @@ -1,4 +1,4 @@ -# Delete ISA test step +# Delete ISA test step fragment This page describes the content of a common test step where a deletion of an ISA should be successful. See `DSSWrapper.del_isa` in [`dss_wrapper.py`](../../../dss_wrapper.py). diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/put_isa.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/put_isa.md index aabd1b6a9c..2605094186 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/put_isa.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/put_isa.md @@ -1,4 +1,4 @@ -# Create or update ISA test step +# Create or update ISA test step fragment This page describes the content of a common test step where a creation or an update of an ISA should be successful. See `DSSWrapper.put_isa` in [`dss_wrapper.py`](../../../dss_wrapper.py). diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/search_isas.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/search_isas.md index 7b6c073692..af51c360b8 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/search_isas.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/search_isas.md @@ -1,4 +1,4 @@ -# Search ISAs test step +# Search ISAs test step fragment This page describes the content of a common test step where a search for ISAs should be successful. See `DSSWrapper.search_isa` in [`dss_wrapper.py`](../../../dss_wrapper.py). diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/plan_flight_intent_expect_failed.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/plan_flight_intent_expect_failed.md index 34e572c527..7afaa7b24a 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/plan_flight_intent_expect_failed.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/plan_flight_intent_expect_failed.md @@ -1,4 +1,4 @@ -# Plan flight Expect Failed test step +# Plan flight Expect Failed test step fragment This page describes the content of a common test case where a valid user flight intent fails in a flight planner, because of invalid data shared for a nearby flight shared by another USS. See `plan_flight_intent_expect_failed` in invalid_op_test_steps.py. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_get_operational_intent.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_get_operational_intent.md index e65527b0b0..ae8ac1bcd1 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_get_operational_intent.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_get_operational_intent.md @@ -1,4 +1,4 @@ -# Validate GET interaction test step +# Validate GET interaction test step fragment This step verifies that a USS makes a GET request to get the intent_details of an existing operation when needed as per ASTM F3548-21 by checking the interuss interactions of mock uss diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_no_notification_operational_intent.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_no_notification_operational_intent.md index e084bba35d..b953bf983e 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_no_notification_operational_intent.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_no_notification_operational_intent.md @@ -1,4 +1,4 @@ -# Validate no notification test step +# Validate no notification test step fragment This step verifies when a flight is not created, it is also not notified by checking the interuss interactions of mock_uss instance. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_notification_operational_intent.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_notification_operational_intent.md index 5fa28e5031..f2e8515b5f 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_notification_operational_intent.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_notification_operational_intent.md @@ -1,4 +1,4 @@ -# Validate notification test step +# Validate notification test step fragment This step verifies that, when creating or modifying an operational intent, a USS sent the required notification for a relevant subscription owned by a mock_uss instance by checking the interactions of that mock_uss instance. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_sharing_operational_intent_but_with_invalid_interuss_data.md b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_sharing_operational_intent_but_with_invalid_interuss_data.md index 38473df15c..ec660b0741 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_sharing_operational_intent_but_with_invalid_interuss_data.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/data_exchange_validation/test_steps/validate_sharing_operational_intent_but_with_invalid_interuss_data.md @@ -1,4 +1,4 @@ -# Validate flight sharing invalid data test step +# Validate flight sharing invalid data test step fragment This step verifies that a created flight is shared properly per ASTM F3548-21 by querying the DSS for flights in the area of the flight intent, and then retrieving the details from the USS if the operational intent reference is found. See `expect_shared_with_invalid_data` in invalid_op_test_steps.py. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md index f1da8f7a5f..dac90796bf 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md @@ -95,7 +95,9 @@ DSSInstanceResource that provides access to a DSS instance where flight creation ## Attempt to plan flight into conflict test case ![Test case summary illustration](assets/attempt_to_plan_flight_into_conflict.svg) -### [Plan flight 2 test step](../../../../flight_planning/plan_flight_intent.md) +### Plan flight 2 test step + +#### [Plan flight 2](../../../../flight_planning/plan_flight_intent.md) Flight 2 on time range B should be successfully planned by the control USS. ### [Validate flight 2 sharing test step](../../validate_shared_operational_intent.md) diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/set_uss_available.md b/monitoring/uss_qualifier/scenarios/astm/utm/set_uss_available.md index 67870dc7f5..585b1c1634 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/set_uss_available.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/set_uss_available.md @@ -1,4 +1,4 @@ -# Set USS availability to 'Available' test step +# Set USS availability to 'Available' test step fragment This step sets the USS availability to 'Available' at the DSS. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/set_uss_down.md b/monitoring/uss_qualifier/scenarios/astm/utm/set_uss_down.md index e470279f81..3d965a234e 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/set_uss_down.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/set_uss_down.md @@ -1,4 +1,4 @@ -# Set USS availability to 'Down' test step +# Set USS availability to 'Down' test step fragment This step sets the USS availability to 'Down' at the DSS. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/validate_not_shared_operational_intent.md b/monitoring/uss_qualifier/scenarios/astm/utm/validate_not_shared_operational_intent.md index fd2e09cdbe..af939a904c 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/validate_not_shared_operational_intent.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/validate_not_shared_operational_intent.md @@ -1,4 +1,4 @@ -# Validate operational intent not shared test step +# Validate operational intent not shared test step fragment This step verifies that a previous attempt to create a flight did not result in a flight being shared with the DSS. It does so by querying the DSS for operational intents in the area of the flight before and after an attempted creation. diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/validate_shared_operational_intent.md b/monitoring/uss_qualifier/scenarios/astm/utm/validate_shared_operational_intent.md index 8919491cdc..f7e77daf67 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/validate_shared_operational_intent.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/validate_shared_operational_intent.md @@ -1,4 +1,4 @@ -# Validate flight sharing test step +# Validate flight sharing test step fragment This step verifies that a created flight is shared properly per ASTM F3548-21 by querying the DSS for flights in the area of the flight intent, and then retrieving the details from the USS if the operational intent reference is found. See `OpIntentValidator.expect_shared()` in [test_steps.py](test_steps.py). diff --git a/monitoring/uss_qualifier/scenarios/documentation/parsing.py b/monitoring/uss_qualifier/scenarios/documentation/parsing.py index c8f03792ac..d04f902f91 100644 --- a/monitoring/uss_qualifier/scenarios/documentation/parsing.py +++ b/monitoring/uss_qualifier/scenarios/documentation/parsing.py @@ -25,6 +25,7 @@ TEST_SCENARIO_SUFFIX = " test scenario" TEST_CASE_SUFFIX = " test case" TEST_STEP_SUFFIX = " test step" +TEST_STEP_FRAGMENT_SUFFIX = " test step fragment" TEST_CHECK_SUFFIX = " check" @@ -75,7 +76,7 @@ def _parse_test_check( ) -def _get_linked_test_step( +def _get_linked_test_step_fragment( doc_filename: str, origin_filename: str ) -> TestStepDocumentation: absolute_path = os.path.abspath( @@ -84,7 +85,7 @@ def _get_linked_test_step( if absolute_path not in _test_step_cache: if not os.path.exists(absolute_path): raise ValueError( - f'Test step document "{doc_filename}" linked from "{origin_filename}" does not exist at "{absolute_path}"' + f'Test step fragment document "{doc_filename}" linked from "{origin_filename}" does not exist at "{absolute_path}"' ) with open(absolute_path, "r") as f: doc = marko.parse(f.read()) @@ -92,10 +93,10 @@ def _get_linked_test_step( if ( not isinstance(doc.children[0], marko.block.Heading) or doc.children[0].level != 1 - or not text_of(doc.children[0]).lower().endswith(TEST_STEP_SUFFIX) + or not text_of(doc.children[0]).lower().endswith(TEST_STEP_FRAGMENT_SUFFIX) ): raise ValueError( - f'The first line of "{absolute_path}" must be a level-1 heading with the name of the test step + "{TEST_STEP_SUFFIX}" (e.g., "# Successful flight injection{TEST_STEP_SUFFIX}")' + f'The first line of "{absolute_path}" must be a level-1 heading with the name of the test step fragment + "{TEST_STEP_FRAGMENT_SUFFIX}" (e.g., "# Successful flight injection{TEST_STEP_FRAGMENT_SUFFIX}")' ) anchors = _get_anchors(doc) @@ -119,11 +120,13 @@ def _parse_test_step( if values[0].children and isinstance( values[0].children[0], marko.block.inline.Link ): - # We include the content of the linked test step document before + # We include the content of the linked test step fragment document before # extracting content from this section. - linked_step = _get_linked_test_step(values[0].children[0].dest, doc_filename) - url = linked_step.url - checks = linked_step.checks.copy() + linked_step_fragment = _get_linked_test_step_fragment( + values[0].children[0].dest, doc_filename + ) + url = linked_step_fragment.url + checks = linked_step_fragment.checks.copy() c = 1 while c < len(values): @@ -134,6 +137,15 @@ def _parse_test_step( check = _parse_test_check(values[c : c + dc + 1], doc_filename, anchors) checks.append(check) c += dc + elif isinstance(values[c].children[0], marko.block.inline.Link): + # Heading is a link, so we infer this is a linked test step fragment + dc = _length_of_section(values, c) + linked_step_fragment = _get_linked_test_step_fragment( + values[c].children[0].dest, doc_filename + ) + url = linked_step_fragment.url + checks.extend(linked_step_fragment.checks.copy()) + c += dc else: c += 1 else: diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/activate_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/activate_conflict_flight_intent.md index 1a8aa094d9..9dfc37bf97 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/activate_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/activate_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Activate flight with non-permitted equal priority conflict test step +# Activate flight with non-permitted equal priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be denied activation because of a non-permitted conflict with an equal priority flight intent. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/activate_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/activate_flight_intent.md index c61486a0a6..94772e5aca 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/activate_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/activate_flight_intent.md @@ -1,4 +1,4 @@ -# Activate flight test step +# Activate flight test step fragment This page describes the content of a common test step where a valid user flight intent should be successfully activated by a flight planner. See `activate_flight_intent` in [test_steps.py](test_steps.py). diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/activate_permitted_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/activate_permitted_conflict_flight_intent.md index 5430fd9207..bf2a295146 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/activate_permitted_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/activate_permitted_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Activate flight with permitted equal priority conflict test step +# Activate flight with permitted equal priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be successfully activated by a flight planner, given that there exists a permitted conflict with an equal priority flight intent. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/activate_priority_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/activate_priority_conflict_flight_intent.md index 9353081aa5..e3fc2eb8ce 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/activate_priority_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/activate_priority_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Activate flight with higher priority conflict test step +# Activate flight with higher priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be denied activation because of a conflict with a higher priority flight intent. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/delete_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/delete_flight_intent.md index e794165837..1ebf933e0e 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/delete_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/delete_flight_intent.md @@ -1,4 +1,4 @@ -# Delete flight test step +# Delete flight test step fragment This page describes the content of a common test case where a flight intent should be successfully deleted by a flight planner. See `delete_flight_intent` in [test_steps.py](test_steps.py). diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_conflict_flight_intent.md index 9bf08bb9f3..3c518e87bc 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Modify activated flight with non-permitted equal priority conflict test step +# Modify activated flight with non-permitted equal priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be denied modification because of a non-permitted conflict with an equal priority flight intent. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_flight_intent.md index 9b7db65ab2..d75479cab3 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_flight_intent.md @@ -1,4 +1,4 @@ -# Modify activated flight test step +# Modify activated flight test step fragment This page describes the content of a common test case where a valid user flight intent in activated state is tentatively modified by a flight planned. Multiple outcomes may be valid. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_permitted_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_permitted_conflict_flight_intent.md index 41c02dde62..fabdb373ab 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_permitted_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_permitted_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Modify activated flight with permitted equal priority conflict test step +# Modify activated flight with permitted equal priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be successfully modified by a flight planner, given that there exists a permitted conflict with an equal priority flight intent. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_priority_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_priority_conflict_flight_intent.md index f5f81a791e..caf2f06fe4 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_priority_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/modify_activated_priority_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Modify activated flight with higher priority conflict test step +# Modify activated flight with higher priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be denied modification because of a conflict with a higher priority flight intent. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_conflict_flight_intent.md index bf735663f7..d1baec7480 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Modify planned flight with non-permitted equal priority conflict test step +# Modify planned flight with non-permitted equal priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be denied modification because of a non-permitted conflict with an equal priority flight intent. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_flight_intent.md index 72764c8294..706ddfb536 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_flight_intent.md @@ -1,4 +1,4 @@ -# Modify planned flight test step +# Modify planned flight test step fragment This page describes the content of a common test case where a valid user flight intent in planned state should be successfully modified by a flight planner. See `modify_planned_flight_intent` in [test_steps.py](test_steps.py). diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_permitted_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_permitted_conflict_flight_intent.md index 7424816823..32902493ee 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_permitted_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_permitted_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Modify planned flight with permitted equal priority conflict test step +# Modify planned flight with permitted equal priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be successfully modified by a flight planner, given that there exists a permitted conflict with an equal priority flight intent. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_priority_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_priority_conflict_flight_intent.md index 97fe1a0e17..08bd4259a3 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_priority_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/modify_planned_priority_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Modify planned flight with higher priority conflict test step +# Modify planned flight with higher priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be denied modification because of a conflict with a higher priority flight intent. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/plan_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/plan_conflict_flight_intent.md index 5820f3f358..c52f429470 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/plan_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/plan_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Plan flight with non-permitted equal priority conflict test step +# Plan flight with non-permitted equal priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be denied planning because of a non-permitted conflict with an equal priority flight intent. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/plan_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/plan_flight_intent.md index ccfbd00d4f..a57719e6cd 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/plan_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/plan_flight_intent.md @@ -1,4 +1,4 @@ -# Plan flight test step +# Plan flight test step fragment This page describes the content of a common test case where a valid user flight intent should be successfully planned by a flight planner. See `plan_flight_intent` in [test_steps.py](test_steps.py). diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/plan_permitted_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/plan_permitted_conflict_flight_intent.md index d4c6687e65..d61c918827 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/plan_permitted_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/plan_permitted_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Plan flight with permitted equal priority conflict test step +# Plan flight with permitted equal priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be successfully planned by a flight planner, given that there exists a permitted conflict with an equal priority flight intent. diff --git a/monitoring/uss_qualifier/scenarios/flight_planning/plan_priority_conflict_flight_intent.md b/monitoring/uss_qualifier/scenarios/flight_planning/plan_priority_conflict_flight_intent.md index f3b823b19e..5dcc3f1c55 100644 --- a/monitoring/uss_qualifier/scenarios/flight_planning/plan_priority_conflict_flight_intent.md +++ b/monitoring/uss_qualifier/scenarios/flight_planning/plan_priority_conflict_flight_intent.md @@ -1,4 +1,4 @@ -# Plan flight with higher priority conflict test step +# Plan flight with higher priority conflict test step fragment This page describes the content of a common test step where a user flight intent should be denied planning because of a conflict with a higher priority flight intent. From f5b0ab0f19f708cc5f3c568545f1418ff0d2b22a Mon Sep 17 00:00:00 2001 From: Benjamin Pelletier Date: Thu, 7 Dec 2023 08:05:10 -0800 Subject: [PATCH 2/4] [uss_qualifier] Update flight intent names (#388) * Update flight intent names * Fix hash --- .../configurations/dev/library/resources.yaml | 2 +- .../conflict_equal_priority_not_permitted.md | 16 +- .../conflict_equal_priority_not_permitted.py | 192 ++++++++--------- .../conflict_higher_priority.md | 16 +- .../conflict_higher_priority.py | 194 +++++++++--------- .../astm/utm/off_nominal_planning/down_uss.md | 4 +- .../astm/utm/off_nominal_planning/down_uss.py | 34 +-- .../flight_intents/conflicting_flights.yaml | 44 ++-- 8 files changed, 241 insertions(+), 261 deletions(-) diff --git a/monitoring/uss_qualifier/configurations/dev/library/resources.yaml b/monitoring/uss_qualifier/configurations/dev/library/resources.yaml index 0d61db6328..9db677f5ec 100644 --- a/monitoring/uss_qualifier/configurations/dev/library/resources.yaml +++ b/monitoring/uss_qualifier/configurations/dev/library/resources.yaml @@ -134,7 +134,7 @@ che_conflicting_flights: file: path: file://./test_data/che/flight_intents/conflicting_flights.yaml # Note that this hash_sha512 field can be safely deleted if the content changes - hash_sha512: ac109b89c95381ba4685d6db5f7064dac64875a8875e58989aad19d91d2e7b10e568d5091749b5ea2b0892191a84486971d999b63ac8c73fd4249131111a6c58 + hash_sha512: c35e3536d63b7dd521042cefa094dd1ecd2d3feaf31997ce6a2902361b85c42dec636bec62df853157e46e08d3fc811c00fedfd6dfe4b8bbd0506149cfeb4a17 che_invalid_flight_intents: $content_schema: monitoring/uss_qualifier/resources/definitions/ResourceDeclaration.json diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md index dac90796bf..3596b8eefa 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.md @@ -31,7 +31,7 @@ Otherwise, the FlightIntentsResource must provide the following flight intents: Must not conflict with - flight_1_planned_vol_A + flight1_planned Flight 1 Any (but all the same) Accepted @@ -39,40 +39,40 @@ Otherwise, the FlightIntentsResource must provide the following flight intents: N/A - flight_1_activated_vol_A + flight1_activated Activated - flight_1_activated_vol_A_extended + flight1m_activated Flight 1m Activated Flight 2 N/A - flight_1_planned_vol_B + flight1c_planned Flight 1c Planned N/A Flight 2 - flight_1_activated_vol_B + flight1c_activated Activated - flight_2_equal_prio_planned_vol_B + equal_prio_flight2_planned Flight 2 Planned Flight 1, Flight 1m Flight 1c - flight_2_equal_prio_activated_vol_B + equal_prio_flight2_activated Activated - flight_2_equal_prio_nonconforming_vol_A + equal_prio_flight2_nonconforming Nonconforming diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.py b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.py index cc4a0355ca..801d98e505 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_equal_priority_not_permitted/conflict_equal_priority_not_permitted.py @@ -48,17 +48,17 @@ class ConflictEqualPriorityNotPermitted(TestScenario): - flight_1_id: Optional[str] = None - flight_1_planned_vol_A: FlightIntent - flight_1_activated_vol_A: FlightIntent - flight_1_activated_vol_A_extended: FlightIntent - flight_1_planned_vol_B: FlightIntent - flight_1_activated_vol_B: FlightIntent - - flight_2_id: Optional[str] = None - flight_2_equal_prio_planned_vol_B: FlightIntent - flight_2_equal_prio_activated_vol_B: FlightIntent - flight_2_equal_prio_nonconforming_vol_A: FlightIntent + flight1_id: Optional[str] = None + flight1_planned: FlightIntent + flight1_activated: FlightIntent + flight1m_activated: FlightIntent + flight1c_planned: FlightIntent + flight1c_activated: FlightIntent + + flight2_id: Optional[str] = None + flight2_planned: FlightIntent + flight2_activated: FlightIntent + flight2_nonconforming: FlightIntent tested_uss: FlightPlanner control_uss: FlightPlanner @@ -99,23 +99,23 @@ def __init__( try: ( - self.flight_1_planned_vol_A, - self.flight_1_activated_vol_A, - self.flight_1_activated_vol_A_extended, - self.flight_1_planned_vol_B, - self.flight_1_activated_vol_B, - self.flight_2_equal_prio_planned_vol_B, - self.flight_2_equal_prio_activated_vol_B, - self.flight_2_equal_prio_nonconforming_vol_A, + self.flight1_planned, + self.flight1_activated, + self.flight1m_activated, + self.flight1c_planned, + self.flight1c_activated, + self.flight2_planned, + self.flight2_activated, + self.flight2_nonconforming, ) = ( - _flight_intents["flight_1_planned_vol_A"], - _flight_intents["flight_1_activated_vol_A"], - _flight_intents["flight_1_activated_vol_A_extended"], - _flight_intents["flight_1_planned_vol_B"], - _flight_intents["flight_1_activated_vol_B"], - _flight_intents["flight_2_equal_prio_planned_vol_B"], - _flight_intents["flight_2_equal_prio_activated_vol_B"], - _flight_intents["flight_2_equal_prio_nonconforming_vol_A"], + _flight_intents["flight1_planned"], + _flight_intents["flight1_activated"], + _flight_intents["flight1m_activated"], + _flight_intents["flight1c_planned"], + _flight_intents["flight1c_activated"], + _flight_intents["equal_prio_flight2_planned"], + _flight_intents["equal_prio_flight2_activated"], + _flight_intents["equal_prio_flight2_nonconforming"], ) now = arrow.utcnow().datetime @@ -132,77 +132,77 @@ def __init__( ), f"at least one volume of activated intent {intent_name} must be active now (now is {now})" assert ( - self.flight_1_planned_vol_A.request.operational_intent.state + self.flight1_planned.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_1_planned_vol_A must have state Accepted" + ), "flight1_planned must have state Accepted" assert ( - self.flight_1_activated_vol_A.request.operational_intent.state + self.flight1_activated.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_vol_A must have state Activated" + ), "flight1_activated must have state Activated" assert ( - self.flight_1_activated_vol_A_extended.request.operational_intent.state + self.flight1m_activated.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_vol_A_extended must have state Activated" + ), "flight1m_activated must have state Activated" assert ( - self.flight_1_planned_vol_B.request.operational_intent.state + self.flight1c_planned.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_1_planned_vol_B must have state Accepted" + ), "flight1c_planned must have state Accepted" assert ( - self.flight_1_activated_vol_B.request.operational_intent.state + self.flight1c_activated.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_vol_B must have state Activated" + ), "flight1c_activated must have state Activated" assert ( - self.flight_2_equal_prio_planned_vol_B.request.operational_intent.state + self.flight2_planned.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_2_equal_prio_planned_vol_B must have state Accepted" + ), "equal_prio_flight2_planned must have state Accepted" assert ( - self.flight_2_equal_prio_activated_vol_B.request.operational_intent.state + self.flight2_activated.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_2_equal_prio_activated_vol_B must have state Activated" + ), "equal_prio_flight2_activated must have state Activated" assert ( - self.flight_2_equal_prio_nonconforming_vol_A.request.operational_intent.state + self.flight2_nonconforming.request.operational_intent.state == OperationalIntentState.Nonconforming - ), "flight_2_equal_prio_nonconforming_vol_A must have state Nonconforming" + ), "equal_prio_flight2_nonconforming must have state Nonconforming" assert ( - self.flight_2_equal_prio_planned_vol_B.request.operational_intent.priority - == self.flight_1_planned_vol_A.request.operational_intent.priority + self.flight2_planned.request.operational_intent.priority + == self.flight1_planned.request.operational_intent.priority ), "flight_2 must have priority equal to flight_1" assert not Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_vol_A.request.operational_intent.volumes + self.flight1_planned.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_2_equal_prio_planned_vol_B.request.operational_intent.volumes + self.flight2_planned.request.operational_intent.volumes ) - ), "flight_1_planned_vol_A and flight_2_equal_prio_planned_vol_B must not intersect" + ), "flight1_planned and equal_prio_flight2_planned must not intersect" assert not Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_vol_A.request.operational_intent.volumes + self.flight1_planned.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_1_activated_vol_B.request.operational_intent.volumes + self.flight1c_activated.request.operational_intent.volumes ) - ), "flight_1_planned_vol_A and flight_1_activated_vol_B must not intersect" + ), "flight1_planned and flight1c_activated must not intersect" assert Volume4DCollection.from_interuss_scd_api( - self.flight_1_activated_vol_B.request.operational_intent.volumes + self.flight1c_activated.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_2_equal_prio_activated_vol_B.request.operational_intent.volumes + self.flight2_activated.request.operational_intent.volumes ) - ), "flight_1_activated_vol_B and flight_2_equal_prio_activated_vol_B must intersect" + ), "flight1c_activated and equal_prio_flight2_activated must intersect" assert Volume4DCollection.from_interuss_scd_api( - self.flight_1_activated_vol_A.request.operational_intent.volumes + self.flight1_activated.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_2_equal_prio_nonconforming_vol_A.request.operational_intent.off_nominal_volumes + self.flight2_nonconforming.request.operational_intent.off_nominal_volumes ) - ), "flight_1_activated_vol_A.volumes and flight_2_equal_prio_nonconforming_vol_A.off_nominal_volumes must intersect" + ), "flight1_activated.volumes and equal_prio_flight2_nonconforming.off_nominal_volumes must intersect" assert ( len( - self.flight_2_equal_prio_nonconforming_vol_A.request.operational_intent.off_nominal_volumes + self.flight2_nonconforming.request.operational_intent.off_nominal_volumes ) > 0 - ), "flight_2_equal_prio_nonconforming_vol_A must have off-nominal volume" + ), "equal_prio_flight2_nonconforming must have off-nominal volume" except KeyError as e: raise ValueError( @@ -259,15 +259,13 @@ def _attempt_plan_flight_conflict(self) -> OperationalIntentReference: "Validate flight 2 sharing", self._intents_extent, ) as validator: - _, self.flight_2_id = plan_flight_intent( + _, self.flight2_id = plan_flight_intent( self, "Plan flight 2", self.control_uss, - self.flight_2_equal_prio_planned_vol_B.request, - ) - flight_2_oi_ref = validator.expect_shared( - self.flight_2_equal_prio_planned_vol_B.request + self.flight2_planned.request, ) + flight_2_oi_ref = validator.expect_shared(self.flight2_planned.request) with OpIntentValidator( self, @@ -281,12 +279,10 @@ def _attempt_plan_flight_conflict(self) -> OperationalIntentReference: self, "Activate flight 2", self.control_uss, - self.flight_2_equal_prio_activated_vol_B.request, - self.flight_2_id, - ) - flight_2_oi_ref = validator.expect_shared( - self.flight_2_equal_prio_activated_vol_B.request + self.flight2_activated.request, + self.flight2_id, ) + flight_2_oi_ref = validator.expect_shared(self.flight2_activated.request) with OpIntentValidator( self, @@ -299,7 +295,7 @@ def _attempt_plan_flight_conflict(self) -> OperationalIntentReference: self, "Attempt to plan flight 1", self.tested_uss, - self.flight_1_planned_vol_B.request, + self.flight1c_planned.request, ) validator.expect_not_shared() @@ -317,8 +313,8 @@ def _attempt_activate_flight_conflict(self): self, "Attempt to directly activate conflicting flight 1", self.tested_uss, - self.flight_1_activated_vol_B.request, - self.flight_1_id, + self.flight1c_activated.request, + self.flight1_id, ) validator.expect_not_shared() @@ -332,15 +328,13 @@ def _attempt_modify_planned_flight_conflict( "Validate flight 1 sharing", self._intents_extent, ) as validator: - _, self.flight_1_id = plan_flight_intent( + _, self.flight1_id = plan_flight_intent( self, "Plan flight 1", self.tested_uss, - self.flight_1_planned_vol_A.request, - ) - flight_1_oi_ref = validator.expect_shared( - self.flight_1_planned_vol_A.request + self.flight1_planned.request, ) + flight_1_oi_ref = validator.expect_shared(self.flight1_planned.request) with OpIntentValidator( self, @@ -354,11 +348,11 @@ def _attempt_modify_planned_flight_conflict( self, "Attempt to modify planned flight 1 into conflict", self.tested_uss, - self.flight_1_planned_vol_B.request, - self.flight_1_id, + self.flight1c_planned.request, + self.flight1_id, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_planned_vol_A.request, skip_if_not_found=True + self.flight1_planned.request, skip_if_not_found=True ) return flight_1_oi_ref @@ -378,12 +372,10 @@ def _attempt_modify_activated_flight_conflict( self, "Activate flight 1", self.tested_uss, - self.flight_1_activated_vol_A.request, - self.flight_1_id, - ) - flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_vol_A.request + self.flight1_activated.request, + self.flight1_id, ) + flight_1_oi_ref = validator.expect_shared(self.flight1_activated.request) with OpIntentValidator( self, @@ -397,11 +389,11 @@ def _attempt_modify_activated_flight_conflict( self, "Attempt to modify activated flight 1 into conflict", self.tested_uss, - self.flight_1_activated_vol_B.request, - self.flight_1_id, + self.flight1c_activated.request, + self.flight1_id, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_vol_A.request, skip_if_not_found=True + self.flight1_activated.request, skip_if_not_found=True ) return flight_1_oi_ref @@ -423,12 +415,10 @@ def _modify_activated_flight_preexisting_conflict( self, "Activate flight 1", self.tested_uss, - self.flight_1_activated_vol_A.request, - self.flight_1_id, - ) - flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_vol_A.request + self.flight1_activated.request, + self.flight1_id, ) + flight_1_oi_ref = validator.expect_shared(self.flight1_activated.request) with OpIntentValidator( self, @@ -448,17 +438,15 @@ def _modify_activated_flight_preexisting_conflict( }, {InjectFlightResponseResult.Failed: "Failure"}, self.control_uss, - self.flight_2_equal_prio_nonconforming_vol_A.request, - self.flight_2_id, + self.flight2_nonconforming.request, + self.flight2_id, ) if resp_flight_2.result == InjectFlightResponseResult.NotSupported: msg = f"{self.control_uss.config.participant_id} does not support the transition to a Nonconforming state; execution of the scenario was stopped without failure" self.record_note("Control USS does not support CMSA role", msg) raise ScenarioCannotContinueError(msg) - validator.expect_shared( - self.flight_2_equal_prio_nonconforming_vol_A.request - ) + validator.expect_shared(self.flight2_nonconforming.request) with OpIntentValidator( self, @@ -478,15 +466,15 @@ def _modify_activated_flight_preexisting_conflict( }, {InjectFlightResponseResult.Failed: "Failure"}, self.tested_uss, - self.flight_1_activated_vol_A_extended.request, - self.flight_1_id, + self.flight1m_activated.request, + self.flight1_id, ) if resp_flight_1.result == InjectFlightResponseResult.ReadyToFly: - validator.expect_shared(self.flight_1_activated_vol_A_extended.request) + validator.expect_shared(self.flight1m_activated.request) elif resp_flight_1.result == InjectFlightResponseResult.Rejected: validator.expect_shared( - self.flight_1_activated_vol_A.request, skip_if_not_found=True + self.flight1_activated.request, skip_if_not_found=True ) def cleanup(self): diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.md b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.md index 113d5c1ce2..c443e793a5 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.md @@ -26,7 +26,7 @@ FlightIntentsResource that provides the following flight intents: Must not conflict with - flight_1_planned_vol_A + flight1_planned Flight 1 Any Accepted @@ -34,29 +34,29 @@ FlightIntentsResource that provides the following flight intents: Flight 2m - flight_1_activated_vol_A + flight1_activated Activated - flight_1_planned_vol_A_extended + flight1m_planned Flight 1m Accepted Flight 2 N/A - flight_1_activated_vol_A_extended + flight1m_activated Activated - flight_1_activated_vol_B + flight1c_activated Flight 1c Activated Flight 2 N/A - flight_2_planned_vol_A + flight2_planned Flight 2 Higher than Flight 1* Accepted @@ -64,11 +64,11 @@ FlightIntentsResource that provides the following flight intents: N/A - flight_2_activated_vol_A + flight2_activated Activated - flight_2_activated_vol_B + flight2m_activated Flight 2m Activated Flight 1c diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py index 5b47612761..e26bd75ecd 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/nominal_planning/conflict_higher_priority/conflict_higher_priority.py @@ -47,17 +47,17 @@ class ConflictHigherPriority(TestScenario): - flight_1_id: Optional[str] = None - flight_1_planned_vol_A: FlightIntent - flight_1_planned_vol_A_extended: FlightIntent - flight_1_activated_vol_A: FlightIntent - flight_1_activated_vol_A_extended: FlightIntent - flight_1_activated_vol_B: FlightIntent - - flight_2_id: Optional[str] = None - flight_2_planned_vol_A: FlightIntent - flight_2_activated_vol_A: FlightIntent - flight_2_activated_vol_B: FlightIntent + flight1_id: Optional[str] = None + flight1_planned: FlightIntent + flight1m_planned: FlightIntent + flight1_activated: FlightIntent + flight1m_activated: FlightIntent + flight1c_activated: FlightIntent + + flight2_id: Optional[str] = None + flight2_planned: FlightIntent + flight2_activated: FlightIntent + flight2m_activated: FlightIntent tested_uss: FlightPlanner control_uss: FlightPlanner @@ -90,23 +90,23 @@ def __init__( try: ( - self.flight_1_planned_vol_A, - self.flight_1_planned_vol_A_extended, - self.flight_1_activated_vol_A, - self.flight_1_activated_vol_A_extended, - self.flight_1_activated_vol_B, - self.flight_2_planned_vol_A, - self.flight_2_activated_vol_A, - self.flight_2_activated_vol_B, + self.flight1_planned, + self.flight1m_planned, + self.flight1_activated, + self.flight1m_activated, + self.flight1c_activated, + self.flight2_planned, + self.flight2_activated, + self.flight2m_activated, ) = ( - _flight_intents["flight_1_planned_vol_A"], - _flight_intents["flight_1_planned_vol_A_extended"], - _flight_intents["flight_1_activated_vol_A"], - _flight_intents["flight_1_activated_vol_A_extended"], - _flight_intents["flight_1_activated_vol_B"], - _flight_intents["flight_2_planned_vol_A"], - _flight_intents["flight_2_activated_vol_A"], - _flight_intents["flight_2_activated_vol_B"], + _flight_intents["flight1_planned"], + _flight_intents["flight1m_planned"], + _flight_intents["flight1_activated"], + _flight_intents["flight1m_activated"], + _flight_intents["flight1c_activated"], + _flight_intents["flight2_planned"], + _flight_intents["flight2_activated"], + _flight_intents["flight2m_activated"], ) now = arrow.utcnow().datetime @@ -123,65 +123,65 @@ def __init__( ), f"at least one volume of activated intent {intent_name} must be active now (now is {now})" assert ( - self.flight_1_planned_vol_A.request.operational_intent.state + self.flight1_planned.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_1_planned_vol_A must have state Accepted" + ), "flight1_planned must have state Accepted" assert ( - self.flight_1_planned_vol_A_extended.request.operational_intent.state + self.flight1m_planned.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_1_planned_vol_A_extended must have state Accepted" + ), "flight1m_planned must have state Accepted" assert ( - self.flight_1_activated_vol_A.request.operational_intent.state + self.flight1_activated.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_vol_A must have state Activated" + ), "flight1_activated must have state Activated" assert ( - self.flight_1_activated_vol_A_extended.request.operational_intent.state + self.flight1m_activated.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_vol_A_extended must have state Activated" + ), "flight1m_activated must have state Activated" assert ( - self.flight_1_activated_vol_B.request.operational_intent.state + self.flight1c_activated.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_1_activated_vol_B must have state Activated" + ), "flight1c_activated must have state Activated" assert ( - self.flight_2_planned_vol_A.request.operational_intent.state + self.flight2_planned.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_2_planned_vol_A must have state Accepted" + ), "flight2_planned must have state Accepted" assert ( - self.flight_2_activated_vol_A.request.operational_intent.state + self.flight2_activated.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_2_activated_vol_A must have state Activated" + ), "flight2_activated must have state Activated" assert ( - self.flight_2_activated_vol_B.request.operational_intent.state + self.flight2m_activated.request.operational_intent.state == OperationalIntentState.Activated - ), "flight_2_activated_vol_B must have state Activated" + ), "flight2m_activated must have state Activated" # TODO: check that flight data is the same across the different versions of the flight assert ( - self.flight_2_planned_vol_A.request.operational_intent.priority - > self.flight_1_planned_vol_A.request.operational_intent.priority + self.flight2_planned.request.operational_intent.priority + > self.flight1_planned.request.operational_intent.priority ), "flight_2 must have higher priority than flight_1" assert Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_vol_A.request.operational_intent.volumes + self.flight1_planned.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_2_planned_vol_A.request.operational_intent.volumes + self.flight2_planned.request.operational_intent.volumes ) - ), "flight_1_planned_vol_A and flight_2_planned_vol_A must intersect" + ), "flight1_planned and flight2_planned must intersect" assert Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_vol_A.request.operational_intent.volumes + self.flight1_planned.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_vol_A_extended.request.operational_intent.volumes + self.flight1m_planned.request.operational_intent.volumes ) - ), "flight_1_planned_vol_A and flight_1_planned_vol_A_extended must intersect" + ), "flight1_planned and flight1m_planned must intersect" assert not Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_vol_A.request.operational_intent.volumes + self.flight1_planned.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_1_activated_vol_B.request.operational_intent.volumes + self.flight1c_activated.request.operational_intent.volumes ) - ), "flight_1_planned_vol_A and flight_1_activated_vol_B must not intersect" + ), "flight1_planned and flight1c_activated must not intersect" except KeyError as e: raise ValueError( @@ -237,13 +237,13 @@ def _attempt_plan_flight_conflict(self): "Validate flight 2 sharing", self._intents_extent, ) as validator: - resp_flight_2, self.flight_2_id = plan_flight_intent( + resp_flight_2, self.flight2_id = plan_flight_intent( self, "Plan flight 2", self.control_uss, - self.flight_2_planned_vol_A.request, + self.flight2_planned.request, ) - validator.expect_shared(self.flight_2_planned_vol_A.request) + validator.expect_shared(self.flight2_planned.request) with OpIntentValidator( self, @@ -256,14 +256,14 @@ def _attempt_plan_flight_conflict(self): self, "Attempt to plan flight 1", self.tested_uss, - self.flight_1_planned_vol_A.request, + self.flight1_planned.request, ) validator.expect_not_shared() _ = delete_flight_intent( - self, "Delete flight 2", self.control_uss, self.flight_2_id + self, "Delete flight 2", self.control_uss, self.flight2_id ) - self.flight_2_id = None + self.flight2_id = None def _attempt_modify_planned_flight_conflict( self, @@ -275,15 +275,13 @@ def _attempt_modify_planned_flight_conflict( "Validate flight 1 sharing", self._intents_extent, ) as validator: - resp_flight_1, self.flight_1_id = plan_flight_intent( + resp_flight_1, self.flight1_id = plan_flight_intent( self, "Plan flight 1", self.tested_uss, - self.flight_1_planned_vol_A.request, - ) - flight_1_oi_ref = validator.expect_shared( - self.flight_1_planned_vol_A.request + self.flight1_planned.request, ) + flight_1_oi_ref = validator.expect_shared(self.flight1_planned.request) with OpIntentValidator( self, @@ -292,13 +290,13 @@ def _attempt_modify_planned_flight_conflict( "Validate flight 2 sharing", self._intents_extent, ) as validator: - resp_flight_2, self.flight_2_id = plan_flight_intent( + resp_flight_2, self.flight2_id = plan_flight_intent( self, "Plan flight 2", self.control_uss, - self.flight_2_planned_vol_A.request, + self.flight2_planned.request, ) - validator.expect_shared(self.flight_2_planned_vol_A.request) + validator.expect_shared(self.flight2_planned.request) with OpIntentValidator( self, @@ -312,11 +310,11 @@ def _attempt_modify_planned_flight_conflict( self, "Attempt to modify planned flight 1 in conflict", self.tested_uss, - self.flight_1_planned_vol_A_extended.request, - self.flight_1_id, + self.flight1m_planned.request, + self.flight1_id, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_planned_vol_A.request, skip_if_not_found=True + self.flight1_planned.request, skip_if_not_found=True ) return flight_1_oi_ref @@ -336,11 +334,11 @@ def _attempt_activate_flight_conflict( self, "Attempt to activate conflicting flight 1", self.tested_uss, - self.flight_1_activated_vol_A.request, - self.flight_1_id, + self.flight1_activated.request, + self.flight1_id, ) flight_1_oi_ref = validator.expect_shared( - self.flight_1_planned_vol_A.request, skip_if_not_found=True + self.flight1_planned.request, skip_if_not_found=True ) return flight_1_oi_ref @@ -349,9 +347,9 @@ def _modify_activated_flight_conflict_preexisting( self, flight_1_oi_ref: Optional[OperationalIntentReference] ) -> Tuple[OperationalIntentReference, OperationalIntentReference]: _ = delete_flight_intent( - self, "Delete flight 2", self.control_uss, self.flight_2_id + self, "Delete flight 2", self.control_uss, self.flight2_id ) - self.flight_2_id = None + self.flight2_id = None with OpIntentValidator( self, @@ -365,12 +363,10 @@ def _modify_activated_flight_conflict_preexisting( self, "Activate flight 1", self.tested_uss, - self.flight_1_activated_vol_A.request, - self.flight_1_id, - ) - flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_vol_A.request + self.flight1_activated.request, + self.flight1_id, ) + flight_1_oi_ref = validator.expect_shared(self.flight1_activated.request) with OpIntentValidator( self, @@ -379,15 +375,13 @@ def _modify_activated_flight_conflict_preexisting( "Validate flight 2 sharing", self._intents_extent, ) as validator: - _, self.flight_2_id = plan_flight_intent( + _, self.flight2_id = plan_flight_intent( self, "Plan flight 2", self.control_uss, - self.flight_2_planned_vol_A.request, - ) - flight_2_oi_ref = validator.expect_shared( - self.flight_2_planned_vol_A.request + self.flight2_planned.request, ) + flight_2_oi_ref = validator.expect_shared(self.flight2_planned.request) with OpIntentValidator( self, @@ -401,12 +395,10 @@ def _modify_activated_flight_conflict_preexisting( self, "Activate flight 2", self.control_uss, - self.flight_2_activated_vol_A.request, - self.flight_2_id, - ) - flight_2_oi_ref = validator.expect_shared( - self.flight_2_activated_vol_A.request + self.flight2_activated.request, + self.flight2_id, ) + flight_2_oi_ref = validator.expect_shared(self.flight2_activated.request) with OpIntentValidator( self, @@ -420,18 +412,18 @@ def _modify_activated_flight_conflict_preexisting( self, "Modify activated flight 1 in conflict with activated flight 2", self.tested_uss, - self.flight_1_activated_vol_A_extended.request, - self.flight_1_id, + self.flight1m_activated.request, + self.flight1_id, preexisting_conflict=True, ) if resp.result == InjectFlightResponseResult.ReadyToFly: flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_vol_A_extended.request + self.flight1m_activated.request ) else: flight_1_oi_ref = validator.expect_shared( - self.flight_1_activated_vol_A.request + self.flight1_activated.request ) return flight_1_oi_ref, flight_2_oi_ref @@ -453,10 +445,10 @@ def _attempt_modify_activated_flight_conflict( self, "Modify activated flight 2 to not conflict with activated flight 1", self.control_uss, - self.flight_2_activated_vol_B.request, - self.flight_2_id, + self.flight2m_activated.request, + self.flight2_id, ) - validator.expect_shared(self.flight_2_activated_vol_B.request) + validator.expect_shared(self.flight2m_activated.request) with OpIntentValidator( self, @@ -470,11 +462,11 @@ def _attempt_modify_activated_flight_conflict( self, "Attempt to modify activated flight 1 in conflict", self.tested_uss, - self.flight_1_activated_vol_B.request, - self.flight_1_id, + self.flight1c_activated.request, + self.flight1_id, ) validator.expect_shared( - self.flight_1_activated_vol_A_extended.request, + self.flight1m_activated.request, skip_if_not_found=True, ) diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.md b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.md index 24556a788c..04851aa9fd 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.md +++ b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.md @@ -21,7 +21,7 @@ FlightIntentsResource that provides the following flight intents: Must not conflict with - flight_1_planned_vol_A + flight1_planned Flight 1 Any Accepted @@ -29,7 +29,7 @@ FlightIntentsResource that provides the following flight intents: Flight 2m - flight_2_planned_vol_A + flight2_planned Flight 2 Higher than Flight 1* Accepted diff --git a/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.py b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.py index 2b766306bc..969b192ddf 100644 --- a/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.py +++ b/monitoring/uss_qualifier/scenarios/astm/utm/off_nominal_planning/down_uss.py @@ -38,9 +38,9 @@ class DownUSS(TestScenario): flight_1_id: Optional[str] = None - flight_1_planned_vol_A: FlightIntent + flight1_planned: FlightIntent - flight_2_planned_vol_A: FlightIntent + flight2_planned: FlightIntent uss_qualifier_sub: str @@ -71,9 +71,9 @@ def __init__( ).bounding_volume.to_f3548v21() try: - (self.flight_1_planned_vol_A, self.flight_2_planned_vol_A,) = ( - _flight_intents["flight_1_planned_vol_A"], - _flight_intents["flight_2_planned_vol_A"], + (self.flight1_planned, self.flight2_planned,) = ( + _flight_intents["flight1_planned"], + _flight_intents["flight2_planned"], ) now = arrow.utcnow().datetime @@ -90,27 +90,27 @@ def __init__( ), f"at least one volume of activated intent {intent_name} must be active now (now is {now})" assert ( - self.flight_1_planned_vol_A.request.operational_intent.state + self.flight1_planned.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_1_planned_vol_A must have state Accepted" + ), "flight1_planned must have state Accepted" assert ( - self.flight_2_planned_vol_A.request.operational_intent.state + self.flight2_planned.request.operational_intent.state == OperationalIntentState.Accepted - ), "flight_2_planned_vol_A must have state Accepted" + ), "flight2_planned must have state Accepted" # TODO: check that flight data is the same across the different versions of the flight assert ( - self.flight_2_planned_vol_A.request.operational_intent.priority - > self.flight_1_planned_vol_A.request.operational_intent.priority + self.flight2_planned.request.operational_intent.priority + > self.flight1_planned.request.operational_intent.priority ), "flight_2 must have higher priority than flight_1" assert Volume4DCollection.from_interuss_scd_api( - self.flight_1_planned_vol_A.request.operational_intent.volumes + self.flight1_planned.request.operational_intent.volumes ).intersects_vol4s( Volume4DCollection.from_interuss_scd_api( - self.flight_2_planned_vol_A.request.operational_intent.volumes + self.flight2_planned.request.operational_intent.volumes ) - ), "flight_1_planned_vol_A and flight_2_planned_vol_A must intersect" + ), "flight1_planned and flight2_planned must intersect" except KeyError as e: raise ValueError( @@ -174,7 +174,7 @@ def _plan_flight_conflict_planned(self): self.begin_test_step("Virtual USS plans high-priority flight 2") oi_ref, _, query = self.dss.put_op_intent( Volume4DCollection.from_interuss_scd_api( - self.flight_2_planned_vol_A.request.operational_intent.volumes + self.flight2_planned.request.operational_intent.volumes ).to_f3548v21(), [], # we assume there is no other operational intent in that area OperationalIntentState.Accepted, @@ -231,11 +231,11 @@ def _plan_flight_conflict_planned(self): expected_results, failed_checks, self.tested_uss, - self.flight_1_planned_vol_A.request, + self.flight1_planned.request, ) if resp.result == InjectFlightResponseResult.Planned: - validator.expect_shared(self.flight_1_planned_vol_A.request) + validator.expect_shared(self.flight1_planned.request) elif ( resp.result == InjectFlightResponseResult.Rejected or resp.result == InjectFlightResponseResult.ConflictWithFlight diff --git a/monitoring/uss_qualifier/test_data/che/flight_intents/conflicting_flights.yaml b/monitoring/uss_qualifier/test_data/che/flight_intents/conflicting_flights.yaml index cb79f2b1df..20a23fe332 100644 --- a/monitoring/uss_qualifier/test_data/che/flight_intents/conflicting_flights.yaml +++ b/monitoring/uss_qualifier/test_data/che/flight_intents/conflicting_flights.yaml @@ -1,6 +1,6 @@ $content_schema: monitoring/uss_qualifier/resources/flight_planning/flight_intent/FlightIntentCollection.json intents: - flight_1_planned_vol_A: + flight1_planned: full: basic_information: usage_state: Planned @@ -53,9 +53,9 @@ intents: uas_id: '' uas_type_certificate: '' - flight_1_activated_vol_A: + flight1_activated: delta: - source: flight_1_planned_vol_A + source: flight1_planned mutation: basic_information: usage_state: InUse @@ -63,9 +63,9 @@ intents: - altitude_lower: value: 605.02 - flight_1_planned_vol_A_extended: + flight1m_planned: delta: - source: flight_1_planned_vol_A + source: flight1_planned mutation: basic_information: area: @@ -73,9 +73,9 @@ intents: altitude_lower: value: 575.03 - flight_1_planned_vol_B: + flight1c_planned: delta: - source: flight_1_planned_vol_A + source: flight1_planned mutation: basic_information: area: @@ -84,9 +84,9 @@ intents: altitude_upper: value: 705 - flight_1_activated_vol_A_extended: + flight1m_activated: delta: - source: flight_1_planned_vol_A_extended + source: flight1m_planned mutation: basic_information: usage_state: InUse @@ -94,9 +94,9 @@ intents: - altitude_lower: value: 575.05 - flight_1_activated_vol_B: + flight1c_activated: delta: - source: flight_1_planned_vol_B + source: flight1c_planned mutation: basic_information: usage_state: InUse @@ -104,7 +104,7 @@ intents: - altitude_lower: value: 650.06 - flight_2_planned_vol_A: + flight2_planned: full: basic_information: usage_state: Planned @@ -157,9 +157,9 @@ intents: uas_id: '' uas_type_certificate: '' - flight_2_activated_vol_A: + flight2_activated: delta: - source: flight_2_planned_vol_A + source: flight2_planned mutation: basic_information: usage_state: InUse @@ -167,9 +167,9 @@ intents: - altitude_lower: value: 605.08 - flight_2_activated_vol_B: + flight2m_activated: delta: - source: flight_2_activated_vol_A + source: flight2_activated mutation: basic_information: area: @@ -178,9 +178,9 @@ intents: altitude_upper: value: 705 - flight_2_equal_prio_planned_vol_B: + equal_prio_flight2_planned: delta: - source: flight_2_activated_vol_B + source: flight2m_activated mutation: basic_information: usage_state: Planned @@ -190,9 +190,9 @@ intents: astm_f3548_21: priority: 0 - flight_2_equal_prio_activated_vol_B: + equal_prio_flight2_activated: delta: - source: flight_2_equal_prio_planned_vol_B + source: equal_prio_flight2_planned mutation: basic_information: usage_state: InUse @@ -200,9 +200,9 @@ intents: - altitude_lower: value: 650.11 - flight_2_equal_prio_nonconforming_vol_A: + equal_prio_flight2_nonconforming: delta: - source: flight_2_equal_prio_activated_vol_B + source: equal_prio_flight2_activated mutation: basic_information: uas_state: OffNominal From 9a5329fc497a2287aa5952b779d1e56db8e84d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Misbach?= Date: Thu, 7 Dec 2023 17:21:34 +0100 Subject: [PATCH 3/4] [uss_qualifier] Add suffix for notes with duplicated keys (#390) --- monitoring/uss_qualifier/scenarios/scenario.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/monitoring/uss_qualifier/scenarios/scenario.py b/monitoring/uss_qualifier/scenarios/scenario.py index 73bc509531..6b8827fa3a 100644 --- a/monitoring/uss_qualifier/scenarios/scenario.py +++ b/monitoring/uss_qualifier/scenarios/scenario.py @@ -280,6 +280,14 @@ def record_note(self, key: str, message: str) -> None: ) if "notes" not in self._scenario_report: self._scenario_report.notes = {} + + if key in self._scenario_report.notes: + # prevent notes from being overriden by adding a suffix if key is a duplicate + suffix = 1 + while f"{key}_{suffix}" in self._scenario_report.notes: + suffix += 1 + key += f"_{suffix}" + self._scenario_report.notes[key] = Note( message=message, timestamp=StringBasedDateTime(arrow.utcnow().datetime), From a6e022cc39e6e6fed443720c0a3d77a6b4b3dd33 Mon Sep 17 00:00:00 2001 From: Benjamin Pelletier Date: Thu, 7 Dec 2023 09:13:51 -0800 Subject: [PATCH 4/4] Fix merge issues (#392) --- .../scenarios/astm/netrid/v19/dss/test_steps/get_isa.md | 2 +- .../scenarios/astm/netrid/v22a/dss/test_steps/get_isa.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/get_isa.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/get_isa.md index f512223999..ad4acb0c26 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/get_isa.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v19/dss/test_steps/get_isa.md @@ -1,4 +1,4 @@ -# Get ISA test step +# Get ISA test step fragment This page describes the content of a common test step where a request for an ISA by its ID should be successful. See `ISAValidator` in [`isa_validator.py`](../../../common/dss/isa_validator.py). diff --git a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/get_isa.md b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/get_isa.md index 754a66e935..4d100f5209 100644 --- a/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/get_isa.md +++ b/monitoring/uss_qualifier/scenarios/astm/netrid/v22a/dss/test_steps/get_isa.md @@ -1,4 +1,4 @@ -# Get ISA test step +# Get ISA test step fragment This page describes the content of a common test step where a request for an ISA by its ID should be successful. See `ISAValidator` in [`isa_validator.py`](../../../common/dss/isa_validator.py).