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

ENH: add search_by_expression workflow #263

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

anish-mudaraddi
Copy link
Collaborator

this workflow action allows querying generic openstack resources for numerical properties based on an expression - e.g "less-than" or "greater-than" a given threshold

Future stackstorm actions will make use of it

this workflow action allows querying generic openstack resources for numerical properties based on an expression - e.g "less-than" or "greater-than" a given threshold

Future stackstorm actions will make use of it
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.08%. Comparing base (2468e98) to head (bf8613b).
Report is 75 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #263      +/-   ##
==========================================
- Coverage   98.20%   98.08%   -0.13%     
==========================================
  Files         195      208      +13     
  Lines        7636     7989     +353     
  Branches      460      484      +24     
==========================================
+ Hits         7499     7836     +337     
- Misses        110      125      +15     
- Partials       27       28       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

lizsalmon
lizsalmon previously approved these changes Oct 1, 2024
Copy link
Contributor

@Neonbluestoplight Neonbluestoplight left a comment

Choose a reason for hiding this comment

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

It all looks good for me apart from the possible minor clouds.yaml typo

lib/workflows/search_by_expression.py Outdated Show resolved Hide resolved
Comment on lines +10 to +11
@pytest.mark.parametrize(
"output_type", ["to_html", "to_string", "to_objects", "to_props"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Just for understanding. This code allows testing of each of the types listed separately if I understand correctly?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

parametrize splits the test into 4 parts. Each test uses a different output_type parameter - set here to_html, to_string etc

Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's to save from writing each test separately - https://docs.pytest.org/en/7.1.x/example/parametrize.html

cloud.ymal -> cloud.yaml

Co-authored-by: Nalin Gupta <[email protected]>
@anish-mudaraddi anish-mudaraddi merged commit c4d9023 into main Oct 4, 2024
13 of 14 checks passed
@anish-mudaraddi anish-mudaraddi deleted the add-search-by-expression branch October 4, 2024 09:47
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.

3 participants