Handcalcs

Latest version: v1.9.0

Safety actively analyzes 688587 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

32.902939

1.9.0

This is primarily a house-keeping release to prepare for handcalcs v2.0.

Changes
- Removes the nbconvert "no input" exporters from the package. These are now available as an optional install on handcalcs via `pip install "handcalcs[exporters]"`.
- This capability is useful to handcalcs but is not required for handcalcs to function.
- Having `nbconvert` as a dependency add a LOT of unnecessary dependencies to handcalcs, which is intended to be a fairly light-weight package.
- Exporters are now maintained at https://github.com/connorferster/nb-hideinputs

v.1.8.0
What's Changed
* Add var* versions of Greek letters by Ricyteach in https://github.com/connorferster/handcalcs/pull/196
* HandcalcsCallRecorder by connorferster in https://github.com/connorferster/handcalcs/pull/210

New Contributors
* Ricyteach made their first contribution in https://github.com/connorferster/handcalcs/pull/196

**Full Changelog**: https://github.com/connorferster/handcalcs/compare/v1.7.1...v.1.8.0

1.7.1

What's Changed
* fix: custom symbols not numerically substituting by connorferster in https://github.com/connorferster/handcalcs/pull/207


**Full Changelog**: https://github.com/connorferster/handcalcs/compare/v.1.7.0...v1.7.1

v.1.7.0
What's Changed
* Fix precision = 0 being ignored by `%%render` by icaroscherma in https://github.com/connorferster/handcalcs/pull/141
* handcalc decorator was not wrapping functions properly by connorferster in https://github.com/connorferster/handcalcs/pull/155
* Removed math env break by connorferster in https://github.com/connorferster/handcalcs/pull/159
* Features/custom symbols by connorferster in https://github.com/connorferster/handcalcs/pull/204
* Fixes/update for python312 by connorferster in https://github.com/connorferster/handcalcs/pull/197

New Contributors
* icaroscherma made their first contribution in https://github.com/connorferster/handcalcs/pull/141

**Full Changelog**: https://github.com/connorferster/handcalcs/compare/v1.6.0...v.1.7.0

1.6.0

This is a major new release for handcalcs and introduces the global configuration feature. This allows users to have control over several options of how handcalcs works. The configuration options, with their default values, are as follow:

* `decimal_separator = "."`
* `latex_block_start = "\\["`
* `latex_block_end = "\\]"`
* `math_environment_start = "aligned"`
* `math_environment_end = "aligned"`
* `line_break = "\\\\[10pt]"`
* `use_scientific_notation = False`
* `display_precision = 3`
* `underscore_subscripts = True`
* `greek_exclusions = []`
* `param_columns = 3`
* `preferred_string_formatter = "L"`

Config API

python
import handcalcs.render

handcalcs.set_option("display_precision", 4)
handcalcs.set_option("param_columns", 5)
handcalcs.set_option("line_break", "\\\\[20pt]")
handcalcs.set_option("greek_exclusions", ["psi"]) etc...

These changes now affect all cells rendered in the current session. If you want to permanently update the `config.json` file with these changes (so handcalcs will always load up with these options), you can then call `handcalcs.save_config()` and the changes will be saved.

The auto-complete in the `handcalcs.set_option()` function demonstrates which options are available and what values they take.

Scientific notation

Previously, handcalcs had a sketchy "guess" at determining if a value should be rendered in scientific notation to make it more readable. This behaviour has now been removed and requires the user to explicitly set whether scientific notation should be used. This can be set as a global option with `handcalcs.set_option('use_scientific_notation', True)` and it can also be toggled at the cell level with the new `sci_not` cell override command. If the global configuration is set to `True`, the toggle will turn scientific notation OFF in that cell. If the global configuration is set to `False`, the toggle will turn scientific notation ON in that cell.

python
%%render sci_not 5

1.4.0

This release has been long awaited!

The biggest news: handcalcs has FINALLY been updated to run on nbconvert v.6.0.0 and Jupyter Lab v3.0. Thanks to the contributions of JimZwartveld, there are new exporters available from the Jupyter File -> Export as... menu to export HTML, Latex, and PDF with input cells hidden.

Additionally, there is the ability to add text now in-between lines of math by using a `` (double pound sign) comment as per a request by theengineer on 82. To summarize:

* ` comment` on a new line will remain a Python comment and will not be rendered
* ` comment` on a new line will now display text in Latex
* ` comment` at the end of a calculation will render the comment in Latex in parentheses as usual

Next item on the handcalcs list, a proper documentation site on ReadtheDocs...

1.2.0

* Feature: `NumericCalcLine`: this is a new line type within handcalcs that recognizes when a calculation does not contain any variables, just numbers, and bypasses the substitution step since the "symbolic" step is just the numbers of the calculation. In other words, it avoids having a redundant substitution when you are not using variables.
* Bug fix: Decorator would not recognized doc strings properly when they were coded onto a single line. This lead handcalcs to treat the entire function source as being within the doc string and nothing would be rendered. Thank you michaellisitsa for your contribution and fixing this bug.
* Bug fix: Nested `log` and other functions, under certain circumstances, would render incorrectly because the nested functions were not recognized.

v.1.1.3
Thank you to michaellisitsa who for posting issues for handcalcs recently. This release fixes the following:

* Additional spaces around commas when used as decimal separators has now been removed
* A bug involving white space underneath `%%render params` causing the alignment to be affected has been fixed (52)
* Inconsistencies with some parentheses around deeply nested calculations that start with function names have been fixed (49)
* Parentheses fully enclosing a calculation was not creating a "parameter line" (no substitution); this is now fixed (51)
* A bug involving complex numbers being inappropriately rendered in scientific notation

Additionally, if anyone is using handcalcs in school or in their daily life, I have created issue 50 as a place people can showcase their rendered notebooks. I love seeing handcalcs being used so if you have something you would like to show off, please submit!

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.