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

Use Pint for units #21

Closed
garryod opened this issue Sep 27, 2021 · 7 comments
Closed

Use Pint for units #21

garryod opened this issue Sep 27, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@garryod
Copy link
Member

garryod commented Sep 27, 2021

During the previous project we discussed using the Pint package to provide units for signals sent between simulation components. Was just reminded of this when a question of units was raised in #19. Are our thoughts that this is still worth implementing @thomascobb @callumforrester?

@garryod garryod added enhancement New feature or request help wanted Extra attention is needed labels Sep 27, 2021
@garryod garryod self-assigned this Sep 27, 2021
@callumforrester
Copy link
Contributor

I believe the most recent verdict was that it was a good idea for physical quantities but should not be mandated for everything. For example, zebra/panda blocks should send each other booleans rather than voltages.

@garryod
Copy link
Member Author

garryod commented Sep 27, 2021

Yeah, I think we should use it in the included devices and strongly suggest that others do too, but don't enforce it in any way, shape or form.

@collang collang self-assigned this Nov 16, 2021
@collang
Copy link
Collaborator

collang commented Nov 16, 2021

I'll try this out using Cryostream as a test case for now.

@thomascobb
Copy link
Contributor

This was posted by the bluesky developers recently as something to look at: https://pypi.org/project/forallpeople/

I haven't actually looked at it so don't know if its worth looking at

@collang
Copy link
Collaborator

collang commented Nov 16, 2021

From a glance I can't see much different from Pint, although it seems like a much less mature project -- Pint has been going since 2012.

@collang
Copy link
Collaborator

collang commented Nov 16, 2021

I would say my slight reservation about using Pint right now is that they have not yet implemented type annotation (edit: apart from using generic 'Quantity' annotations) (see: hgrecco/pint#1166) although it seems like they're not far off.

@abbiemery
Copy link
Collaborator

Closing this as devices have since moved and therefore it is no longer relevant. If units are desired going forward please raise it again on tickit-devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants