HPI/my/core
Dima Gerasimov 661714f1d9 core/logging: overhaul and many improvements -- mainly to deprecate abandoned logzero
- generally saner/cleaner logger initialization

  In particular now it doesn't override logging level specified by the user code prior to instantiating the logger.

  Also remove the `LazyLogger` hack, doesn't seem like it's necessary when the above is implemented.

- get rid of `logzero` which is archived and abandoned now, use `colorlog` for coloured logging formatter

- allow configuring log level via shell via `LOGGING_LEVEL_module_name=<level>`

  E.g. `LOGGING_LEVEL_rescuexport_dal=WARNING LOGGING_LEVEL_my_rescuetime=debug ./script.py`

- port `AddExceptionTraceback` from HPI/promnesia

- port `CollapseLogsHandler` from HPI/promnesia

  Also allow configuring from the shell, e.g. `LOGGING_COLLAPSE=<level>`

- add support for `enlighten` progress bar, so it can be shared between different projects

  See https://github.com/Rockhopper-Technologies/enlighten#readme

  This allows nice CLI progressbars, e.g. for parallel processing of different files from HPI:

    ghexport.dal[111]  29%|████████████████████████████████████████████████████████████████▏              |  29/100 [00:03<00:07, 10.03 files/s]
    rexport.dal[comments]  17%|████████████████████████████████████▋                                      | 115/682 [00:03<00:14, 39.15 files/s]
    my.instagram.android   0%|▎                                                                           |    3/2631 [00:02<34:50, 1.26 files/s]

  Currently off by default, and hidden behind an env variable (`ENLIGHTEN_ENABLE=true`)
2023-06-21 18:42:15 +01:00
..
tests set json files to empty dicts so they are at least valid jsons 2023-06-09 03:31:13 +01:00
__init__.py core/logging: overhaul and many improvements -- mainly to deprecate abandoned logzero 2023-06-21 18:42:15 +01:00
__main__.py general: update mypy config, seems that logs of type: ignore aren't necessary anymore 2023-05-16 01:18:30 +01:00
cachew.py core: move mcachew into my.core.cachew; use better typing annotations (copied from cachew) 2023-06-08 01:29:49 +01:00
cfg.py general: move reddit tests into my/tests + tweak my.core.cfg to be more reliable 2023-05-26 00:58:23 +01:00
common.py core: move mcachew into my.core.cachew; use better typing annotations (copied from cachew) 2023-06-08 01:29:49 +01:00
compat.py general: switch to using native 3.8 versions for cached_property/Literal/Protocol instead of compat 2023-05-16 01:18:30 +01:00
core_config.py general: update mypy config, seems that logs of type: ignore aren't necessary anymore 2023-05-16 01:18:30 +01:00
dataset.py general: switch to using native 3.8 versions for cached_property/Literal/Protocol instead of compat 2023-05-16 01:18:30 +01:00
denylist.py docs: fix typos 2023-03-27 03:02:35 +01:00
discovery_pure.py general: update mypy config, seems that logs of type: ignore aren't necessary anymore 2023-05-16 01:18:30 +01:00
error.py general: switch to using native 3.8 versions for cached_property/Literal/Protocol instead of compat 2023-05-16 01:18:30 +01:00
freezer.py ci: suppress some mypy issues after upgrade 2023-03-17 00:33:22 +00:00
influxdb.py general: initial flake8 checks (for now manual) 2022-06-05 22:28:38 +01:00
init.py core: experimental import of my._init_hook to configure logging/warnings/env variables 2023-06-21 03:32:46 +01:00
kompress.py general: move most core tests inside my.core.tests package 2023-05-25 00:25:13 +01:00
konsume.py general: update mypy config, seems that logs of type: ignore aren't necessary anymore 2023-05-16 01:18:30 +01:00
legacy.py cli completion doc updates, hide legacy import warning (#279) 2023-03-06 21:36:36 +00:00
logging.py core/logging: overhaul and many improvements -- mainly to deprecate abandoned logzero 2023-06-21 18:42:15 +01:00
orgmode.py general: fix mypy errors after mypy and pytz stubs updates 2021-12-19 18:53:29 +00:00
pandas.py my/core/pandas tests: fix weird pytest error when constructing dataclass inside a def 2023-05-24 22:32:44 +01:00
preinit.py general: update mypy config, seems that logs of type: ignore aren't necessary anymore 2023-05-16 01:18:30 +01:00
query.py sort out mypy after its update 2023-06-21 03:32:46 +01:00
query_range.py general: update mypy config, seems that logs of type: ignore aren't necessary anymore 2023-05-16 01:18:30 +01:00
serialize.py sort out mypy after its update 2023-06-21 03:32:46 +01:00
source.py source: propogate help url for config errors 2022-06-07 21:33:38 +01:00
sqlite.py general: switch to using native 3.8 versions for cached_property/Literal/Protocol instead of compat 2023-05-16 01:18:30 +01:00
stats.py docs: fix typos 2023-03-27 03:02:35 +01:00
structure.py core/structure: use logger, warn leftover files 2022-02-14 19:34:03 +00:00
time.py twitter.twint: localize timestamps correctly 2022-05-31 01:28:11 +01:00
util.py general: update mypy config, seems that logs of type: ignore aren't necessary anymore 2023-05-16 01:18:30 +01:00
warnings.py general: initial flake8 checks (for now manual) 2022-06-05 22:28:38 +01:00