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

Coerce dimensionless values of SizeConstraint to values with dimensions #3076

Merged
merged 3 commits into from
Jul 22, 2024

Conversation

skycastlelily
Copy link
Collaborator

Pull Request Checklist

  • implement the feature
  • write the documentation
  • extend the test coverage
  • update the specification
  • adjust plugin docstring
  • modify the json schema
  • mention the version
  • include a release note

tmt/hardware.py Outdated Show resolved Hide resolved
@happz happz added the area | hardware Implementation of hardware requirements label Jul 4, 2024
@skycastlelily
Copy link
Collaborator Author

skycastlelily commented Jul 5, 2024 via email

tmt/hardware.py Outdated Show resolved Hide resolved
@happz
Copy link
Collaborator

happz commented Jul 9, 2024

@skycastlelily please, add also a unit test, a small one should be more than enough. A simple call to SizeConstraint.from_specification & checking the magnitude and unit of the returned constraint value should work. I would make it parametrized, with raw value and default unit as inputs and magnitude and unit as expected values, because we want to check various combination - number without a default value (bytes are added), number with a default value but not bytes (the default value is used, not bytes), number with unit already included (4 GB) (default value is ignored), and maybe there are others.

@skycastlelily
Copy link
Collaborator Author

skycastlelily commented Jul 10, 2024 via email

tests/unit/test_hardware.py Outdated Show resolved Hide resolved
tmt/hardware.py Show resolved Hide resolved
@skycastlelily
Copy link
Collaborator Author

skycastlelily commented Jul 18, 2024 via email

@happz happz added the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Jul 20, 2024
@happz happz added the ci | full test Pull request is ready for the full test execution label Jul 21, 2024
@happz
Copy link
Collaborator

happz commented Jul 21, 2024

/packit build

@happz
Copy link
Collaborator

happz commented Jul 22, 2024

Usual suspects broke tests once again, but it's nothing related to the patch. Merging.

@happz happz merged commit 5e6db4b into main Jul 22, 2024
18 of 19 checks passed
@happz happz deleted the default-unit branch July 22, 2024 07:08
The-Mule pushed a commit to The-Mule/tmt that referenced this pull request Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area | hardware Implementation of hardware requirements ci | full test Pull request is ready for the full test execution status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants