Ejemplo n.º 1
0
        # Save the votes for posterity
        self.talks[self.idx]["votes"] = {"yay": yay, "nay": nay, "abstain": abstain}
        self.save_state()

    def handle_accept(self, channel):
        self._make_decision(channel, 'accepted', 'talk #{id} accepted, moves on to thunderdome.')

    def handle_reject(self, channel):
        self._make_decision(channel, 'rejected', 'talk #{id} rejected.')

    def handle_poster(self, channel):
        self._make_decision(channel, 'poster', 'talk #{id} rejected; suggest re-submission as poster.')

    def handle_table(self, channel):
        self._make_decision(channel, 'tabled', 'talk #{id} tabled, will be reviewed at a future meeting.')

    def _make_decision(self, channel, decision, message):
        self.clear_timer()
        talk = self.talks[self.idx]
        self.msg(channel, "=== Chair decision: %s ===" % message.format(**talk))
        self.talks[self.idx]["decision"] = decision
        self.save_state()

    def handle_rules(self, channel):
        """Remind participants where they can find the rules."""
        self.msg(channel, "Meeting rules: http://bit.ly/pycon-pc-rules")
        self.msg(channel, "Notes about process: http://bit.ly/pyon-pc-format")

if __name__ == "__main__":
    main(PyConReviewBot)
Ejemplo n.º 2
0
            group['decision'] = {}

        # Validate decision
        for t in talks:
            try:
                t = int(t)
            except ValueError:
                self.msg(channel, "Oops, %s isn't an int; action ignored." % t)
                return
            if t not in talk_ids:
                self.msg(channel, "Oops, %s isn't under discussion; action ignored" % t)
                return

        self.msg(channel, '=== Chair decision: %s %s ===' % (decision, ', '.join(talks)))

        # Remove each talk in question from any existing decisions, if needed,
        # then add the talk to the apropriate decision group.
        talks = map(int, talks)
        for t in talks:
            for d in group['decision'].values():
                try:
                    d.remove(t)
                except ValueError:
                    pass
            group['decision'].setdefault(decision, []).append(t)

        self.save_state()

if __name__ == "__main__":
    main(PyConThunderdomeBot)
Ejemplo n.º 3
0
            try:
                t = int(t)
            except ValueError:
                self.msg(channel, "Oops, %s isn't an int; action ignored." % t)
                return
            if t not in talk_ids:
                self.msg(channel,
                         "Oops, %s isn't under discussion; action ignored" % t)
                return

        self.msg(
            channel,
            '=== Chair decision: %s %s ===' % (decision, ', '.join(talks)))

        # Remove each talk in question from any existing decisions, if needed,
        # then add the talk to the apropriate decision group.
        talks = map(int, talks)
        for t in talks:
            for d in group['decision'].values():
                try:
                    d.remove(t)
                except ValueError:
                    pass
            group['decision'].setdefault(decision, []).append(t)

        self.save_state()


if __name__ == "__main__":
    main(PyConThunderdomeBot)