Marty Oehme
fd4cd62636
Add README for internal data representation
2022-01-05 12:54:35 +01:00
Marty Oehme
7134dc65d8
Add version extraction to parser
2021-12-25 10:27:38 +01:00
Marty Oehme
bb4b85851e
Begin nomie parser creation
2021-12-25 10:02:15 +01:00
Marty Oehme
a825287642
Add signature checking
2021-12-24 21:52:57 +01:00
Marty Oehme
d525d7c584
Add end-to-end test for nomie->loop
2021-12-16 13:12:27 +01:00
Marty Oehme
5d8bde959e
Add tested Parser Interface
2021-12-16 13:11:49 +01:00
Marty Oehme
70c626b748
Rename NomieImport to ImportData
2021-12-16 13:09:52 +01:00
Marty Oehme
539a983505
Prepare pytest for end-to-end testing
2021-12-16 13:07:42 +01:00
Marty Oehme
2bbb594d62
Add informal Parser interface
...
Added first informal parser interface, only requiring a method to parse
events and one to parse trackers.
Theoretically we only *require* a method to parse events since, through
their contained activities, they would also come with trackers.
But this would 1) be much more opaque and a lot of work to then extract
the trackers again and 2) leave out trackers which do not yet have any
activities associated with them (i.e. trackers never once accomplished).
We can still turn the informal parser into a formal interface if need
arises: https://realpython.com/python-interface/
2021-12-15 23:12:03 +01:00
Marty Oehme
031145db01
Make program downward compatible until python 3.7
...
Add multi-version tests with nox to keep regressions from happening.
2021-12-15 22:34:30 +01:00
Marty Oehme
b9c89155e3
Fix import of nomie numerical score values
2021-12-07 15:30:19 +01:00
Marty Oehme
aa2aff4e17
Fix import of nomie goal value
2021-12-07 15:30:19 +01:00
Marty Oehme
8eb9b6a492
Add simple loop Habit uuid test
2021-12-07 15:30:18 +01:00
Marty Oehme
09cbab9021
Add code coverage gathering
2021-12-07 15:30:09 +01:00
Marty Oehme
2d2b4430ff
Add initial cli test
2021-12-06 23:20:18 +01:00
Marty Oehme
97035d8e4c
Switch layout to src folder layout
2021-12-06 22:45:18 +01:00
Marty Oehme
0b8bddb588
Bump version
2021-12-06 20:45:08 +01:00
Marty Oehme
ebb916a911
Fix README by removing internal details
2021-12-06 20:40:37 +01:00
Marty Oehme
f9044daba1
Check for writable database before starting
2021-12-06 20:40:37 +01:00
Marty Oehme
3da96a3ef8
Add all simultaneous activities to loop
...
While in nomie, multiple occurences of the same activity can be recorded
in one single event (e.g. you smoked multiple cigarettes and now record
that fact), Loop has no such concept.
Thus, we work around it by fudging the duplicate timestamps ever so
slightly (one millisecond each) and then adding them to the database.
2021-12-06 20:40:37 +01:00
Marty Oehme
2dbc6945a2
Improve sqlite3 connection creation
2021-12-06 20:39:06 +01:00
Marty Oehme
76b2dd4408
Make nomie dataclasses immutable
2021-12-06 20:39:06 +01:00
Marty Oehme
76bedd42ee
Refactor data into dataclasses
2021-12-06 20:39:05 +01:00
Marty Oehme
c5b532b618
Refactor nomie data ingestion
2021-12-02 18:54:56 +01:00
Marty Oehme
0e31975cb0
Create missing PRAGMA values
...
Created missing schema_version and user_version values for import.
user_version is especially important here since Loop Habit looks for the
corresponding sql schema migration files and does not find files for
versions under 9.
user_version = 23 or 24 seems correct for Loop Habit Tracker v2.0.3 (or
rather, 2.0.x).
Migration files here:
https://github.com/iSoron/uhabits/tree/dev/uhabits-core/src/jvmMain/resources/migrations
Used by migration helper, with an error message on non-existing version
file here:
https://github.com/iSoron/uhabits/blob/dev/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/database/MigrationHelper.kt
2021-12-02 12:54:11 +01:00
Marty Oehme
bea6c0eca5
Fix ability to be run via poetry and cli
...
Program can now be invoked through poetry for development purposes,
invoke as follows from main directory: `poetry run move`.
Alternatively, can still be invoked via `python run.py <nomie-json>` and
now via `./run.py <nomie-json>` which uses system default python
installation. For now both commands are only mainly useful from the
poetry development virtual environment itself.
2021-10-07 10:17:42 +02:00
Marty Oehme
6af4638845
Remove pandas dependencies from pyproject.timl and poetry.lock.
2021-10-07 10:17:20 +02:00
Marty Oehme
a09f248113
Refactor habit list collection in repetition migration
2021-08-31 18:05:59 +02:00
Marty Oehme
189d1bb8af
Bump version number
2021-08-30 23:40:04 +02:00
Marty Oehme
db0121966c
Refactor repetition creation function
2021-08-30 23:38:49 +02:00
Marty Oehme
b9c08758f9
Add range tracker conversion
2021-08-30 23:00:28 +02:00
Marty Oehme
595b4e4898
Set range targets to half of nomie max value
2021-08-30 22:59:11 +02:00
Marty Oehme
82054087f9
Refactor repetitions, Add comments
2021-08-30 10:39:07 +02:00
Marty Oehme
e050acd288
Extract habit counter from event tags additionally
2021-08-29 11:22:55 +02:00
Marty Oehme
18cdd34300
Refactor repetition habit list
2021-08-29 11:11:58 +02:00
Marty Oehme
269a255885
Refactor repetitions migration
2021-08-29 10:13:45 +02:00
Marty Oehme
49fdf47657
Fix crash on duplicate repetition import
2021-08-29 09:47:27 +02:00
Marty Oehme
c41a492b07
Rename table module to schema module
2021-08-29 09:46:55 +02:00
Marty Oehme
3184e5d6fa
Add database merging to README
2021-08-28 23:07:30 +02:00
Marty Oehme
3c081f745c
Add repetition import
2021-08-28 23:03:12 +02:00
Marty Oehme
76fcae499a
Remove debug statement
2021-08-28 22:04:09 +02:00
Marty Oehme
1a5004e333
Add range habits
2021-08-28 22:03:45 +02:00
Marty Oehme
21fd1e5aaf
Fix habit import position
2021-08-28 10:59:20 +02:00
Marty Oehme
837d77481f
Add recoloring for negative trackers
2021-08-28 10:54:15 +02:00
Marty Oehme
8d4c32a652
Add habit duplicate checking
2021-08-28 10:35:29 +02:00
Marty Oehme
52fa6474ad
Rename loop import modules
2021-08-28 09:54:41 +02:00
Marty Oehme
7c606436eb
Fix habit creation
...
Habit creation fully works successfully for the first time with this
setup.
2021-08-27 23:34:19 +02:00
Marty Oehme
270635a17e
Fix table construction to closely mimic loop
2021-08-27 23:33:52 +02:00
Marty Oehme
d33c6a232e
Correctly close database at the end
2021-08-27 23:33:21 +02:00
Marty Oehme
a9ac2f27c2
Add simple habit migration test
2021-08-27 21:27:42 +02:00