ortk95 / planetmapper

PlanetMapper: An open source Python package for visualising, navigating and mapping Solar System observations
https://planetmapper.readthedocs.io
MIT License
10 stars 1 forks source link

Improve `repr` for customised objects #351

Closed ortk95 closed 3 months ago

ortk95 commented 4 months ago

Inspired by #350, objects with non default kwarg arguments should have this reflected in their repr (and maybe str?) representations.

Could probably implement this by e.g. defining a dict of default kwarg values for each class, then populating the repr with key=value pairs for any that are not the default values. This would maintain the simplicity for most objects, while keeping the information content for customised objects.

ortk95 commented 3 months ago

Done most of the implementation in 5f0a38b - 12d52c3. Still need to: