Commit graph

115 commits

Author SHA1 Message Date
Dima Gerasimov
1fd2a9f643 core/time: more flexible support for resolving TZ abbreviation -> TZ ambiguities
addresses https://github.com/karlicoss/HPI/issues/103

for now via experimental time.tz.force_abbreviations config variable
not sure if this whole things is doomed to be resolved properly
2021-03-08 00:40:19 +00:00
Dima Gerasimov
0585cc4a89 arbtt: feed data to influxdb 2021-02-25 19:56:35 +00:00
Dima Gerasimov
ca4d58e4e7 core: add helper to 'freeze' dataclasses, in order to derive a schema from the properties 2021-02-25 19:56:35 +00:00
Dima Gerasimov
86497f9b13 new: basic arbtt module 2021-02-25 19:56:35 +00:00
Dima Gerasimov
20585a3130 influxdb: WIP on magic automatic interface
to run:

    python3 -c 'import my.core.influxdb as I; import my.hypothesis as H; I.magic_fill(H.highlights)'
2021-02-22 10:46:40 +00:00
Dima Gerasimov
bfec6b975f influxdb: add helper to core + use it in bluemaestro/lastfm/rescuetime 2021-02-22 10:46:40 +00:00
Dima Gerasimov
271cd7feef core/cachew: use cache_dir in mcachew if it wasn't specified by the user 2021-02-21 19:51:58 +00:00
Dima Gerasimov
9afe1811a5 core/cachew: special handling for None in order to preserve cache_dir() path
+ add 'suffix' argument for more straighforward logic
2021-02-21 19:51:58 +00:00
Dima Gerasimov
da3c1c9b74 core/cachew: rely on ~/.cache for default cache path
- rely on appdirs for default cache path instead of hardcoded /var/tmp/cachew
  technically backwards incompatible, but no action needed
  you might want to clean /var/tmp/cachew after updating

- use default cache path (e.g. ~/.cache) by default
  see https://github.com/ActiveState/appdirs#some-example-output for more info
  *warning*: things will be cached by default now (used to be uncached before)

- treat cache_dir = None in the config
  *warning*: kind of backwards incompatible.. but again nothing disasterous
2021-02-21 19:51:58 +00:00
Dima Gerasimov
3b4a2a378f core: make discovery even more static, has_stats via ast + tests 2021-02-19 02:39:25 +00:00
Dima Gerasimov
f90599d7e4 core: make discovery rely on ast module more, add test 2021-02-19 02:39:25 +00:00
Dima Gerasimov
ddbb2e5f23 CI: better cleanup for modules in between tests 2021-02-19 02:39:25 +00:00
Dima Gerasimov
82e2f96192 core: add test for tmp_config; unset new attributes 2021-02-19 02:39:25 +00:00
Dima Gerasimov
5313984d8f core: add tmp_config helper for test & adhoc patching
bluemaestro: cleanup tests
2021-02-19 02:39:25 +00:00
Dima Gerasimov
0534c5c57d cli: add 'hpi module install' and 'hpi module requires'
ci: use hpi module install; remove explicit module links

relevant:

