- Update
python-json-logger
to 3.2.1 to silence warnings about module deprecation.
- Allow to define a default value for environment variables in the configuration file. If a value is defined as
${ENVAR|default_value}
, the environment variableENVAR
will be used if it exists, otherwisedefault_value
will be used. - Updated workflows and moved from Poetry to
uv
for dependency management.
- #52 Add basic support for
GatheringTaskGroup
for Python versions 3.10 and below.
- Fixed import of
GatheringTaskGroup
for Python < 3.11.
- Added
GatheringTaskGroup
class that extends the functionality ofasyncio.TaskGroup
.
1.7.1 - 2024-07-02
- Support Numpy 2 (this only affects the
yanny
module). - Read yanny text columns as unicode.
1.7.0 - 2024-06-26
- Remove
astropy
as a dependency.yanny
will work withoutastropy
except for a couple astropy-specific functions that require it, for which an exception will be raised.
1.6.1 - 2023-12-17
- Fix docstring in vendorised
yanny
module that caused warning on import.
1.6.0 - 2023-12-13
- #46 Added several small utilities:
Timer()
(already existed, but mentioning for completeness): a context manager to determine the duration of the task executed between__enter__
and__exit__
.get_temporary_file_path()
: returns a valid temporary named path.run_in_executor()
: simple wrapper aroundasyncio
run_in_executor
that allows to usethread
orprocess
pool executors and handles arguments and keyword arguments.cancel_task()
: cancels a task, suppressing theCancelledError
.
1.5.5 - 2023-12-10
- Relax
astropy
andnumpy
requirements.
1.5.4 - 2023-12-10
- Fix unpickling of
Configuration
instances. This only seems relevant when trying to pass aConfiguration
object to amultiprocessing
callback.
1.5.3 - 2023-12-08
- Vendorise
pydl
'syanny
module which can be accessed assdsstools.yanny
.
1.5.2 - 2023-11-30
- Allow periods in
RecursiveDict
assignments but treat them as normal dictionary keys. - Allow retrieving keys with periods in a
RecursiveDict
if they match an existing key.
1.5.1 - 2023-11-30
- Fixed an issue assigning dictionaries caused by returning nested dictionaries in a
RecursiveDict
andRecursiveDict
instances. This has been fixed by doing the conversion at assignment time. A keyword argument,propagate_type
, allows to disable that behaviour.
1.5.0 - 2023-11-29 [yanked]
- #44 If
RecursiveDict
orConfiguration
return a dictionary, the dictionary is itself aRecursiveDict
orConfiguration
object. - #45 Add support for Python 3.12.
1.4.0 - 2023-11-16
- Add support for outputting log file in JSON format, via new options in
start_file_logger
.
1.3.2 - 2023-11-10
- Better typing for
RecursiveDict
.
1.3.1 - 2023-11-10
- Improved typing for
read_yaml_file
.
1.3.0 - 2023-11-09
- #40 Additional options to
start_file_logger
for theTimedRotatingFileHandler
. - #41
Configuration
now supports a recursive getter (e.g.,config['a.b.c']
).
1.2.3 - 2023-08-25
- Store
rich
console instance when passing it to handler. - Simplify exception handling override code.
- Handle exceptions and log them even within IPython.
- Add option to not capture exceptions in logger.
1.2.2 - 2023-08-25
- Ensure that logging to file happens with rich handler.
1.2.1 - 2023-08-25
- Improve logging with
rich
and do not use custon exception hook withRichHandler
. - Lint using
ruff
.
1.2.0 - 2023-08-21
- #36 Add the option to use a
RichHandler
handler for console logging instead of the defaultStreamHandler
. This can be enabled by passinguse_rich_handler
toget_logger()
. For now this is not the default but it may become so in a future version. - Update
invoke
to 2.1.3.
1.1.0 - 2023-06-18
- #35 Add support to reload a
Configuration
. If the configuration is based on files on disk and those have changed, the files will be read again. - Add the option to print the time of a log message in
StreamFormatter
by doinglog.sh.formatter.print_time = True
.
1.0.2 - 2022-12-27
- Do not fail CLI if the root of the package cannot be found.
1.0.1 - 2022-12-27
- Monkeypatch
invoke
to work with Python 3.10+ (see this issue).
1.0.0 - 2022-12-27
- Python 3.6 and 3.7 are not supported anymore.
- Removed the vendorised copy of
releases
.releases
is not maintained anymore and should probably not be used. If you want to continue using it, use0.5.4
or the normal installation ofreleases
. - Full support for Python 3.11.
0.5.4 - 2022-12-27
- Add
.pytest_cache
and.nox
to directories removed bysdss clean
. - Add a new task
sdss sjd
that returns the current SJD.
0.5.3 - 2022-09-08
- Fix annoying extra printout in
get_sjd()
.
0.5.2 - 2022-06-05
- Fix
get_sjd()
which used the current time instead of UTC time, and had an additionalint()
which screwed up the calculation.
0.5.1 - 2022-06-04
- Fix the case of YAML files with multiple environment variable substitution or in which the environment variable was not at the beginning of the string.
0.5.0 - 2022-04-25
- Added a
time
module with aget_sjd()
function that returns the SDSS-style Modified Julian Day for an observatory.
0.4.15 - 2022-04-21
- Feature #30: Pass optional
fmt
on to stream formatter. - Remove use of future typing annotations to continue supporting Python 3.6.
- Add GitHub Actions testing for Python 3.9 and 3.10.
0.4.14 - 2022-02-22
- Relaxed
packaging
to prevent issues with other packages.
0.4.13 - 2021-08-14
- Make
daemonocle
a required dependency. - Add
daemonize
CLI script.
0.4.12 - 2021-08-13
- Do not redirect output to log in
DaemonGroup
if we are running in debug mode.
0.4.11 - 2021-08-12
- Support: allow
pid_file
orpidfile
inDeamonGroup
(pid_file
is recommended since it's the one supported bydaemonocle
). - Allow to set a global log file in
DaemonGroup
and implement log rotation.
0.4.10 - 2021-03-24
- Bug: force use of real path for the logger file handler path.
- Feature #28: report base config file in
Configuration
. Clear theConfiguration
internal dictionary whenload
is called.
0.4.9 - 2021-02-24
- Support: relax dependency on
importlib_metadata
.
0.4.8 - 2021-02-13
- Feature #26: allow rollover of file logger on
start_file_logger
. - Support: format using
black
and add type hints.
0.4.7 - 2021-02-12
- Bug #24: update dependencies so that
importlib_metadata
is installed for Python<=3.7 (it was Python<3.7).
0.4.6 - 2021-01-21
- Do not remove
name
from the parameters inDaemonGroup
that are passed toclick.Group
. This madeDaemonGroup
fail withdaemonocle>=1.1.0
in which the signature ofDaemon
includes a new parametername
.
0.4.5 - 2020-11-10
- Bug #22: fix
read_yaml
for empty YAML files.
0.4.4 - 2020-11-05
- Support #20: discontinue use of
pkg_resources
due to its long import time. Movesdsstools._vendor.releases
tosdsstools.releases
to avoid having to load it on import.
0.4.3 - 2020-10-31
- Added
Timer
context manager utility. - Calling
SDSSLogger.set_level
now also sets the level of any warnings handler already present. - Do not create a logger at the top level of the package.
- New option
--log
when starting a daemon, that will redirect stdout and stderr to a log file.
0.4.2 - 2020-08-19
- Better support for asyncio exception handling.
0.4.1 - 2020-08-09
- Add signal handler for CLI coroutines.
- Allow to run coroutines in debug mode with the
cli_coro
decorator.
0.4.0 - 2020-08-07
- Feature #15: add a CLI wrapper to create Unix daemons.
0.3.1 - 2020-08-01
- Remove a leftover print statement in the logger.
0.3.0 - 2020-08-01
- Support #4: include
dev
extras in default installation. - Feature #7: add support for a tag
!extends
in YAML files when read withread_yaml_file
. - Bug #8: log
StreamHandler
tostderr
when the record level isERROR
or greater. - Support #11: replaced
colored_formatter
with a propperFormatter
and added tests for logging. - Support #12: move
color_print
tosdsstools._vendor
.
0.2.1 - 2020-07-30
- Store configuration file loaded in
Configuration
asConfiguration.CONFIG_FILE
. - Improve logging of exceptions to the stream logger.
0.2.0 - 2020-07-29
- Feature #5:
get_config
now returns an instance ofConfiguration
, which can also be used at a lower level.Configuration
stores the base configuration if it was specified, and can be used to load a new configuration file dynamically. SinceConfiguration
subclasses from a dictionary and the functionality inget_config
has not changed, this should be a non-breaking change. - Support: added initial framework for tests and tests with 98% coverage for
configuration.py
. - Support: add GitHub workflows for linting and testing.
0.1.12 - 2020-07-16
- Prefer
pyproject.toml
orsetup.cfg
over package metadata to retrieve module version.
0.1.11 - 2020-07-07
TimedRotatingFileHandler
does not acceptmode
.
0.1.10 - 2020-06-24
- Option to normalise the version string to PEP 440 by passing
pep_440=True
toget_package_version
.
0.1.9 - 2020-05-13
- Test several user configuration paths:
~/.config/sdss/<NAME>.y(a)ml
,~/.config/sdss/<NAME>/<NAME>.y(a)ml
, and~/.<NAME>/<NAME>.y(a)ml
.
- Handle case where log header is None.
- Use
get_config
when there is not a parent package.
0.1.8 - 2020-05-01
- Allow to set a header string in the logger that gets prepended to every message.
- Allow to start the file logger with a
FileHandler
, and pass the file mode.
- Configuration default path is now
~/.config/sdss/<NAME>/<NAME>.yaml
.
0.1.7 - 2020-04-14
- Set minimum Python version to 3.6. Add
six
dependency.
0.1.6 - 2020-03-31
- Missing
docutils
dependency, needed by releases.
0.1.5 - 2020-01-23
- Better implementation of
SDSSLogger.asyncio_exception_handler
.
0.1.4 - 2020-01-23
- Added
SDSSLogger.asyncio_exception_handler
to report loop exceptions to the logger.
0.1.3 - 2020-01-14
- One call to
PyYAML
was still usingload
instead ofsafe_load
. read_yaml_file
also accepts a file-like object.
0.1.2 - 2019-12-31
- The default target for the docs was pointing to
docs/sphinx/_build
instead ofdocs/sphinx
.
0.1.1 - 2019-12-31
sdss deploy
now also builds a wheel.twine
andwheel
dev dependencies forsdss deploy
.- Added a version of releases
- Bundle
toml
in_vendor
instead ofpytoml
, which is deprecated.
0.1.0 - 2019-12-30
- Logging tools.
- Metadata and version finding tools.
- Command line interface (wrapper around tasks).
- Configuration tools.