Sciform

Latest version: v0.37.0

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

Scan your dependencies

Page 2 of 8

0.32.3

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

Added
^^^^^

* Added more PyPi classifiers.

0.32.2

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

Added
^^^^^

* Expanded the "Under Construction" section of the readme and the
"How to Contribute" section of the project page.
Changes included adding links to the ``sciform`` feedback survey.
* Added examples in the documentation demonstrating how ``sciform``
formatting can be mapped over collections of numbers.
[`120 <https://github.com/jagerber48/sciform/issues/120>`_]

Changed
^^^^^^^

* Refactor backend mode literal (used for typing) and enum (used
internally for tracking options) object names so that e.g.
``SignMode`` -> ``SignModeEnum`` and ``UserSignMode`` -> ``SignMode``.
[`111 <https://github.com/jagerber48/sciform/issues/111>`_]

----

0.32.0

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

Added
^^^^^

* Previously it was impossible to configure ``pdg_sig_figs=True``
together with ``ndigits!=AutoDigits``.
This combinations resulted in an exception.
Now behavior has been defined and implemented for this combination.
For single value formatting the value of ``pdg_sig_figs`` is always
ignored.
For value/uncertainty formatting ``ndigits`` is ignored if
``pdg_sig_figs=True``.
The behavior for ``pdg_sig_figs=False`` is unchanged.
[`73 <https://github.com/jagerber48/sciform/issues/73>`_]

Removed
^^^^^^^

* **[BREAKING]** Removed ``global_add_c_prefix``,
``global_add_small_si_prefixes``, ``global_add_ppth_form``,
``global_reset_si_prefixes``, ``global_reset_iec_prefixes``, and
``global_reset_parts_per_forms``.
These options are redundant with ``set_global_defaults`` and
``GlobalDefaultsContext`` and make the extra translations dictionaries
more confusing to understand.
[`97 <https://github.com/jagerber48/sciform/issues/97>`_]

Changed
^^^^^^^

* **[BREAKING]** Previously ``12.3`` would format as ``"12.3e+00"``
when using parts per formatting mode.
Now, when using parts per formatting mode, the ``e+00`` exponent is
translated to be an empty string so that ``12.3`` would format as
``"12.3"``.
[`99 <https://github.com/jagerber48/sciform/issues/99>`_]

----

0.31.1

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

Removed
^^^^^^^

* **[BREAKING]** Removed the ``SciNumUnc`` class. Now the ``SciNum``
class can be used with an optional second positional argument to
specify the uncertainty associated with a number.

* **[BREAKING]** Remove separator configuration from the FSML.
These options made the FSML to cumbersome and led to confusing
(if not incorrect) conflicts with the round mode symbol.
Now all separator configuration needs to be done by setting the
global format options or using the global format options context
manager.
[`29 <https://github.com/jagerber48/sciform/issues/29>`_]

Added
^^^^^

* Added annotated examples demonstrating the FSML.
* Added more documentation for contributing developers.
* Added `pre-commit <https://pre-commit.com/>`_ configuration.

Changed
^^^^^^^

* **[BREAKING]** Renamed multiple options.

* ``top_dig_place`` renamed to ``left_pad_dec_place``.
* ``superscript_exp`` renamed to ``superscript``.
* ``bracket_unc`` renamed to ``paren_uncertainty``.
* ``bracket_unc_remove_seps`` renamed to
``paren_uncertainty_separators``. This change is associated with a
a reversal of the Boolean logic on the option.
* ``val_unc_match_widths`` renamed to ``left_pad_matching``.
* ``unc_pm_whitespace`` renamed to ``pm_whitespace``.

* **[BREAKING]** Previously specifying any left pad decimal place using
the ``sciform`` FSML resulted in setting ``left_pad_matching=True`` so
that ``print(f"{SciNum(123.456, 0.789):0}")`` resulted in
``"123.456 ± 000.789"``.
Now the FSML has no impact on ``left_pad_matching``.
Now, similar to many other options, the global setting for
``left_pad_matching`` will always be used when formatting using the
FSML.
Under the default global options (``left_pad_matching=False``)
``print(f"{SciNum(123.456, 0.789):0}")`` results in
``"123.456 ± 0.789"``.
* Implemented `ruff <https://docs.astral.sh/ruff/>`_ linting and
formatting in codebase and integration automation.
* Refactored code for adding separators.
* Refactored formatting and formatting utilities to simplify functions
and make the algorithm easier to follow.
* More aggressively filter JetBrains ``.idea/`` folder from version control.

Fixed
^^^^^

* Fixed a bug involving removing separators in parentheses uncertainty
mode when at least one of the value and uncertainty were non-finite.

----

0.30.1

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

Fixed
^^^^^

* Fixed Changelog.

----

0.30.0

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

Changed
^^^^^^^

* **[BREAKING]** Remove the ``FormatOptions`` class from the user
interface. Now users configure ``Formatter`` instances by passing the
formatting keyword arguments into the ``Formatter`` constructor
directly. Global configuration via ``set_global_defaults()`` or the
``GlobalDefaultsContext`` is also done by passing formatting keywords
directly. This change reduces the amount of boilerplate code and
keystrokes needed to use ``sciform``.
* **[BREAKING]** Options such as ``exp_mode`` and ``exp_format`` were
previously configured using ``Enum`` objects such as ``ExpMode`` or
``ExpFormat``. Now these options are configured using string literals.
This change also reduces the amount of boilerplate code and keystrokes
needed to use ``sciform``.
* Clean up ``print_global_defaults`` output. This is the start of an
effort to improve interface for getting and printing current format
options.

Added
^^^^^

* Added code of conduct.
* Added contributing guidelines.
* Added Python 3.12 to automated testing.

Fixed
^^^^^

* Cleaned up API documentation.
* Fixed a bug where the ``repr`` for ``FormatOptions`` would return a
string containing information about the global format options rather
than about the specific ``FormatOptions`` instance.
[`75 <https://github.com/jagerber48/sciform/issues/75>`_]
* Fixed an issue that was causing Github actions code coverage report to
not actually check code coverage.
[`84 <https://github.com/jagerber48/sciform/issues/84>`_]

Removed
^^^^^^^

* **[BREAKING]** Removed the ``unicode_pm`` feature which allowed
toggling between using ``'+/-'`` or ``'±'`` in value/uncertainty
strings. Previously ``unicode_pm`` defaulted to ``False`` so that
``'+/-'`` was the default behavior. Now the default behavior is to use
``'±'`` and there is no way to change to the old ``'+/-'`` behavior.
[`10 <https://github.com/jagerber48/sciform/discussions/10>`_]

----

Page 2 of 8

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.