Coder Social home page Coder Social logo

pronovic / hcoop-meetbot Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 725 KB

Plugin for Limnoria to help run IRC meetings

License: Apache License 2.0

Shell 9.61% Python 88.28% HTML 2.11%
irc limnoria-plugin meetings-automation python python3 supybot-plugin

hcoop-meetbot's People

Contributors

pronovic avatar

Watchers

 avatar

Forkers

danshearer

hcoop-meetbot's Issues

Nicks or aliases containing regex special characters sometimes can't be identified in #action statements

If you use a nick or assign an alias that contains any regular expression special characters, it may not always be possible to identify actions associated with that nick. For instance, a nick k[n generally can be identified, but not [ken or ken] or [ken]. This is because the special characters [ or ] occur on a regular expression word boundary.

For the time being, the only workaround is to have participants set a simpler alias that is easier to identify (i.e. nick [m] use #here m). However, we do need a longer-term fix, since we learned in issue #20 that nicks that come over through the Matrix IRC bridge often have the form [m].

I wanted to release v0.5.2 with an immediate bug fix for issue #20, and it didn't seem like there was a quick fix for this problem, so I didn't try to address it in PR #21. I am not sure whether I can fix this with a more sophisticated regular expression, or whether I need to build some sort of tokenization mechanism and look for matches in a tokenized string. Either way, I think that I need to refactor out the matching logic used by _attendee_actions(), so it can be unit tested more completely without having to do a bunch of setup logic for a meeting.

Collect attendees at the top of minutes

At present if an attendee issues the command #here that is recorded as attendance, but otherwise treated in the minutes like any other communication command. That is an incorrect classification, because attendance is administrative, and the code already has a way of handling administrative items.

I propose:

  1. In writer.py add EventType.ATTENDEE to _EXCLUDED[]

  2. In templates/minutes.html, copy the block generated by <li py:for="attendee in minutes.attendees"> to the Prologue, or just before the Prologue.

The advantages of this change are:

  • It doesn't matter when someone says "#here", or if they say it multiple times.
  • The attendee list is at the top of minutes, where they are normally expected to be.
  • It can be very useful (and an improvement on traditional meeting minutes) if you know before reading the body of the minutes who has contributed how many lines.

This additional tiny change would also be good:

  • add a percentage next to the linecount for each attendee. This improves the value of the linecount as a team dymanics metric: who is talking the most? Is everyone getting a fair go?

I'm not quite at the "generate a PR" stage because I don't know how to do testing. But I might get there :-)

Deep link for actions

Thanks for the meetbot. We're using it in LumoSQL as per our Meetbot HOWTO.

The most important outcome of a meeting is usually the action items. How about each action item have a unique link so that it is possible to point to individual action items forever after?

For example we might say in conversation:

     I had a thought about Sally's action  
   [from the last meeting](https://example.org/meetings/meeting-2022-01-02.html#sally-action-item1)
    and I think we can make it easier....

Thanks,

Dan

Inelegant (but seemingly safe) handling of No Space Left on Device

I typed #endmeeting, and nothing happened. And once more, still nothing happened.

I went to the tmux session and saw the following exceptions saying "No space left". I freed some space, and tried #endmeeting again, and it seems like everything then worked perfectly. Which is great!

AttributeError: 'AtomicFile' object has no attribute '_fd'                                                                                                                            
No space left on device, cannot flush log.                                                                                                                                            
ERROR 2022-07-21T22:56:05 Uncaught exception in flusher #2 (<bound method UsersDictionary.flush of <supybot.ircdb.UsersDictionary object at 0x7f674df42180>>):                        
Traceback (most recent call last):                                                                                                                                                    
  File "/usr/lib/python3/dist-packages/supybot/world.py", line 122, in flush                                                                                                          
    f()                                                                                                                                                                               
  File "/usr/lib/python3/dist-packages/supybot/ircdb.py", line 735, in flush                                                                                                          
    fd = utils.file.AtomicFile(self.filename)                                                                                                                                         
  File "/usr/lib/python3/dist-packages/supybot/utils/file.py", line 170, in __init__                                                                                                  
    self._fd = codecs.open(self.tempFilename, mode, encoding=encoding)                                                                                                                
  File "/usr/lib/python3.9/codecs.py", line 905, in open                                                                                                                              
    file = builtins.open(filename, mode, buffering)                                                                                                                                   
OSError: [Errno 28] No space left on device: '/some/place/hcoop-meetbot/data/tmp/users.conf.965150e52561e69464cffcd904cc48f38e1c2619'                                            
No space left on device, cannot flush log.                                                                                                                                            
ERROR 2022-07-21T22:56:05 Exception id: 0x7ef15                                                                                                                                       
Exception ignored in: <function AtomicFile.__del__ at 0x7f674e567820>                                                                                                                 
Traceback (most recent call last):                                                                                                                                                    
  File "/usr/lib/python3/dist-packages/supybot/utils/file.py", line 247, in __del__                                                                                                   
    self.rollback()                                                                                                                                                                   
  File "/usr/lib/python3/dist-packages/supybot/utils/file.py", line 192, in rollback                                                                                                  
    if not self.closed:                                                                                                                                                               
  File "/usr/lib/python3/dist-packages/supybot/utils/file.py", line 183, in closed                                                                                                    
    return self._fd.closed 

This is one of a class of similar possible errors in file.py on the backend. It would be better if they were caught and a message displayed in the channel.

In fact, there is no out-of-band error communication that I know of, even though this is a communications tool. More broadly, it might be cool if the meetbot knew to log errors to a particular nick, as well as or instead of to the meeting in progress. I have not thought this idea through though.

Thanks again Kenneth!

Feature request: mechanism to parse a raw log and regenerate the HTML files

This is something that the original MeetBot plugin had, but I haven't yet built. If the plugin crashes (as in issue #20), then the minutes don't get generated, and there's really no recourse. It would nice to provide some sort of mechanism to take the raw log and generate the minutes from it. That wouldn't necessarily solve all problems, but would at least provide a workaround if there's a bug that prevents the minutes from being generated.

Crash in log.py

Something in a meeting this morning crashed Hcoop-Meetbot. This is a long-running instance and we've had a recent meeting with no obvious problems. The .log.html was created, but the #endmeeting command was not recognised, although I could start a new meeting (which I did twice, only one of which is recorded in that raw log.) There is no processed log. The Meetbot log file gives no error message in addition to what was displayed on the console in tmux, and there are no other clues I can see in tmp files or elsewhere in the Meetbot tree.

Hcoop-Meetbot 0.5.0 from PyPI
Limnoria 2021.06.15 running on Python 3.9.2 (default, Feb 28 2021, 17:03:44)

We run the meetbot with:

tmux new-session -s supybot -d -n Hcoop-Meetbot /usr/bin/supybot /home/lumosqlorg/hcoop-meetbot/lumosql-meetbot.conf
ERROR 2022-05-13T11:20:04 Exception id: 0xbfe5c                                            
ERROR 2022-05-13T11:20:25 Uncaught exception in HcoopMeetbot.__call__:                     
Traceback (most recent call last):                                                         
  File "/usr/lib/python3/dist-packages/supybot/log.py", line 368, in m                     
    return f(self, *args, **kwargs)                                                        
  File "/usr/lib/python3/dist-packages/supybot/irclib.py", line 202, in __call__           
    method(irc, msg)                                                                       
  File "/home/lumosqlorg/.local/lib/python3.9/site-packages/HcoopMeetbot/plugin.py", line 70, in doPrivmsg                                                                            
    handler.irc_message(context=context, message=message)                                  
  File "/home/lumosqlorg/.local/lib/python3.9/site-packages/hcoopmeetbotlogic/handler.py", line 51, in irc_message                                                                    
    dispatch(meeting, context, tracked)                                                    
  File "/home/lumosqlorg/.local/lib/python3.9/site-packages/hcoopmeetbotlogic/command.py", line 275, in dispatch                                                                      
    getattr(_DISPATCHER, "%s%s" % (_METHOD_PREFIX, operation))(meeting, context, operation, operand, message)                                                                         
  File "/home/lumosqlorg/.local/lib/python3.9/site-packages/hcoopmeetbotlogic/command.py", line 70, in do_endmeeting                                                                  
    locations = write_meeting(config=config(), meeting=meeting)                            
  File "/home/lumosqlorg/.local/lib/python3.9/site-packages/hcoopmeetbotlogic/writer.py", line 309, in write_meeting                                                                  
    _write_minutes(config, locations, meeting)                                             
  File "/home/lumosqlorg/.local/lib/python3.9/site-packages/hcoopmeetbotlogic/writer.py", line 298, in _write_minutes                                                                 
    "minutes": _MeetingMinutes.for_meeting(config, meeting),                               
  File "/home/lumosqlorg/.local/lib/python3.9/site-packages/hcoopmeetbotlogic/writer.py", line 193, in for_meeting                                                                    
    attendees=_MeetingMinutes._attendees(meeting),                                         
  File "/home/lumosqlorg/.local/lib/python3.9/site-packages/hcoopmeetbotlogic/writer.py", line 214, in _attendees                                                                     
    actions = _MeetingMinutes._attendee_actions(meeting, nick, alias) 
  File "/home/lumosqlorg/.local/lib/python3.9/site-packages/hcoopmeetbotlogic/writer.py", line 222, in _attendee_actions                                                              
    nick_pattern = re.compile(r"\b%s\b" % nick, re.IGNORECASE)                             
  File "/usr/lib/python3.9/re.py", line 252, in compile               
    return _compile(pattern, flags)                                                        
  File "/usr/lib/python3.9/re.py", line 304, in _compile                                   
    p = sre_compile.compile(pattern, flags)                                                
  File "/usr/lib/python3.9/sre_compile.py", line 764, in compile        
    p = sre_parse.parse(p, flags)                                                          
  File "/usr/lib/python3.9/sre_parse.py", line 948, in parse                               
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)                             
  File "/usr/lib/python3.9/sre_parse.py", line 443, in _parse_sub                          
    itemsappend(_parse(source, state, verbose, nested + 1,                                 
  File "/usr/lib/python3.9/sre_parse.py", line 549, in _parse         
    raise source.error("unterminated character set",                   
re.error: unterminated character set at position 17                   

I connected to this instance using tmux a, saw the crash and exited with ^C. After printing the Meetbot shutdown message, tmux crashed, but I think that is probably unrelated to this bug report, and not do with the tmux scrollback buffer in tmux... older tmux is sometimes like that.

I could upgrade to 0.5.1 from PyPI but I won't yet in case we can figure out a reproducer.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.