hcoopmeetbotlogic.meeting¶
Meeting state.
Module Contents¶
- class hcoopmeetbotlogic.meeting.EventType¶
-
Legal event types for TrackedEvent.
- START_MEETING = 'START_MEETING'¶
- END_MEETING = 'END_MEETING'¶
- ATTENDEE = 'ATTENDEE'¶
- MEETING_NAME = 'MEETING_NAME'¶
- TOPIC = 'TOPIC'¶
- ADD_CHAIR = 'ADD_CHAIR'¶
- REMOVE_CHAIR = 'REMOVE_CHAIR'¶
- TRACK_NICK = 'TRACK_NICK'¶
- UNDO = 'UNDO'¶
- SAVE_MEETING = 'SAVE_MEETING'¶
- MOTION = 'MOTION'¶
- VOTE = 'VOTE'¶
- ACCEPTED = 'ACCEPTED'¶
- INCONCLUSIVE = 'INCONCLUSIVE'¶
- FAILED = 'FAILED'¶
- ACTION = 'ACTION'¶
- INFO = 'INFO'¶
- IDEA = 'IDEA'¶
- HELP = 'HELP'¶
- LINK = 'LINK'¶
- class hcoopmeetbotlogic.meeting.TrackedMessage¶
A message tracked as part of a meeting.
- timestamp¶
Message timestamp in UTC
- Type:
datetime
- timestamp: datetime.datetime¶
- class hcoopmeetbotlogic.meeting.TrackedEvent¶
An event tracked as part of a meeting, always tied to a specific message.
- timestamp¶
Event timestamp in UTC
- Type:
datetime
- message¶
The message associated with the event
- Type:
- message: TrackedMessage¶
- timestamp: datetime.datetime¶
- class hcoopmeetbotlogic.meeting.Meeting¶
A meeting on a particular IRC channel.
The meeting can be serialized and deserialized to and from JSON. This is the mechanism we use to persist the raw log to disk. If you round trip the JSON (generate JSON and then use that JSON to create a new meeting), the resulting object contains data that is equivalent, but not exactly identical to, the original object. Each tracked event has an associated message. In the original object, the tracked event always refers to one of the message objects that is already in the messages list. When you deserialize from JSON, the object in the message list will be different than the one on the tracked event, although they will be equivalent by value. So, if you deserialize from JSON, it’s best to treat the resulting object as a read-only copy. The copy won’t always work exactly like a meeting that was created at runtime based on actual IRC traffic.
- nicks¶
IRC nick of anyone who contributed to the meeting or was explicitly called out
- Type:
List[str]
- start_time¶
Start time of the meeting in UTC
- Type:
datetime
- end_time¶
End time of the meeting in UTC, possibly None
- Type:
Optional[datetime]
- original_topic¶
The original topic assigned to the channel prior to starting the meeting
- Type:
Optional[str]
- messages¶
List of all messages tracked as part of the meeting
- Type:
List[TrackedMessage]
- events¶
List of all events tracked as part of the meeting
- Type:
List[TrackedEvent]
- start_time: datetime.datetime¶
- end_time: datetime.datetime | None = None¶
- messages: List[TrackedMessage]¶
- events: List[TrackedEvent]¶
- add_chair(nick: str, primary: bool = True) None ¶
Add a chair to a meeting, potentially making it the primary chair.
- remove_chair(nick: str) None ¶
Remove a chair from a meeting, ignoring requests to remove the founder.
- track_attendee(nick: str, alias: str | None = None) None ¶
Track an IRC nick as a meeting attendee, optionally assigning an alias.
- track_nick(nick: str, messages: int = 1) None ¶
Track an IRC nick, incrementing its count of messages as indicated
- track_message(message: hcoopmeetbotlogic.interface.Message) TrackedMessage ¶
Track a message associated with the meeting.
- track_event(event_type: EventType, message: TrackedMessage, operand: Any | None = None) TrackedEvent ¶
Track an event associated with a meeting.
- pop_event() TrackedEvent | None ¶
Pop the last tracked event off the list of events, if possible, returning the event.