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

include status on graph #1

Open
schettino72 opened this issue Jul 8, 2018 · 1 comment
Open

include status on graph #1

schettino72 opened this issue Jul 8, 2018 · 1 comment

Comments

@schettino72
Copy link
Member

Show which tasks are up-to-date or not.

@gaulinmp
Copy link
Contributor

I wrote up a preliminary solution to showing status via color: https://github.com/gaulinmp/doit-graph/tree/uptodate-status.

The salient code:

uptodate_colors = {
    None: {'color':'chocolate4'},
    'up-to-date': {'color':'springgreen3'},
    'run': {'color':'firebrick1'},
    'ignore': {'color':'grey'},
}
# ...
def _execute(self, subtasks, reverse, horizontal, uptodate_status, outfile, pos_args=None):
#...
    if (uptodate_status):
        # Add the node attributes from the dictionary: uptodate_colors[status]
        # Using the **dict syntax allows for multiple attributes to be set at once
        status = self.dep_manager.get_status(task, self.tasks).status
        node_attrs.update(uptodate_colors[status])

If this looks acceptable, I can submit a pull request.

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

2 participants