-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logging utils no longer exported #550
Comments
Which ones in particular? |
dodal was using from ophyd_async.log import (
DEFAULT_DATE_FORMAT,
DEFAULT_FORMAT,
DEFAULT_LOG_COLORS,
ColoredFormatterWithDeviceName,
)
from ophyd_async.log import logger as ophyd_async_logger None of these are exported in 0.5.0 ophyd_async_logger was used to configure the logging level of ophyd-async and set it as part of a logging hierarchy |
@abbiemery any opinions? |
While I'm in this issue, other things that dodal was using but that are no longer private:
|
class ApertureConverter(SoftConverter):
# Ophyd-async #311 should add a default converter for dataclasses to do this
def reading(
self, value: SingleAperturePosition, timestamp: float, severity: int
) -> Reading:
return Reading(
value=asdict(value),
timestamp=timestamp,
alarm_severity=-1 if severity > 2 else severity,
) SoftConverter was being overriden to allow returning a SingleAperturePosition, a dataclass, which I believe would not actually be allowed as it's not returning one of the types allowed by DataKey? I can only assume this was required previously for it to work and it was working. @dataclass
class SingleAperturePosition:
name: str
GDA_name: str
radius_microns: float | None
location: ApertureFiveDimensionalLocation
|
@DominicOram says that for this individual use case "if it is causing pain, then it's ok to explode it out into multiple signals", which should mean you don't need |
No description provided.
The text was updated successfully, but these errors were encountered: