Commit graph

50 commits

Author SHA1 Message Date
Dima Gerasimov
a5643206a0 general: make time.tz.via_location user config lazy, move tests to my.tests package
also gets rid of the problematic reset_modules thingie
2024-08-26 04:00:58 +01:00
Dima Gerasimov
7bfce72b7c core: cleanup/sort imports according to ruff check --select I 2024-08-16 11:38:13 +01:00
Dima Gerasimov
7023088d13 core.common: deprecate outdated LazyLogger alias 2024-08-16 10:22:29 +01:00
Dima Gerasimov
2b0f92c883 my.core: deprecate Path/dataclass imports from my.core during type checking
runtime still works for backwards compatibility
2024-08-16 10:22:29 +01:00
Dima Gerasimov
c45c51af22 core.common: move stats-related stuff to my.core.stats and add more thorough tests/docs
deprecate core.common.stat and core.common.Stats with backwards compatibility
2024-08-16 10:22:29 +01:00
Dima Gerasimov
973c4205df core: cleanup deprecations, exclude from type checking and show runtime warnings
among affected things:

- core.common.assert_never
- core.common.cproperty
- core.common.isoparse
- core.common.mcachew
- core.common.the
- core.common.tzdatetime
- core.compat.sqlite_backup
2024-08-16 10:22:29 +01:00
Sean Breckenridge
224ba521e3 gpslogger: catch broken xml file error 2023-12-20 02:41:52 +00:00
karlicoss
70bb9ed0c5 location.google_takeout_semantic: handle None visitConfidence 2023-11-10 02:10:30 +00:00
karlicoss
8c2d1c9463 general: use less explicit kompress boilerplate in modules
now get_files/kompress library can handle it transparently
2023-10-20 21:13:59 +01:00
Sean Breckenridge
f3507613f0 location: make accuracy default config floats
previously they were ints which could possibly
break caching with cachew
2023-10-01 11:52:41 +01:00
Dima Gerasimov
fe88380499 general: switch to using native 3.8 versions for cached_property/Literal/Protocol instead of compat 2023-05-16 01:18:30 +01:00
Dima Gerasimov
c34656e8fb general: update mypy config, seems that logs of type: ignore aren't necessary anymore 2023-05-16 01:18:30 +01:00
seanbreckenridge
40de162fab
cli: add option to output locations to gpx files (#286)
* cli: add option to output locations to gpx files
2023-04-15 00:31:11 +01:00
Kian-Meng Ang
d2ef23fcb4 docs: fix typos
found via `codespell -L copie,datas,pres,fo,tooks,noo,ue,ket,frop`
2023-03-27 03:02:35 +01:00
seanbreckenridge
9d231a8ea9
google_takeout: add semantic location history (#278)
* google_takeout: add semantic location history
2023-03-04 18:36:10 +00:00
seanbreckenridge
98b086f746
location fallback (#263)
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
2023-02-28 04:30:06 +00:00
Sean Breckenridge
19da373a0a location: remove duplicate via_ip import 2022-05-27 22:48:14 +01:00
seanbreckenridge
2cb836181b
location: add all.py, using takeout/gpslogger/ip (#237)
* location: add all.py, using takeout/gpslogger/ip, update docs
2022-04-26 21:11:35 +01:00
Sean Breckenridge
7493770d4d core: remove vendorized py37 isoformat code 2022-01-27 19:25:42 +00:00
Sean Breckenridge
fb49243005
core: add hpi query command (#157)
- restructure query code for cli, some test fixes
- initial query_range implementation

    refactored functions in query some more
    to allow re-use in range_range, select()
    pretty much just calls out to a bunch
    of handlers now
2021-04-06 17:19:58 +01:00
Sean Breckenridge
5ecd4b4810 cleanup; remove unused imports 2021-04-02 08:38:06 +01:00
Sean Breckenridge
1b36bd4379 fix spelling mistakes 2021-03-28 06:53:24 +01:00
Dima Gerasimov
5ef638694e minor requirements updates 2021-03-08 00:40:19 +00:00
Dima Gerasimov
86497f9b13 new: basic arbtt module 2021-02-25 19:56:35 +00: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
e8e4994c02 google.takeout.paths: return Optional if there are no takeouts 2020-10-12 21:48:04 +02:00
Dima Gerasimov
4666378f7e my.location.home: simplify config format, make it a bit more robust + tests 2020-10-12 09:05:11 +02:00
Dima Gerasimov
dfea664f57 add my.location.home, use it as location/timezone fallback 2020-10-09 22:09:19 +02:00
Dima Gerasimov
1f2e595be9 Initial my.time.tz provider, infer from location with daily resolution 2020-10-09 22:09:19 +02:00
Dima Gerasimov
dc2518b348 my.location.google: cleanup old stuff related to tagging, definitely doesn't belong to this module 2020-10-08 21:31:26 +02:00
Dima Gerasimov
ba9acc3445 my.location: let takeout provider be in a separate my.location.google; add CI test & enable mypy 2020-10-08 21:31:26 +02:00
Dima Gerasimov
ced93e6942 reflect cachew changes of exception handling and temporary suppression 2020-10-08 21:22:02 +02:00
Dima Gerasimov
fd41caa640 core: add __NOT_HPI_MODULE__ flag to mark utility files etc
(more of an intermediate solution perhaps)
2020-09-30 21:54:09 +02:00
Dima Gerasimov
efea669a3e my.location: some cleanup and speedups 2020-09-09 21:37:15 +01:00
Dima Gerasimov
c54d85037c core: add base cachew directory 2020-07-31 12:22:13 +01:00
Dima Gerasimov
8b8a85e8c3 kompress.kopen improvements
- tests
- uniform handling for bytes/str, always return utf8 str by default
2020-05-04 08:37:36 +01:00
Dima Gerasimov
51ae8601b4 Update docstrings and add links 2020-04-26 16:50:06 +01:00
Dima Gerasimov
a84b51807f more takeout to a separate subpackage 2020-04-24 18:10:33 +01:00
Dima Gerasimov
60ccca52ad more takeout tweaks and comments 2020-04-24 15:57:44 +01:00
Dima Gerasimov
1273b0ca61 update docstrings 2020-04-13 23:48:58 +01:00
Dima Gerasimov
e5b3a1e91e use my.config instead of mycfg; minor cleanups and docstrings 2020-04-12 00:22:10 +01:00
Dima Gerasimov
d6a5795be5 use mcachew 2020-02-26 22:31:44 +01:00
Dima Gerasimov
a665cf528c use lazylogger 2020-02-26 22:24:41 +01:00
Dima Gerasimov
f71ff39aad Fix separate takeout archives for location provider 2020-02-26 22:02:55 +01:00
Dima Gerasimov
d00e09d1a1 More module descriptions 2020-02-26 16:32:03 +01:00
Dima Gerasimov
a57be019d0 prettier pdf handling; prepare for cachew 2020-01-08 21:08:08 +00:00
Dima Gerasimov
5611fce720 Use defensive cachew 2020-01-07 00:12:49 +00:00
Dima Gerasimov
dd93ba8310 make cffi backend import defensive 2020-01-07 00:13:35 +00:00
Dima Gerasimov
64cd390db5 cleanup locations.takeout a bit 2019-12-22 17:13:59 +00:00
Dima Gerasimov
89efa11a28 move takeout location from private package 2019-12-22 16:08:20 +00:00