Commit graph

46 commits

Author SHA1 Message Date
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
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
b9c89155e3
Fix import of nomie numerical score values 2021-12-07 15:30:19 +01:00
aa2aff4e17
Fix import of nomie goal value 2021-12-07 15:30:19 +01:00
8eb9b6a492
Add simple loop Habit uuid test 2021-12-07 15:30:18 +01:00
09cbab9021
Add code coverage gathering 2021-12-07 15:30:09 +01:00
2d2b4430ff
Add initial cli test 2021-12-06 23:20:18 +01:00
97035d8e4c
Switch layout to src folder layout 2021-12-06 22:45:18 +01:00
0b8bddb588
Bump version 2021-12-06 20:45:08 +01:00
ebb916a911
Fix README by removing internal details 2021-12-06 20:40:37 +01:00
f9044daba1
Check for writable database before starting 2021-12-06 20:40:37 +01:00
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
2dbc6945a2
Improve sqlite3 connection creation 2021-12-06 20:39:06 +01:00
76b2dd4408
Make nomie dataclasses immutable 2021-12-06 20:39:06 +01:00
76bedd42ee
Refactor data into dataclasses 2021-12-06 20:39:05 +01:00
c5b532b618
Refactor nomie data ingestion 2021-12-02 18:54:56 +01:00
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
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
6af4638845
Remove pandas dependencies from pyproject.timl and poetry.lock. 2021-10-07 10:17:20 +02:00
a09f248113
Refactor habit list collection in repetition migration 2021-08-31 18:05:59 +02:00
189d1bb8af
Bump version number 2021-08-30 23:40:04 +02:00
db0121966c
Refactor repetition creation function 2021-08-30 23:38:49 +02:00
b9c08758f9
Add range tracker conversion 2021-08-30 23:00:28 +02:00
595b4e4898
Set range targets to half of nomie max value 2021-08-30 22:59:11 +02:00
82054087f9
Refactor repetitions, Add comments 2021-08-30 10:39:07 +02:00
e050acd288
Extract habit counter from event tags additionally 2021-08-29 11:22:55 +02:00
18cdd34300
Refactor repetition habit list 2021-08-29 11:11:58 +02:00
269a255885
Refactor repetitions migration 2021-08-29 10:13:45 +02:00
49fdf47657
Fix crash on duplicate repetition import 2021-08-29 09:47:27 +02:00
c41a492b07
Rename table module to schema module 2021-08-29 09:46:55 +02:00
3184e5d6fa
Add database merging to README 2021-08-28 23:07:30 +02:00
3c081f745c
Add repetition import 2021-08-28 23:03:12 +02:00
76fcae499a
Remove debug statement 2021-08-28 22:04:09 +02:00
1a5004e333
Add range habits 2021-08-28 22:03:45 +02:00
21fd1e5aaf
Fix habit import position 2021-08-28 10:59:20 +02:00
837d77481f
Add recoloring for negative trackers 2021-08-28 10:54:15 +02:00
8d4c32a652
Add habit duplicate checking 2021-08-28 10:35:29 +02:00
52fa6474ad
Rename loop import modules 2021-08-28 09:54:41 +02:00
7c606436eb
Fix habit creation
Habit creation fully works successfully for the first time with this
setup.
2021-08-27 23:34:19 +02:00
270635a17e
Fix table construction to closely mimic loop 2021-08-27 23:33:52 +02:00
d33c6a232e
Correctly close database at the end 2021-08-27 23:33:21 +02:00
a9ac2f27c2
Add simple habit migration test 2021-08-27 21:27:42 +02:00
7ea2c1cf57
Add gitignore for data and outputs 2021-08-27 10:13:22 +02:00
f5e8861252
Put loop code into own file 2021-08-27 10:11:00 +02:00
c8f6e034a5
Create loop sqlite tables 2021-08-26 23:13:56 +02:00
a213afded4
initial commit 2021-08-26 21:57:49 +02:00