-
Notifications
You must be signed in to change notification settings - Fork 4
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
Configure colorama communicator via front-end yaml config file #91
Comments
Ok, looking back, this constant should probably be defined in Moreover, the way colors are now passed in the front-end -- via cli options -- is too complicated and not scalable. A better option would probably be to parse a yaml config file, if present. When creating a coloramacommunicator, the front-end could then pass on an optional color list to the |
Sounds good.
Agreed. I will work on this. |
I created a yaml config file. It's not yet used. Please import as follows: with open("kotnetcli.conf", "r") as f:
configuration = yaml.load(f)
print(configuration)
{'FAIL': 'red', 'style': 'bright', 'OK': 'green', 'institution': 'kuleuven', 'WAIT': 'yellow'} |
Ok, looking good. For clarity, we might want to adhere to a hierarchical syntax for communicator-specific options. e.g. ## colorama communicator-specific options
coloramac.OK: green
coloramac.WAIT: yellow
coloramac.FAIL: red
coloramac.style: bright |
I see what you mean. A problem with your proposal is that a user who wants to change the colours does not necessarily know what
|
Ok, apart from end-user convenience, we'll have to guard cohesion here. That is, ideally the front-end should not know too much about We might be able to use your idea of a |
Seems to be a built-in:
https://landscape.io/github/GijsTimmers/kotnetcli/14/modules/kotnetcli/communicator/fabriek.py#L50
We're probably better off using something else. Some suggestions:
DEFAULT_COLORAMA_COLOURS
(British spelling)COLORAMA_DEFAULT_COLORS
(Switch word order)The text was updated successfully, but these errors were encountered: