Code Monkey home page Code Monkey logo

timeprof's People

Contributors

fwerpers avatar werpers avatar

Watchers

James Cloos avatar  avatar  avatar

timeprof's Issues

Log command

There should be a log command that shows the latest tags.
For example

werpers: log
timeprof_bot:
2020-10-30 05:40: sleeping
2020-10-29 18:04: dinner
2020-10-29 17:45: cooking

The command should take an optional argument that controls how many entries are shown.

Immediately schedule new prompt

As soon as a prompt happens the next one should be scheduled.
Otherwise the actual rate will be different from the set rate, and the process of prompts will not be a Poisson process.

Convention for ping IDs and referring to pings

Each ping should have a unique IDs that can be used to refer to it in for example editing commands.
The ID should be shown in log commands.

When referring to pings it could be a simple string argument to the command. To be able to specify several pings at once we should allow , to separate specific IDs and : to specify a range of pings.

To ensure that ranges make sense the ids should start at 1 or 0 for the first ping and then increment by one each time

Examples

2 # Specify ping 2.
1,3 # Specify ping 1 and 3.
1:3 # Specify ping 1, 2 and 3.
1,3:5 # Specify ping 1, 3, 4 and 5.

In an editing command:

edit 3,5:7 --add coding # Add tag "coding" to ping 3, 5, 6 and 7

Allow more characters in tags

Both A-Z and a-z should be allowed, possibly lowered before recorded by the bot.
Most other characters should also be allowed unless there is a specific reason to disallow them.

Multi-user support

The bot should be able to handle multiple users at once. "Signing up" should be as simple as writing a direct message to the bot. Each user is handled in a direct message room with each user.

Requires #10, and probably #9.

More TimeoutErrors

Timeouts can still occur. Here it seemed to happen in the scheduled data collector function.

Results in the function not completing and no new execution is scheduled, which means no more pings ๐Ÿ› :bowtie:

Traceback (most recent call last):
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:   File "/home/pi/timeprof_bot/data_collection/timeprof_matrix_bot.py", line 482, in run
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:     return await coro
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:   File "/home/pi/timeprof_bot/data_collection/timeprof_matrix_bot.py", line 318, in col
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:     await self.send_room_message("Previous sample unanswered, saving placeholder label.
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:   File "/home/pi/timeprof_bot/data_collection/timeprof_matrix_bot.py", line 555, in sen
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:     await self.room_send(
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:   File "/home/pi/.local/lib/python3.8/site-packages/nio/client/async_client.py", line 1
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:     return await self._send(RoomSendResponse, method, path, data, (room_id,))
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:   File "/home/pi/.local/lib/python3.8/site-packages/nio/client/async_client.py", line 7
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:     transport_resp = await self.send(
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:   File "/home/pi/.local/lib/python3.8/site-packages/nio/client/async_client.py", line 2
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:     return await func(self, *args, **kwargs)
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:   File "/home/pi/.local/lib/python3.8/site-packages/nio/client/async_client.py", line 7
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:     return await self.client_session.request(
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:   File "/home/pi/.local/lib/python3.8/site-packages/aiohttp/client.py", line 504, in _r
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:     await resp.start(conn)
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:   File "/home/pi/.local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 860
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:     self._continue = None
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:   File "/home/pi/.local/lib/python3.8/site-packages/aiohttp/helpers.py", line 596, in _
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]:     raise asyncio.TimeoutError from None
Jan 15 20:40:15 raspberrypi timeprof_matrix_bot.py[19597]: asyncio.exceptions.TimeoutError

Direct messages

The bot should work in direct messages. This would both reduce clutter in the client and makes adding handling multiple users more clean in the future.

Probably requires #9.

Per user time zone setting

Store time stamps in a universal time but let users specify their timezone so that output can be formatted properly.

Editing commands

There should be editing commands for changing entries after they have been recorded.

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.