Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editoast: add signal support in the search engine #3527

Merged
merged 9 commits into from
Mar 24, 2023

Conversation

leovalais
Copy link
Contributor

@leovalais leovalais commented Mar 14, 2023

  • adds option dry in endpoint payload to generate the SQL query without executing it
  • adds support of arrays in the query evaluator
  • adds support of array and union types in search.yml with a less hack-y deserializer
  • adds the following functions:
    • list -- array constructor
    • contains -- checks for array inclusion
  • migration for osrd_search_signal
  • signal search object description in search.yml

Both the old and incoming signaling models are supported, as the search engine provides the following criteria:

  • aspects -- present in both signal descriptions
  • logical_types -- only for the new signal descriptions, it's an empty array for the old ones

closes #3546

@leovalais leovalais force-pushed the lva/search-signals-back branch 2 times, most recently from 927367d to 389ab7b Compare March 17, 2023 14:11
@codecov
Copy link

codecov bot commented Mar 17, 2023

Codecov Report

Merging #3527 (8e27f01) into dev (df55582) will increase coverage by 0.05%.
The diff coverage is 66.66%.

❗ Current head 8e27f01 differs from pull request most recent head b00aa59. Consider uploading reports for the commit b00aa59 to get more accurate results

@@             Coverage Diff              @@
##                dev    #3527      +/-   ##
============================================
+ Coverage     68.14%   68.20%   +0.05%     
  Complexity     1919     1919              
============================================
  Files           424      424              
  Lines         21336    21404      +68     
  Branches       1557     1557              
============================================
+ Hits          14540    14599      +59     
- Misses         6063     6072       +9     
  Partials        733      733              
Flag Coverage Δ
editoast 74.31% <66.66%> (+0.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
editoast/src/views/search/config.rs 0.00% <0.00%> (ø)
editoast/src/views/search/mod.rs 2.17% <0.00%> (-0.21%) ⬇️
editoast/src/views/search/dsl.rs 54.62% <15.38%> (-4.82%) ⬇️
editoast/src/views/search/context.rs 82.45% <75.00%> (-1.19%) ⬇️
editoast/src/views/search/sqlquery.rs 89.65% <80.95%> (+21.96%) ⬆️
editoast/src/views/search/typing.rs 85.71% <90.90%> (+3.36%) ⬆️
editoast/src/error.rs 31.37% <100.00%> (+0.12%) ⬆️
editoast/src/views/search/process.rs 92.68% <100.00%> (+0.47%) ⬆️

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@leovalais leovalais force-pushed the lva/search-signals-back branch from 5ecca50 to 01096ef Compare March 23, 2023 15:45
@leovalais leovalais marked this pull request as ready for review March 23, 2023 15:45
@leovalais leovalais requested a review from a team as a code owner March 23, 2023 15:45
@leovalais leovalais requested a review from flomonster March 23, 2023 15:46
@leovalais leovalais force-pushed the lva/search-signals-back branch from 01096ef to 6a1c97a Compare March 23, 2023 16:12
@leovalais leovalais force-pushed the lva/search-signals-back branch from 6a1c97a to cca1284 Compare March 24, 2023 08:51
Copy link
Contributor

@flomonster flomonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty good PR 👍

@leovalais leovalais force-pushed the lva/search-signals-back branch from 8e27f01 to b00aa59 Compare March 24, 2023 13:36
@leovalais leovalais enabled auto-merge (rebase) March 24, 2023 13:44
@leovalais leovalais merged commit ca3df25 into dev Mar 24, 2023
@leovalais leovalais deleted the lva/search-signals-back branch March 24, 2023 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search into signals (back)
2 participants