Skip to content

Commit

Permalink
Add more todo notes (one related to plum resolver)
Browse files Browse the repository at this point in the history
  • Loading branch information
Splines committed Mar 23, 2024
1 parent f02f580 commit e070e84
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
- how to use the unit string. explain that strings from `siunitx` can be passed in, e.g. `\cm \per \N` etc. Explain how python raw strings can help, e.g. `r"\cm \per \N"` instead of having to do `\\cm` etc. all the time. However, `r'\\tesla'` will fail as the double backslash is treated a raw string and not as an escape character. Use `r'\tesla'` instead.
- possible ways to print a result. Recommended: activate `print_auto`. Other way: call `print()` on result object. Users can also call `resVariable.to_latex_str()` to retrieve the LaTeX representation. This can be useful to plot the result in a matplotlib figure, e.g. the fit parameter of a curve fit.
- Suggest some good initial configuration for Jupyter notebook, e.g. `print_auto=True` and `ignore_result_overwrite=True`.
- Naming: we call it "uncertainty". Give a hint that others might also call it "error" interchangeably.

## Other

- Setup issue template and contribution guide. Clean up `DEVELOPMENT.md`.
- Long-term: Ask real users what they really need in the scientific day-to-day life, see [here](https://github.com/paul019/ResultWizard/issues/9).
- If user enters an uncertainty of `0.0`, don't just issue warning "Uncertainty must be positive", but also give a hint that the user might want to use a different caller syntax for `res` which does not even have the uncertainty as argument.
4 changes: 4 additions & 0 deletions tests/playground.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
wiz.res("j", 0.009, None, None, 2)
# wiz.res("k", 1.55, 0.0, r"\tesla") # -> uncertainty must be positive

# wiz.res("k", 3, 1, r"\tesla") # -> plum: Could not be resolved
# TODO: Find out if one can adjust the plum.resolver.NotFoundLookupError such that
# we can give better hints, e.g. "you cannot pass in value and uncertainty as integers"

# wiz.res("g", 1.0, sys=0.01, stat=0.02, unit=r"\mm").print()
# g: (1.0 ± 0.01 sys ± 0.02 stat) \mm
# TODO: Why does this not work?
Expand Down

0 comments on commit e070e84

Please sign in to comment.