This package is devloped and maintained by Astar Vienna and contains commonly-used utilities for the group's projects to avoid both duplicating code and circular dependencies.
The package currently contains the following public functions and classes:
NestedMapping: adict-like structure supporting !-style nested keys.RecursiveNestedMapping: a subclass ofNestedMappingalso supporting keys that reference other !-style keys.NestedChainMap: a subclass ofcollections.ChainMapsupporting instances ofRecursiveNestedMappingas levels and referencing !-style keys across chain map levels.is_bangkey(): simple convenience function to check if something is a !-style key.is_nested_mapping(): convenience function to check if something is a mapping containing a least one other mapping as a value.UniqueList: alist-like structure with no duplicate elements and some convenient methods.Badgeand 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 givennameas a child of the universalastarlogger.get_astar_logger(): convenience function to get (or create) a logger with the nameastar, which serves as the root for all A*V packages and applications.SpectralType: a class to parse, store and compare spectral type designations.
loggers.ColoredFormatter: a subclass oflogging.Formatterto produce colored logging messages for console output.
Dependencies are intentionally kept to a minimum for simplicity. Current dependencies are:
more-itertoolspyyaml
Version requirement for these dependencies can be found in the pyproject.toml file.