Skip to content
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

Add mapping from status type to human readable text #81

Closed
mfeurer opened this issue Oct 12, 2016 · 2 comments
Closed

Add mapping from status type to human readable text #81

mfeurer opened this issue Oct 12, 2016 · 2 comments
Assignees

Comments

@mfeurer
Copy link
Contributor

mfeurer commented Oct 12, 2016

Currently, the status is an integer between 1 and 5. It cannot be easily displayed to the user without explaining it. It would be helpful to add a mapping back to a human readable string, so that I can do:

>>> print(mapping[status])
Memout

In the course of implementing this, we could also start using the Enum class which was added in python3.4.

@mlindauer
Copy link
Contributor

Yes, very good idea to use Enum

@shukon
Copy link
Collaborator

shukon commented Jan 17, 2017

Enum affects the JSON-serialization. It is implemented in #151, using a customized JSON-Encoder. I assume, that the JSON-files are only ever read in by smac (more precise: the runhistory)?
mapping is realized by "status.name", which returns the status in human-readable form (-> "SUCCESS").

@shukon shukon self-assigned this Jan 17, 2017
mlindauer added a commit that referenced this issue Jan 20, 2017
CHANGE StatusType to Enum
@shukon shukon closed this as completed Feb 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants