def generateTracksReport(): (trackLists, idListsTrack) = boards.getLists(conf.tracks_id) trackLabels = boards.getLabels(board_id) trackCardsObj = cards.Cards(trackLists, trackLabels) response.content_type = 'text/csv' return reports.trackReport(trackCardsObj)
def setupLists(): auth.require(role='admin', fail_redirect='/login.html') listDetails = boards.getListDetail(board_id) cardsObj.lists = boards.getLists(board_id) print(cardsObj.lists) return template('views/admin/setupLists.tpl', data=listDetails, decisionList=list(decisionMap.values()), user=auth.getUser(), role=auth.getRole())
def showIndex(): auth.require(fail_redirect='/login.html') user = auth.getUser() try: data = cardsObj.getCardsForUserFromBoard(user['id'], board_id) (lists, idLists) = boards.getLists(board_id) return template('views/showSubmissions.tpl', cardsJson=data, user=user, role=auth.getRole(), lists=idLists) except HTTPError as error: return showPermissionDenied(error)
from model import cards, boards from model.config import Config import yaml import sys def removeIfPresent(key, listsList): if key in listsList: listsList.remove(key) if __name__ == "__main__": conf = Config() board_id = conf.board_id (lists, idLists) = boards.getLists(board_id) labels = boards.getLabels(board_id) cardsObj = cards.Cards(lists, labels) listsToProcess = lists.keys() removeIfPresent('Rejected', listsToProcess) removeIfPresent('Reject', listsToProcess) removeIfPresent('Weak Reject', listsToProcess) acceptedCards = cardsObj.getCardsFromLists(listsToProcess) outputList = [] for card in acceptedCards: cardData = cardsObj.decodeCard(card) # Remove private submission related data:
def getCardsObj(): (lists, idLists) = boards.getLists(board_id) labels = boards.getLabels(board_id) return cards.Cards(lists, labels)