- https://github.com/karlicoss/HPI/issues/12
- https://github.com/karlicoss/HPI/issues/79
2021-02-18 02:04:40 +00:00
Dima Gerasimov
97650adf3b core: add discovery_pure module to get modules and their dependencies via ast module 2021-02-18 02:04:40 +00:00
Dima Gerasimov
4ad4f34cda core: improve mypy coverage 2021-02-18 02:04:40 +00:00
Dima Gerasimov
f102101b39 core/windows: fix get_files and its tests 2021-02-16 06:40:42 +00:00
Dima Gerasimov
746c3da0ca core.pandas: allow specifying schema; add tests 2021-02-15 00:15:44 +00:00
Dima Gerasimov
6239879245 core: add more tests for stat/datetime guessing 2021-02-14 16:20:38 +00:00
Dima Gerasimov
4012f9b7c2 core: more generic functions to jsonify data, rescuetime: fix influxdb filling 2021-02-14 16:20:38 +00:00
Dima Gerasimov
07f901e1e5 core: helpers for automatic dataframes from sequences of NamedTuple/dataclass
also use in my.rescuetime
2021-02-14 16:20:38 +00:00
Dima Gerasimov
df9a7f7390 core.pandas: add check for 'error' column + add empty one by default 2021-02-14 16:20:38 +00:00
Dima Gerasimov
3a1e21635a my.body.blood: use same file
overall I guess this module is highly specific to me anyway, so gonna be
hard to make it generic...
2021-02-14 16:20:38 +00:00
Dima Gerasimov
e81dddddf0 core: proprely resolve class properties in make_config + add test 2020-12-13 18:29:49 +01:00
Dima Gerasimov
571cb48aea core: add modules_ast for more robust module collection 2020-12-11 07:02:16 +01:00
Dima Gerasimov
63c825ab81 my.stackexchange: use GDPR data for votes 2020-12-11 07:02:16 +01:00
Dima Gerasimov
ddea816a49 my.stackexchange: use proper pip package, add stat
+ 'anonymous' mode for stat() function
2020-12-11 07:02:16 +01:00
Dima Gerasimov
8abe66526d my.photos: minor fixes/configcleanup + speedup 2020-11-25 04:47:30 +01:00
Dima Gerasimov
29ad315578 core/cli: some enhacements for frendlier errors/default config
see https://github.com/karlicoss/HPI/issues/110
2020-11-23 20:46:26 +01:00
Dima Gerasimov
a6e5908e6d get rid of porg dependency, use orgparse directly 2020-11-06 23:02:35 +01:00
Dima Gerasimov
ed4b6c409f doctor & stat improvements
- doctor: log when there is no stats() function and suggest to use it
- check that stats() result isn't None
- warn when there is not data in the iterable
2020-11-01 02:02:43 +01:00
Dima Gerasimov
2619af7ae7 doctor: warn if the default config is used 2020-11-01 02:02:43 +01:00
Dima Gerasimov
1849a66f08 general: get rid of example_config & use demo/stub my.config instead 2020-11-01 02:02:43 +01:00
Dima Gerasimov
96be32aa51 mypy-friendly compat functions handling 2020-11-01 01:51:10 +01:00
Dima Gerasimov
3a9e3e080f my.time.tz: implement different policies for localizing 2020-11-01 01:51:10 +01:00
Dima Gerasimov
15789a4149 kyhton.kompress: move to core (with a fallback, used in promnesia) 2020-10-29 03:13:18 +01:00
Dima Gerasimov
655b86bb0a my.kython.konsume: move to core 2020-10-29 03:13:18 +01:00
Dima Gerasimov
cc127f1876 kython.klogging
- move to core
- add a proper description why it's useful
- make default level INFO
- use HPI_LOGS variable for easier log level control (abdc6df1ea)
2020-10-29 03:13:18 +01:00
Dima Gerasimov
a946e23dd3 core.pandas: dump the timezones in check_dateish 2020-10-21 01:29:29 +02:00
Dima Gerasimov
831fee42a1 core: minor error handling tweaks 2020-10-21 01:29:29 +02:00
Dima Gerasimov
2a2478bfa9 core: update cachew annotations
orgmode: expose method to construct cacheable note
2020-10-21 01:29:29 +02:00
Dima Gerasimov
bdfac96352 core.error: more generic sort_res_by 2020-10-21 01:29:29 +02:00
Dima Gerasimov
fa5e181cf8 core: minor helpers for error handling 2020-10-21 01:29:29 +02:00
Dima Gerasimov
6a1a006202 core: add DataFrame support to stat 2020-10-11 18:44:37 +02:00
Dima Gerasimov
209cffb476 doctor: print import order 2020-10-09 23:22:00 +02:00
Dima Gerasimov
96113ad5ae my.calendar.holidays: unhardcode calendar, detect it from the location data 2020-10-09 23:22:00 +02:00
Dima Gerasimov
bdb5dcd221 my.calendar.holidays: cleanup + ci/stats + split off private data handling to https://github.com/karlicoss/hpi-personal-overlay 2020-10-09 23:22:00 +02:00
Dima Gerasimov
ced93e6942 reflect cachew changes of exception handling and temporary suppression 2020-10-08 21:22:02 +02:00
Dima Gerasimov
d3f2551560 core.pandas: check index in check_dataframe 2020-10-04 01:40:52 +02:00