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

Improved number formatting #144

Merged
merged 9 commits into from
Nov 7, 2024
Merged

Conversation

robbievanleeuwen
Copy link
Owner

@robbievanleeuwen robbievanleeuwen commented Nov 3, 2024

print_results() and plotting methods now default to using engineering notation as output (thanks to quantiphy). The UnitDisplay class is also added to allow custom (and built-in) unit scaling, as well as printing the desired units next to numbers.

Closes #48.

Tasks:

  • Implement string_formatter() function with tests
  • Add UnitDisplay class
  • Add UnitDisplay tests
  • Modify print_results() to use string_formatter() and units
  • Apply custom number formatting and units to plots
  • Default unit
  • Update docs

@robbievanleeuwen robbievanleeuwen added the enhancement New feature or request label Nov 3, 2024
@robbievanleeuwen robbievanleeuwen self-assigned this Nov 3, 2024
@robbievanleeuwen robbievanleeuwen changed the title Floats in print_results() and plots now use engineering notation, number scaling options added Improved number formatting Nov 4, 2024
@robbievanleeuwen robbievanleeuwen added breaking Breaking Changes and removed enhancement New feature or request labels Nov 7, 2024
@robbievanleeuwen robbievanleeuwen marked this pull request as ready for review November 7, 2024 12:15
@robbievanleeuwen robbievanleeuwen merged commit 3cbe091 into master Nov 7, 2024
18 checks passed
@robbievanleeuwen robbievanleeuwen deleted the feature/print-results-scaling branch November 7, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking Changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add predefined unit scaling option to print_results methods
1 participant