catherder/classes.py
def update_from_smartsheet(self, prev, other, update_assignees=False,
                               suspend_progress_automation=False):
        r"""Return a version of the local data updated with data from the
        provided Smartsheet data dictionary.

        Args:
            prev (dict): Github data dictionary to update.
            other (dict): Smartsheet data dictionary to update from.
            update_assignees (bool, optional): If True, the assignees will
                include new assignees form the Smartsheet. If False, the
                assignees will only include those provided as an argument.
                Defaults to False.
            suspend_progress_automation (bool, optional): If True, the
                automation card for moving editted issues into the
                'In progress' column will be suspended. Defaults to False.

        Returns:
            dict: Updated version of prev.

        """
        map_milestones = {x['title']: x for x in prev['milestones']}
        map_issues = {x['title']: x for x in prev['issues']}
        # Update Github milestones from Smartsheet supporting objectives
        for x_sm in other.local_data['objectives']:
            x_gh = self.get_milestone_from_Smartsheet_objective(x_sm)
            y_gh = map_milestones.get(x_gh['title'], None)
            if y_gh is None:
                prev['milestones'].append(x_gh)
            else:
                y_gh.update(x_gh)
        # Update Github issues from Smartsheet milestones
        for x_sm in other.local_data['milestones']:
            x_gh = self.get_issue_from_Smartsheet_milestone(
                x_sm, update_assignees=update_assignees)
            y_gh = map_issues.get(x_gh['title'], None)
            if y_gh is None:
                prev['issues'].append(x_gh)
            else:
                existing = {}
                other.get_milestone_from_Github_issue(y_gh, existing=existing)
                x_gh = self.get_issue_from_Smartsheet_milestone(
                    x_sm, update_assignees=update_assignees, **existing)
                y_gh.update(x_gh)
        return prev
r"""Return a version of the local data updated with data from the
        provided Smartsheet data dictionary.

        Args:
            prev (dict): Github data dictionary to update.
            other (dict): Smartsheet data dictionary to update from.
            update_assignees (bool, optional): If True, the assignees will
                include new assignees form the Smartsheet. If False, the
                assignees will only include those provided as an argument.
                Defaults to False.
            suspend_progress_automation (bool, optional): If True, the
                automation card for moving editted issues into the
                'In progress' column will be suspended. Defaults to False.

        Returns:
            dict: Updated version of prev.

        
r"""Return a version of the local data updated with data from the
provided Smartsheet data dictionary.
r " " " Return a version of the local data updated with data from the provided Smartsheet data dictionary .
def update_from_smartsheet(self, prev, other, update_assignees=False,
                               suspend_progress_automation=False):
        map_milestones = {x['title']: x for x in prev['milestones']}
        map_issues = {x['title']: x for x in prev['issues']}
        for x_sm in other.local_data['objectives']:
            x_gh = self.get_milestone_from_Smartsheet_objective(x_sm)
            y_gh = map_milestones.get(x_gh['title'], None)
            if y_gh is None:
                prev['milestones'].append(x_gh)
            else:
                y_gh.update(x_gh)
        for x_sm in other.local_data['milestones']:
            x_gh = self.get_issue_from_Smartsheet_milestone(
                x_sm, update_assignees=update_assignees)
            y_gh = map_issues.get(x_gh['title'], None)
            if y_gh is None:
                prev['issues'].append(x_gh)
            else:
                existing = {}
                other.get_milestone_from_Github_issue(y_gh, existing=existing)
                x_gh = self.get_issue_from_Smartsheet_milestone(
                    x_sm, update_assignees=update_assignees, **existing)
                y_gh.update(x_gh)
        return prev
def update_from_smartsheet ( self , prev , other , update_assignees = False , suspend_progress_automation = False ) : map_milestones = { x [ 'title' ] : x for x in prev [ 'milestones' ] } map_issues = { x [ 'title' ] : x for x in prev [ 'issues' ] } for x_sm in other . local_data [ 'objectives' ] : x_gh = self . get_milestone_from_Smartsheet_objective ( x_sm ) y_gh = map_milestones . get ( x_gh [ 'title' ] , None ) if y_gh is None : prev [ 'milestones' ] . append ( x_gh ) else : y_gh . update ( x_gh ) for x_sm in other . local_data [ 'milestones' ] : x_gh = self . get_issue_from_Smartsheet_milestone ( x_sm , update_assignees = update_assignees ) y_gh = map_issues . get ( x_gh [ 'title' ] , None ) if y_gh is None : prev [ 'issues' ] . append ( x_gh ) else : existing = { } other . get_milestone_from_Github_issue ( y_gh , existing = existing ) x_gh = self . get_issue_from_Smartsheet_milestone ( x_sm , update_assignees = update_assignees , ** existing ) y_gh . update ( x_gh ) return prev
r"""Return a version of the local data updated with data from the
provided Smartsheet data dictionary.
r " " " Return a version of the local data updated with data from the provided Smartsheet data dictionary .
r"""Return a version of the local data updated with data from the
        provided Smartsheet data dictionary.

        Args:
            prev (dict): Github data dictionary to update.
            other (dict): Smartsheet data dictionary to update from.
            update_assignees (bool, optional): If True, the assignees will
                include new assignees form the Smartsheet. If False, the
                assignees will only include those provided as an argument.
                Defaults to False.
            suspend_progress_automation (bool, optional): If True, the
                automation card for moving editted issues into the
                'In progress' column will be suspended. Defaults to False.

        Returns:
            dict: Updated version of prev.

        """ # Update Github milestones from Smartsheet supporting objectives # Update Github issues from Smartsheet milestones
Updated version of prev.
Updated version of prev .
dict
self
prev
Github data dictionary to update.
Github data dictionary to update .
other
Smartsheet data dictionary to update from.
Smartsheet data dictionary to update from .
update_assignees
If True, the assignees will
include new assignees form the Smartsheet. If False, the
assignees will only include those provided as an argument.
Defaults to False.
If True the assignees will include new assignees form the Smartsheet . If False the assignees will only include those provided as an argument . Defaults to False .
suspend_progress_automation
If True, the
automation card for moving editted issues into the
'In progress' column will be suspended. Defaults to False.
If True the automation card for moving editted issues into the ' In progress ' column will be suspended . Defaults to False .