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

Detailed Error Message for get_dimensionality() #1874

Merged

Conversation

tristannew
Copy link
Contributor

@tristannew tristannew commented Nov 8, 2023

This PR addresses the issue referenced above, it wraps self._dimensions[key] in a try - except block that provides a detailed error message which alerts the user that their key (or unit) does not exist in the UnitRegistrty.

@tristannew tristannew marked this pull request as draft November 8, 2023 12:42
@tristannew
Copy link
Contributor Author

I have added the necessary code and done a brief test in a .ipynb but very much open to any feedback and comments. Perhaps adding in an action the user might want to take, like adding their unit to the UnitRegistry?

@tristannew tristannew marked this pull request as ready for review November 9, 2023 09:19
Copy link

codspeed-hq bot commented Dec 3, 2023

CodSpeed Performance Report

Merging #1874 will not alter performance

Comparing tristannew:tristan/detailed_error_message (c6c95ba) with master (f9e139e)

Summary

✅ 439 untouched benchmarks

@andrewgsavage andrewgsavage merged commit 24dd237 into hgrecco:master May 12, 2024
1 check passed
@andrewgsavage
Copy link
Collaborator

looks good, thanks

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.

2 participants