Skip to content

Releases: connorferster/handcalcs

v1.11.0 - The "I shoulda done this a while ago" release

23 Jan 07:19

Choose a tag to compare

Features

  • Custom bracket functionality by @Dan-Ashby. Thank you, Dan!
  • I updated the default config file to less opinionated options because those opinionated options caused undesireable behaviour.
    • Line breaks are no longer "\\\\[10pt]" but are now simply "\\\\"
    • The latex block start/end are no longer "\\[" and "\\]", but simply "$$" and "$$"
    • These updates should enhance interoperability

What's Changed

New Contributors

Full Changelog: v1.10.0...v1.11.0

Re-release of v1.10.0 for GHA

03 Nov 20:25

Choose a tag to compare

Issued a release before I created a release branch 👎

See release notes for v1.10.0

v1.10.0 - The "Let's just ignore it" release

03 Nov 18:59
418ef71

Choose a tag to compare

Features

  • You can now add an # ignore comment to a line and it will not be rendered (Thanks @av-engineering!)

Fixes

  • NameError that occured if if statements with Python >= 3.13 is now fixed (#227)

Chores

  • A bunch of code clean-up: added a src tree (finally) and made some updates to CI

What's Changed

New Contributors

Full Changelog: v1.9.0...v1.10.0

v1.9.0

27 Jun 22:07

Choose a tag to compare

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

v1.8.0

16 Jun 05:59

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.7.1...v.1.8.0

v1.7.1

12 Jun 06:26

Choose a tag to compare

What's Changed

Full Changelog: v.1.7.0...v1.7.1

v1.7.0

10 Jun 20:41

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.6.0...v.1.7.0

v1.6.0

04 Jul 04:47
ae132f6

Choose a tag to compare

handcalcs v1.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

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.

%%render sci_not 5
a = 32.902939
b = 0.0923

image

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

02 Jun 05:23

Choose a tag to compare

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

handcalcs v1.5.0

21 May 15:23

Choose a tag to compare

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