radiocosmology / alpenhorn

Alpenhorn is a service for managing an archive of scientific data.
MIT License
2 stars 1 forks source link

Various small fixes found during the cedar shakedown #168

Closed ketiltrout closed 1 year ago

ketiltrout commented 1 year ago

I don't think these are big enough to merit their own PRs:

fix(io): Add missing BaseGroupIO.set_storage()

Also:

The "set_storage" methods are called at the top of every update loop to replace the StorageNode/Group of the I/O classes. "update" was a very poor choice for their name because there are already too many things referred to as "update", and the name was always just going to lead to confusion.

(The erstwhile "update()" method was always called before the "before_update()" method, which is a pretty clear indication there's something wrong with the name.)

Require peewee >= 3.16.3 to avoid deprecation warning

Ported from https://github.com/chime-experiment/chimedb/pull/40

Don't let pathlib.Paths leak into run_command

run_command only accepts strings.

Make INFO the default log level everywhere

I get the idea of using {"level": "warning", "module_levels": {"alpenhorn": "info"}} as the logging config, but I think it's too confusing from a user point of view. By default, users are going to expect the top-level logging.level to set the logging level of alpenhorn itself. (Whereas, with the original config, it was setting the logging level of everything but alpenhorn).

Fix f-strings

... which were missing their leading-f.

Fix calcuation of StorageNode.get_total_gb()

It was returning MiB (2**20), instead of GiB (2**30).