Skip to main content

General purpose utility library

Reason this release was yanked:

Wrong version number assigned

Project description

haggis

This is a library of general purpose utility functions and classes written in Python. Much of this code is intended to support the imprint project https://github.com/madphysicist/imprint. The modules of this library are more-or-less standalone utilities, organized by category.

This library contains plenty of code that relies on external programs and less common Pyhon libraries. The code is considered to be "extras", in the setuptools sense. Extras can be omitted without any modification to the python code. The following extras are supported:

  • [docx]: Support for docx file utilities requires python-docx to be installed.
  • [latex]: Supporting LaTeX requires a host of external programs to work properly, so this feature is optional. See the dependency page in the main documentation for more information.
  • [pdf]: Requires the poppler library to be installed.
  • [ps]: Requires GhostScript to be installed.
  • [plot]: Plotting tools require matplotlib, which is a heavy dependency, and unnecessary for many purposes.
  • [term]: Terminal colors work out of the box on Linux, but require the colorama library to work on Windows.
  • [scio]: Science I/O depends on the scipy and astropy libraries to deliver IDL and FITS file support, respectively.
  • [xlsx]: Support for xlsx file utilities requires openpyxl to be installed.

To install extras such as latex and pdf, do::

pip install haggis[latex,pdf]

See the documentation at https://haggis.readthedocs.io/en/latest for more information, including the API documentation.

This library in licensed under the AGPLv3, and compatible with later versions. You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Changelog

0.2.0 (2022-01-27)

  • New modules:
    • npy_util
    • tests.test_numbers
    • tests.test_objects
  • New functions and classes:
    • getsizeof, size_type_mapping in objects
    • ndarray_handler added to size_type_mapping in objects
    • isolate_dtype in npy_util
    • as_base, digit_count in numbers
  • New unit tests:
    • tests.test_objects.TestGetsizeof
    • tests.test_numbers.TestAsBase
    • tests.test_numbers.TestDigitCount
  • Added docs to sdist
  • Moved map_array, mask2runs, runs2mask from math to npy_util

0.1.1 (2022-01-16)

Minor updates to first release.

  • New functions and classes:
    • segment_distance in math
  • Bugfixes:
    • math.read_divide correctly handles scalar inputs
  • Created pytest configuration, added first set of unit tests
    • files.tests.test_csv
    • tests.test_math.TestSegmentDistance
  • Improved documentation with autosummary
  • Added this CHANGELOG to installed data

0.1 (2022-01-10)

First release.

  • New modules
    • time
    • files.ui
  • New functions and classes:
    • json_registry made public in configuration
    • semilogx_base, semilogy_base, loglog_base in mpl_util
    • map_array, rms in math
    • split_extension in files
  • API changes:
    • string_util.timestamp moved to time
    • Added mask2runs and runs2mask to math
    • Improvements to NumpyObject in configuration
    • Improvements to copy_func in objects
    • Added n argument to insert_suffix in files
  • Bufixes:
    • mpl_util.show_extents axis confusion
    • Broken imports in submodules
  • Officially supporting Python versions up to 3.10
  • README -> README.md so GitHub can pick it up

0.1a2 (2021-01-09)

Second alpha release.

  • Major additions to API
  • New modules:
    • threads
    • configuration
    • structures
    • mapping
    • ctypes_util
  • New functions and classes:
    • CloseableMixin in recipes
    • to_hex, camel2snake, snake2camel, timestamp in string_util
    • set_labels in mpl_utils
    • real_divide, threshold, ang_diff_* in math
  • API changes:
    • Moved half of recipes to mapping
    • Updated Namespace, (in mapping), added setdefaults

0.1a1 (2021-04-03)

First alpha release.

  • API changes:
    • SentinelType made public in root package
    • ensure_extension.modes renamed to ensure_exntension.policies in files

0.1a1.dev2 (2019-03-31)

Second development pre-release.

  • Major overhaul of documentation

0.1a1.dev1 (2019-03-20)

First development pre-release.

  • First release on PyPI.
  • Created Read the Docs pages.
  • Only code required for imprint present initially.
  • Documentation 90% complete.
  • No tests worth speaking of.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

haggis-0.2.1rc1.tar.gz (146.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

haggis-0.2.1rc1-py3-none-any.whl (184.7 kB view details)

Uploaded Python 3

File details

Details for the file haggis-0.2.1rc1.tar.gz.

File metadata

  • Download URL: haggis-0.2.1rc1.tar.gz
  • Upload date:
  • Size: 146.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.10.2

File hashes

Hashes for haggis-0.2.1rc1.tar.gz
Algorithm Hash digest
SHA256 661115e08df539ccea93a0a90f4cf47e9f05211aeef5a33e82bb65d59119f1c3
MD5 94492759f5a03d29ebda0f6c167d576c
BLAKE2b-256 f13a75c8fb58da51629e7dca0a4ca3f328e08a2dbc2f9a84260f3bf146164403

See more details on using hashes here.

File details

Details for the file haggis-0.2.1rc1-py3-none-any.whl.

File metadata

  • Download URL: haggis-0.2.1rc1-py3-none-any.whl
  • Upload date:
  • Size: 184.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.10.2

File hashes

Hashes for haggis-0.2.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 be1414001cd7d52f320f01b22442822843cb41e6066658caa95158deb8b6e6f6
MD5 e9d5b29e5ccc5583b5b65d36ba576782
BLAKE2b-256 8b0f86ff82aa8434e19962d84b91fbd840b75edf5dcb0b79fe15d66a2c3890bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page