You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to my knowledge, we could improve some data-structures & API's of Karabo:
Define common API-terminology used for variable-names through Karabo in a document and apply this on the repo.
Change all phase_center args to tuple[float, float] and unify signatures (e.g. not take ra-dec as separate args anywhere where both are needed). The reason is simply because a tuple can have a fixed length, where a list (or any Sequence) is not defined as strictly.
Add more kw-only args, especially to avoid boolean-trap anti-pattern. Usually, the first argument(s) are data and/or path args, which are not necessarily kw-only args. However, customization args for that particular data should be (as far as I know) kw-only to improve readability & maintainability (usually helps to be backward compatible) of code.
Introduce unit-suffix to unit-args if units are not base SI-unit, e.g. deg, arcsec, mhz, etc. if it's not a astropy.units.quantity.Quantity, but just int or float.
Adapt typing to accept also e.g. Sequence and not only list and/or tuple wherever it makes sense. This is also true for some other collections.abc types.
Support str and pathlib.Path as path input for user-api args. Our API currently is not consistent in this domain.
I'm sure there are other cases (e.g. list should be replaced with tuple to improve the data-structures and signatures of Karabo's API.
Probably the biggest change is to think about a Public API to get to v1.0.0. Expose each function/class/module which are public and prefix-underscore each non public function/class/module. This may also include some API changes itself. However, if this is a change which is too large, it can be done in a different PR. This would contribute to issue Karabo Versioning #614 .
The text was updated successfully, but these errors were encountered:
According to my knowledge, we could improve some data-structures & API's of Karabo:
phase_center
args totuple[float, float]
and unify signatures (e.g. not take ra-dec as separate args anywhere where both are needed). The reason is simply because a tuple can have a fixed length, where a list (or any Sequence) is not defined as strictly.SkyModel.setup_default_wcs phase_center
).deg
,arcsec
,mhz
, etc. if it's not aastropy.units.quantity.Quantity
, but just int or float.Sequence
and not onlylist
and/ortuple
wherever it makes sense. This is also true for some other collections.abc types.str
andpathlib.Path
as path input for user-api args. Our API currently is not consistent in this domain.list
should be replaced withtuple
to improve the data-structures and signatures of Karabo's API.The text was updated successfully, but these errors were encountered: