toonarmycaptain / dionysus

Student avatar score chart generator
GNU Affero General Public License v3.0
9 stars 13 forks source link

Use a class and decorators for configuration #93

Open toonarmycaptain opened 5 years ago

toonarmycaptain commented 5 years ago

Might a better method for handling configuration and path data be to implement a class with @property attributes and @x.setter functions for those that may change dynamically (eg user default save paths).

https://pabloariasal.github.io/2018/11/25/python-descriptors/ https://www.hackerearth.com/practice/notes/samarthbhargav/a-design-pattern-for-configuration-management-in-python/

toonarmycaptain commented 5 years ago

GitMate.io thinks possibly related issues are https://github.com/toonarmycaptain/dionysus/issues/14 (Settle on class data format), https://github.com/toonarmycaptain/dionysus/issues/92 (Decouple class functions from UI), https://github.com/toonarmycaptain/dionysus/issues/86 (Use DataFolder for all data paths.), https://github.com/toonarmycaptain/dionysus/issues/15 (Edit class dialogue and logic), and https://github.com/toonarmycaptain/dionysus/issues/10 (Use pathlib for filepaths).