Sciform

Latest version: v0.37.0

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

Scan your dependencies

Page 3 of 8

0.29.1

-------------------

Fixed
^^^^^

* Fixed a bug where bracket uncertainties erroneously appeared as
empty parentheses for zero or non-finite uncertainties.
[`66 <https://github.com/jagerber48/sciform/issues/66>`_]
* Fixed a bug where the exponent value was erroneously calculated
from the uncertainty rather than the value when the value was
negative (but larger in magnitude than the uncertainty).
[`68 <https://github.com/jagerber48/sciform/issues/68>`_]
* Fixed a bug where certain leading digits were erroneously not
stripped from the uncertainty when using bracket uncertainty with
negative values.
[`68 <https://github.com/jagerber48/sciform/issues/68>`_]
* Fixed a bug where the value was erroneously being rounded
according to the PDG rounding rules when ``pdg_sig_figs=True``,
the uncertainty was zero or non-finite, and the value was
positive. [`71 <https://github.com/jagerber48/sciform/issues/71>`_]
* Fixed a bug where a spurious error was raised when
``pdg_sig_figs=True``, the uncertainty was zero or non-finite, and
the value was zero or negative.
[`65 <https://github.com/jagerber48/sciform/issues/65>`_]

Changed
^^^^^^^

* Replace ``-e .`` with ``.`` in ``requirements.txt``. There is no need
to install ``sciform`` in editable mode for code automation routines.

----

0.29.0

-------------------

Changed
^^^^^^^

* Previously, when using ``bracket_unc=True`` with any exponent string
(such as ``e-06``, ``μ`` or ``ppm``), the value and uncertainty were
always wrapped in parentheses, e.g. ``(1.03(25))e-06``,
``(1.03(25)) μ`` or ``(1.03(25)) ppm``.
Now, when using ``bracket_unc=True`` with prefix or parts-per exponent
format modes, if the exponent is replaced with an alphabetic
replacement, then the value and uncertainty are no longer wrapped in
parentheses, e.g. ``1.03(25) μ`` and ``1.03(25) ppm``.
This is consistent with
`BIPM Guide Section 7.2.2 <https://www.bipm.org/documents/20126/2071204/JCGM_100_2008_E.pdf/cb0ef43f-baa5-11cf-3f85-4dcd86f77bd6#page=37>`_.
Specifically, any time ``bracket_unc=False`` the value and uncertainty
are always wrapped in parentheses, and any time notation like ``e+02``
or ``b+02`` is used to indicate the exponent then the value and
uncertainty are always wrapped in parentheses.

Fixed
^^^^^

* Correct ``fit_plot_with_sciform.py`` example script to use new
``exp_format=ExpFormat.PREFIX`` instead of old ``prefix_exp=True``.

Improved
^^^^^^^^

* Documentation improvements including typos and neatening up changelog.

----

0.28.2

-------------------

Improved
^^^^^^^^

* General wording and grammar improvements throughout documentation.
* Include more usage examples in the examples documentation in addition
to referring the reader to the test suite.

Fixed
^^^^^

* Fixed a bug when using ``pdg_sig_figs`` with uncertainties larger than
about 1000 by cleaning up ``Decimal`` math.
* Previously, when formatting using the format specification
mini-language, if the prefix exponent format flag was omitted then the
exponent format was forced to ``ExpFormat.STANDARD`` rather than
``None``.
This meant that it was impossible, using the format specification
mini-language combined with global configuration options, to set
``ExpFormat.PARTS_PER``.
Now when the prefix flag is omitted ``exp_format`` is set to ``None``
so that it will be populated by the global default option.
In the future a flag may be added to select "parts-per" formatting
using the format specification mini-language.

----

0.28.1

-------------------

* Make ``FormatOptions`` inputs ``Optional`` so that ``None`` inputs
pass type checks.
* Write format-specification mini-language documentation to refer to
existing format options documentation to avoid documentation
duplication.
* Setup test coverage analysis automation and upload report to
`codecov <https://codecov.io/gh/jagerber48/sciform>`_.
* Add package status badges to readme.
* Test against Python 3.11.
* List supported Python versions in ``pyproject.toml`` classifiers.

----

0.28.0

-------------------

* **[BREAKING]** Replace ``prefix_exp`` and ``parts_per_exp`` options
with an ``exp_format`` option which can be configured to
``ExpFormat.STANDARD``, ``ExpFormat.PREFIX`` or
``ExpFormat.PARTS_PER``.
* Previously formatting a non-finite number in percent mode would always
display a ``'%'`` symbol, e.g. ``'(nan)%'``.
Now the brackets and ``'%'`` symbol will be omitted unless
``nan_inf_exp=True``.
* In ``latex=True`` mode there is now a space between the number and a
prefix or parts-per translated exponent.
For value/uncertainty formatting the space is still absent.
For ``latex=False`` there is still always a space for number and
value/uncertainty formatting before the translated exponent string.
* In ``latex=True`` mode ``'nan'`` and ``'inf'`` strings are now wrapped
in ``'\text{}'``.
* Refactored code for resolving exponent strings.
* Added more unit tests to reach 100% test coverage. Mostly added test
cases for invalid internal inputs.
* Raise ``NotImplementedError`` when attempting value/uncertainty
formatting with binary exponent modes.
Rounding and truncating are not properly implemented in binary mode
yet.

----

0.27.4

-------------------

* Setup github action to automatically build and publish on release.

----

Page 3 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.