Handcalcs

Latest version: v1.9.0

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

Scan your dependencies

Page 2 of 2

1.1.0

I am excited to release this version of `handcalcs` today especially...because it's my birthday :) I am excited because there are lots of new features that I think you will enjoy using and I am eager to tell you about them:

Features

* __Localization__: Use the `%decimal_separator` line magic to change the decimal separator character from `.` to any character you like (except `_`), e.g. `%decimal_separator ,` to change the decimal separator to `,`. This will affect every cell in the notebook until it is changed. To change the decimal separator with the decorator interface, use `handcalc(dec_sep = ",")`. Thank you BTWS2 for this suggestion.
* __Complex numbers__: They now render in handcalcs.
* __Additional function rendering__: `ceil`, `floor`, and `log` functions are now swapped out for their proper notation (instead of as generic functions). Thank you jm4rc05 for this suggestion.
* __Auto scientific notation__: When working with floats that are small enough to get "cut-off" by the decimal precision setting when they are rendered out, they will automatically be rendered as scientific notation to the decimal precision specified to prevent loss of significant figures. Thank you jlopez1979 for this suggestion.
* __Render global namespace vars with decorator__: Previously, if you called a global variable from within a function decorated with `handcalc()`, it would not render because it was not defined in the function local namespace. Now, they render with no problem. Thank you michaellisitsa for bringing the issue up and eriknw for providing the fix with `innerscope` (so excellent).
* __Render sympy symbols__: Previously you could only render out expressions and equations. Now you can render out just your sympy symbols by using `%%render sympy symbolic`. Thank you to BTWS2 for pushing me on this.
* __Use other override tags with `sympy` override tag__: The `sympy` tag is special and does not need to be mutually exclusive from the other overrides. Now you can use `sympy symbolic`, `sympy long`, etc.

Fixes

* __Doc string in decorated function__: No longer causes errors. Thank you KingSiz3 for reporting this error.
* __Conditional expressions with override tags__: Works smoothly now. Thank you michaellisitsa for reporting this error.

I am excited to present v1.1.0 of handcalcs. Enjoy!

Get the new release from the repo or on pypi: `pip install handcalcs -U`

1.0.0

This is the first major release of `handcalcs`. Many new features have been added based feedback from users on Github and on /r/python. Thank you to everyone who has been using `handcalcs`. An extra big Thank You for everyone who has contributed by comments, issues, and PRs to help make it better.

New Features

* Breaking change: No more "comment tags", they are now called "override tags" and work as line arguments with the `%%render` magic, e.g. `%%render params` or `%%render long`, etc. When using the decorator interface, `override` is one of the arguments in the decorator, i.e. `handcalc(override = "params")`
* Display decimal precision can now be altered at the cell level, similar to an override tag, e.g. `%%render 6` will display all floats up to six decimal places. This can work with an override tag, i.e. `%%render long 8`. If a float has only three digits, such as `1.275` only `1.275` will be displayed, not `1.275000`, for example.
* Sympy integration is now included. `Sympy` with `handcalcs` is intended to be used separately but together. For example, you want to solve a polynomial equation in `Sympy` and then want to substitute values. Solve the polynomial in `Sympy` first, then when you would normally use `.subs()`, instead use `handcalcs` to calculate and render. See the updated README.md on Github for a demonstration.
* An entirely new parser means those extra brackets that were previously needed around fractions, e.g. `(b**2)/(sqrt(a + b))` are now unnecessary. Use brackets as you normally would, i.e. `b**2/sqrt(a+b`.
* Complex numbers are now supported (due to new parser)
* Scientific notation is now supported (due to new parser)
* Comparison operators in expressions now render properly
* Extraneous parentheses that would show up in fractions in certain contexts no longer happen.
* Function calls now only use parentheses when there is an expression or more than one argument being passed to the function
* Variable names that are longer than one character (not including subscripts) are now rendered as upright and not _italic_
* And more!

Feel free to raise additional issues for features you do not see yet (there are two not fully implemented yet: `ceil` and `floor` symbols and automatically switching to scientific notation for small physics constants (however you can now change the decimal precision as a short term fix)).

Thank you for all of the support everyone!

0.0923

![image](https://user-images.githubusercontent.com/38441489/177082768-214b6bf9-b3ed-4694-ad09-f28d5a649fd8.png)

NBConvert Exporters

Previously, there was a problem with the "noinput" exporters that come bundled with handcalcs. The "noinput" exporters would turn off inputs for both the regular exporters and the handcalcs exporters. This has been fixed. If you use Jupyter with different kernels, the controlling kernel for the exporters seems to be the "base" environment (if you use conda) so be sure to install `v1.6.0` into your base environment to have access to the udpated exporters (which have a slightly new name, e.g. "HTML_NoInput" instead of "HTML_noinput", etc._)

Bug Fixes

This release also fixes several bugs. Some of these are from the new global config feature but others were independent bugs.

Fixes:
* 125 (Double comments not working in 'long' setting)
* 121 (How to not use engineering notation)
* 114 (Commented line with comment at the end)
* 113 (Pint and siunitx)
* 111 (Broken output when using forallpeople)
* 101 97 (Provide options for subscripts; optionally disable subscripting)
* 90 ("psi" renders as a greek character)

Coming soon
* More tests for these new features (I am in a bit of a rush right now; lots on my plate)
* Official documentation

v.1.5.2
Patches an error in the previous release where the pyproject.toml file was improperly configured and prevented a successful install.

v.1.5.0
This update is to include changes added via PR that were (regrettably) not previously published to PyPI.

Big "Thank you!" to daradib and omouraenko for these:

* 103 - Fix: Round non-iterable objects with __len__ method
* 105 - Fix: Copy exporter attribute instead of modifying parent class
* 108 - Fix: Round sympy expressions and nested elements
* 119 - Fix: Rendering issues in VS Code

Page 2 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.