de5e28613d5a409c907a1b57291.../README.md
2025-07-31 09:22:23 +00:00

2.2 KiB

ILI comparison (compare all)

This function will run all possible ILI comparisons for a given pipeline.

See ILI comparison for more details of the comparison algorithm.

Input

Arguments

  • org_id: as string which should be a valid uuid for the organization
  • project_id: the id of the data project where the pipeline data is found
  • pipeline_id: a array of string values representing a valid uuid for a pipeline
  • weld_location_threshold: a float value
  • feature_location_threshold: a float value
  • upstream_girth_threshold: a float value
  • orientation_threshold: a float value
  • minimum_depth_growth_threshold: a float value
  • minimum_length_growth_threshold: a float value
  • length_criteria_status: a string whose values should be one of
    • enabled
    • disabled
  • surface_location_criteria: a string whose value should be one of
    • matching
    • any
  • target_minimum_match_rate: a float value

Creating the function on the platform

To create this function on the platform using the cli set up the port forwarding as shown in README.

Then run the following command to create the function.

cargo run functions create \
  -f functions/ili_compare_all \
  -d "Runs the ILI comparison algorithm for all combinations of ILI reports for the given pipeline" \
  -o org_id=string \
  -o project_id=string \
  -o pipeline_ids=array \
  -o unique_pipeline_ids=array \
  -o matched_ids=array \
  -o unmatched_ids=array \
  -o summary_ids=array \
  -i org_id=string \
  -i project_id=string \
  -i pipeline_id=array \
  -i weld_location_threshold=float \
  -i upstream_girth_threshold=float \
  -i feature_location_threshold=float \
  -i orientation_threshold=float \
  -i minimum_depth_growth_threshold=float \
  -i minimum_length_growth_threshold=float \
  -i length_criteria_status=string \
  -i surface_location_criteria=string \
  -i target_minimum_match_rate=float

Testing the function locally

You can run and test the function locally by running

cargo run

Then you can check it work with curl as follows

curl localhost:8080 -d $(jq '. | tojson' functions/ili_compare_all/example_input.json)