- 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`)
- distributes tests alongside the package, might be convenient for package users
- removes some weird indirection (e.g. dummy test files improting tests from modules)
- makes the command line for tests cleaner (e.g. no need to remember to manually add files to tox.ini)
- tests automatically covered by mypy (so makes mypy runs cleaner and ultimately better coverage)
The (vague) convention is
- tests/somemodule.py -- testing my.core.somemodule, contains tests directly re
- tests/test_something.py -- testing a specific feature, e.g. test_get_files.py tests get_files methon only
* query: add --warn-exceptions, dateparser, docs
added --warn-exceptions (like --raise-exceptions/--drop-exceptions, but
lets you pass a warn_func if you want to customize how the exceptions are
handled. By default this creates a logger in main and logs the exception
added dateparser as a fallback if its installed (it's not a strong dependency, but
I mentioned in the docs that it's useful for parsing dates/times)
added docs for query, and a few examples
--output gpx respects the --{drop,warn,raise}--exceptions flags, have
an example of that in the docs as well
sort of reverts #287, but also makes some other improvements
this allows us to remove some of the Optional's to
make downstream consumers easier to write. However,
this keeps the return type as a Res (result, with errors),
so downstream consumers will have to handle those incase
the schema ever changes (highly unlikely)
also added the 'call_type/message_type' with a comment
there describing the values
I left 'who' Optional I believe it actually should be -
its very possible for there to be no contact name, added
a check incase its '(Unknown)' which is what my phone
sets it to
see https://github.com/karlicoss/HPI/issues/262
* move home to fallback/via_home.py
* move via_ip to fallback
* add fallback model
* add stub via_ip file
* add fallback_locations for via_ip
* use protocol for locations
* estimate_from helper, via_home estimator, all.py
* via_home: add accuracy, cache history
* add datasources to gpslogger/google_takeout
* tz/via_location.py: update import to fallback
* denylist docs/installation instructions
* tz.via_location: let user customize cachew refresh time
* add via_ip.estimate_location using binary search
* use estimate_location in via_home.get_location
* tests: add gpslogger to location config stub
* tests: install tz related libs in test env
* tz: add regression test for broken windows dates
* vendorize bisect_left from python src
doesnt have a 'key' parameter till python3.10