Commit Graph

490 Commits

Author SHA1 Message Date
Thor77 ae13390b7b Use pylama for stylechecks 2018-02-01 21:49:02 +01:00
Thor77 5ea2f6ab3d Remove extra lines after encoding header 2018-02-01 20:49:23 +01:00
Thor77 489d609807 Add pytests .cache to .gitignore 2018-02-01 17:02:56 +01:00
Thor77 56471137c0 Limit build status on AppVeyor to master-branch 2018-01-30 19:14:51 +01:00
Thor77 4310f93adc Bump version to 2.0.0 2018-01-19 22:28:28 +01:00
Thor77 ab68f57f83 Use timestamp for relative timestamp human test 2018-01-10 20:33:52 +01:00
Thor77 7fd4297c4d Adapt tests to Clients.__iter__ returning keys 2017-09-25 23:21:12 +02:00
Thor77 8d1c19a734 Adapt log.parse_logs and utils.sort_clients
to Clients.__iter__ return keys instead of values
2017-09-25 23:21:06 +02:00
Thor77 2ebd445349 Clients.__iter__ return keys instead of values
as desired by MutableMapping.__iter__
2017-09-25 23:14:26 +02:00
Thor77 c9ab6f6b97 Add encoding-header to missing files 2017-09-16 22:31:15 +02:00
Thor77 c8092018f2 Revert "Sort imports"
because the sorting-order is dependent on installed packages

This reverts commit 51191672c6.
2017-09-16 22:03:55 +02:00
Thor77 51191672c6 Sort imports 2017-09-16 21:59:44 +02:00
Thor77 871210dde4 Add test for tsstats.log._parse_line 2017-09-15 11:35:21 +02:00
Thor77 1e1f112867 Add funcdoc to tsstats.log._parse_line 2017-09-15 10:51:29 +02:00
Thor77 a9e8cd0b6e Revert "Add test for Clients.__str__"
This reverts commit b9f798d04d.
2017-09-14 23:37:10 +02:00
Thor77 8558d731d4 Add test for render_servers.lastseen_relative 2017-09-14 23:09:50 +02:00
Thor77 f786c87dfb Add test for Client.__repr__ 2017-09-14 22:39:12 +02:00
Thor77 52f5cc3ac1 Add test for invalid log line 2017-09-14 22:37:56 +02:00
Thor77 b9f798d04d Add test for Clients.__str__ 2017-09-14 22:37:32 +02:00
Thor77 6345c3f1f5 Remove test for serverstop with connected clients
because it is non-trivial to implement with the new architecture and
probably not worth the effort, because it basically can't happen.
A warning/exception should be added instead.
2017-09-10 00:15:21 +02:00
Thor77 b1b80f657a Use parse_logs instead of _parse_details 2017-09-10 00:04:11 +02:00
Thor77 cbc76b5541 Add missing identmap-lookup for new clients 2017-09-09 18:44:41 +02:00
Thor77 1c224fa0ee Use parse_logs instead of _parse_details 2017-09-09 18:36:43 +02:00
Thor77 c79dd08bc0 Don't accept infinite arguments
leftover from old parse_logs-func
2017-09-09 18:04:56 +02:00
Thor77 147c41ffce Use parse_logs instead of _parse_details
because _parse_details is not available anymore
2017-09-09 17:35:55 +02:00
Thor77 df268f1c2a Add return and rtype to parse_logs-funcdoc 2017-09-08 15:39:39 +02:00
Thor77 602e6c4d51 Log start/end of parsing logfile 2017-09-08 15:39:39 +02:00
Thor77 91a9b8e4c7 Implement online_dc again 2017-09-08 15:39:39 +02:00
Thor77 90a367da27 Warn about online clients on logfile end 2017-09-08 15:39:39 +02:00
Thor77 59d4c88701 Add Client.__repr__ 2017-09-08 15:39:39 +02:00
Thor77 3d6c41538b Indent return of parsed_events correctly 2017-09-08 15:39:39 +02:00
Thor77 96d6e9f050 Only yield Server if there are clients for it 2017-09-08 15:39:39 +02:00
Thor77 7077446627 Add test for Client.nick-property 2017-09-08 15:39:39 +02:00
Thor77 3acf282470 Don't drop current nick in prepare_clients
because that's already handled in the Client.nick-property now
2017-09-08 15:39:39 +02:00
Thor77 c2fb6aa6c1 Handle set_nick event-action with .nick-property 2017-09-08 15:39:39 +02:00
Thor77 088d905196 Convert Client.nick into property
to add previous nick to .nick_history on set
2017-09-08 15:39:39 +02:00
Thor77 a084101ced Add Clients.apply_events
to apply events to a Clients-collection
2017-09-08 15:39:39 +02:00
Thor77 da2b773bf6 Add tsstats/event.py for easy event-initialization 2017-09-08 15:39:39 +02:00
Thor77 08b4e06f10 Refactor and simplify log-parsing
* _parse_line parses one line at a time for simplified testing
and return a list of event.Event's instead of applying changes directly
to a Clients-obj
* parse_log just bundles the logs (using _bundle_logs), opens them,
parses them (using _parse_line) and applies returned events to a
Clients-obj in the correct order

With these changes some sort of caching is possible because events are
not bound to a specific client-object and are easily sortable due to
their attached timestamp.
2017-09-08 15:39:39 +02:00
Thor77 20d40c8890 Add string-representation for Clients
to simplify debug-output
2017-09-08 15:39:39 +02:00
Thor77 caff246f9a Don't raise InvalidLog
because there's nothing you can do about it anyways, so there's no need
to stop.
2017-09-08 14:12:48 +02:00
Thor77 6a84b35a52 [requires.io] Dependency update (#24) 2017-09-05 22:18:04 +02:00
Thor77 7ab4436777 Bump version to 1.5.1 2017-08-24 19:38:44 +02:00
Thor77 3067c229d6 Add pendulum requirement to setup.py 2017-08-24 19:38:20 +02:00
Thor77 7dbd37b028 Add pendulum to testing_requirements.txt 2017-08-03 23:39:50 +02:00
Thor77 22c15202a3 Bump version to 1.5.0 2017-07-07 16:19:28 +02:00
Thor77 edff1e956d Optionally Pendulum.diff_for_humans instead of frmttime
for relative last seen time (default)

* introduce --lastseenabsolute
* introduce tsstats.template.render_servers(lastseen_relative=True)
2017-07-07 14:23:10 +02:00
Thor77 65a8379261 Use pendulum instead of plain datetime
because it is more intuitive to use and doesn't require the
tz_aware_datetime-workaround.
2017-07-07 14:22:24 +02:00
Thor77 3d469ce28c Sort imports 2017-06-02 23:34:33 +02:00
Thor77 6ddc8c94b7 Pass directory to flake8/isort 2017-06-02 23:33:40 +02:00