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

Add additional checks and tests #81

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

ka-sarthak
Copy link
Collaborator

  • add checks in the function to handle None for value and units
  • add unit tests for the function

@ka-sarthak ka-sarthak self-assigned this Feb 20, 2024
@ka-sarthak ka-sarthak linked an issue Feb 20, 2024 that may be closed by this pull request
@ka-sarthak ka-sarthak force-pushed the 80-to_pint_quantity-breaks-if-value-is-none branch from 790e23d to 4a74078 Compare February 26, 2024 11:10
@ka-sarthak ka-sarthak force-pushed the 80-to_pint_quantity-breaks-if-value-is-none branch from 4a74078 to fd37f7f Compare February 28, 2024 10:17
Copy link
Collaborator

@hampusnasstrom hampusnasstrom left a comment

Choose a reason for hiding this comment

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

Try if my simplification works, maybe also add to the descriptions that it accepts pint.Quantity

src/nomad_measurements/utils.py Outdated Show resolved Hide resolved
@ka-sarthak
Copy link
Collaborator Author

Thanks for the suggestions; incorporated them. Please have a look

Copy link
Collaborator

@hampusnasstrom hampusnasstrom left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@hampusnasstrom hampusnasstrom merged commit 994d5eb into main Feb 28, 2024
1 check passed
@hampusnasstrom hampusnasstrom deleted the 80-to_pint_quantity-breaks-if-value-is-none branch February 28, 2024 13:32
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.

to_pint_quantity breaks if value is None
2 participants