Metadata-Version: 2.1
Name: astar-utils
Version: 0.2.1
Summary: Contains commonly-used utilities for AstarVienna's projects.
Home-page: https://github.com/AstarVienna/astar-utils
License: GPL-3.0-or-later
Author: Fabian Haberhauer
Author-email: fabian.haberhauer@univie.ac.at
Maintainer: Fabian Haberhauer
Maintainer-email: fabian.haberhauer@univie.ac.at
Requires-Python: >=3.9,<4.0
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: Topic :: Utilities
Requires-Dist: colorama (>=0.4.6,<0.5.0)
Requires-Dist: more-itertools (>=10.1.0,<11.0.0)
Requires-Dist: pyyaml (>=6.0.1,<7.0.0)
Project-URL: Repository, https://github.com/AstarVienna/astar-utils
Description-Content-Type: text/markdown

# Astar Utils

[![Tests](https://github.com/AstarVienna/astar-utils/actions/workflows/tests.yml/badge.svg)](https://github.com/AstarVienna/astar-utils/actions/workflows/tests.yml)
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
![dev version](https://img.shields.io/badge/dynamic/toml?url=https%3A%2F%2Fraw.githubusercontent.com%2FAstarVienna%2Fastar-utils%2Fmain%2Fpyproject.toml&query=%24.tool.poetry.version&label=dev%20version&color=teal)

[![codecov](https://codecov.io/gh/AstarVienna/astar-utils/graph/badge.svg)](https://codecov.io/gh/AstarVienna/astar-utils)
[![PyPI - Version](https://img.shields.io/pypi/v/astar-utils)](https://pypi.org/project/astar-utils/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/astar-utils)

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)

This package is devloped and maintained by [Astar Vienna](https://github.com/AstarVienna) and contains commonly-used utilities for the group's projects to avoid both duplicating code and circular dependencies.

## Contents

The package currently contains the following public functions and classes:

- `NestedMapping`: a `dict`-like structure supporting !-style nested keys.
- `UniqueList`: a `list`-like structure with no duplicate elements and some convenient methods.
- `Badge` and subclasses: a family of custom markdown report badges. See docstring for details.
- `BadgeReport`: context manager for collection and generation of report badges. See docstring for details and usage.
- `get_logger()`: convenience function to get (or create) a logger with given `name` as a child of the universal `astar` logger.
- `get_astar_logger()`: convenience function to get (or create) a logger with the name `astar`, which serves as the root for all A*V packages and applications.

### Loggers module

- `loggers.ColoredFormatter`: a subclass of `logging.Formatter` to produce colored logging messages for console output.

## Dependencies

Dependencies are intentionally kept to a minimum for simplicity. Current dependencies are:

- `more-itertools`
- `pyyaml`

Version requirement for these dependencies can be found in the `pyproject.toml` file.

