Skip to content

Class for unit conversion#429

Closed
jose-caballero wants to merge 2 commits intomainfrom
class_for_unit_conversion
Closed

Class for unit conversion#429
jose-caballero wants to merge 2 commits intomainfrom
class_for_unit_conversion

Conversation

@jose-caballero
Copy link
Copy Markdown
Contributor

Description:

Special Notes:


Submitter:

Have you (where applicable):

  • Added unit tests?
  • Checked the latest commit runs on Dev?
  • Updated the example config file(s) and README?

Reviewer

Does this PR:

  • Place non-StackStorm code into the lib directory?
  • Have unit tests for the action/sensor and lib layers?
  • Have clear and obvious action parameter names and descriptions?

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.81%. Comparing base (3ffaa4f) to head (334d911).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #429   +/-   ##
=======================================
  Coverage   99.81%   99.81%           
=======================================
  Files         109      110    +1     
  Lines        2643     2669   +26     
  Branches      331      332    +1     
=======================================
+ Hits         2638     2664   +26     
  Misses          4        4           
  Partials        1        1           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

gmatthews20
gmatthews20 previously approved these changes Mar 16, 2026
Comment thread lib/apis/utils/units.py
Comment thread lib/apis/utils/units.py
Not all the OpenStack commands require the same units for size. Some
of them expect Gigabytes while other work with Megabytes.
Also, there is no guarantee that the forms for stackstorm automation
will always ask for the right units. In particular if some of them
change in the future, and our forms and automation are not up to date.

This class may help with those situations.
Objects can be instantiated with whatever value and unit is passed via
the forms, but the workflows can then request the units actually needed
for each command.
@jose-caballero jose-caballero force-pushed the class_for_unit_conversion branch from dccaa0b to 334d911 Compare March 17, 2026 11:20
@jose-caballero jose-caballero deleted the class_for_unit_conversion branch March 17, 2026 13:21
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