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

35 improve doc strings #48

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

35 improve doc strings #48

wants to merge 28 commits into from

Conversation

dtabell
Copy link
Collaborator

@dtabell dtabell commented Sep 9, 2024

In addition to clarifying many of the docstrings—especially the direction in
which the conversion factor operates—I have extended the dictionary of SI
prefixes, fixed a bug (typo) in the nano prefix, improved the output formatting
of printunits(), and reformatted some of the code.

I think we can close this issue for now. Further work on the docstrings can
happen as we transition to the use of Unitful.

* concatenate doc strings with trailing name
* insert blank lines to improve readability
Fit text within reasonable screen width.
  -delete trailing spaces
  -reformat ouput of Base.print for {T<:Unit}
  -correct mass unit string in printunits()
  -reformat the code for initializing the different systems of units
I am temporarily exportting those elements
so as to more easily debug their docstrings.
Following our discussion about moving to Unitful,
I am suspending this effort for now.
@DavidSagan
Copy link
Member

Did a quick look and things look good. @lllx125 @rot4te I have assigned you to review this. There needs to be a discussion as to what the procedure is in the future.

This should allow the expression :(eV/c^2) to parse correctly.
@dtabell
Copy link
Collaborator Author

dtabell commented Sep 9, 2024

I amended the Unit dictionary so that the tests now all pass.
But the switch to Unitful may necessitate a complete rewrite.

@@ -1,47 +1,57 @@

# include("PhysicalConstants.jl")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Includes should be suppressed in the release version, as repeated includes cause errors and everything is included directly in AtomicAndPhysicalConstants.jl

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.

3 participants