Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 9b6f694
Author: Colin Roberts <colin@autoparallel.xyz>
Date:   Thu Aug 15 16:36:19 2024 -0600

    feat: upgrade input JSON creation (#14)

    * add: `reddit_response.json`

    * refactor tests + add failing case

    * easier fix

    * test: parse to key

    * tests: key parsing

    * bug: `next_end_of_kv` on read `:`

    * fix: `end_of_kv` bug

    * test: find value

    * tests: `inside_value` and `inside_value_to_exit`

    * test: parse to NEXT key

    * parses JSON with two string keys

    * WIP: value inside value

    * comment

    * refactor (#10)

    * wip: start with bitmask

    * WIP: time to start testing

    * tests: `ArrayAdd` and `ArrayMul`

    * tests passing

    * update comments

    * feat: 2 key depth 1 json

    * 2 kv json and all tests passing

    * nested json works!!!

    * reduce constraints

    * cleanup

    * rename variables

    * more cleaning

    * more cleanup

    * make comments clean

    * WAYLON NITPICKING ME LOL

    * feat: improved CLI for witness

    * gitignore input.json

    * Update main.rs

    * Squashed commit of the following:

commit ed2c440
Author: Colin Roberts <colin@autoparallel.xyz>
Date:   Thu Aug 15 16:32:44 2024 -0600

    tests/refactor: state update and improved JSON parsing (#11)

    * add: `reddit_response.json`

    * refactor tests + add failing case

    * easier fix

    * test: parse to key

    * tests: key parsing

    * bug: `next_end_of_kv` on read `:`

    * fix: `end_of_kv` bug

    * test: find value

    * tests: `inside_value` and `inside_value_to_exit`

    * test: parse to NEXT key

    * parses JSON with two string keys

    * WIP: value inside value

    * comment

    * refactor (#10)

    * wip: start with bitmask

    * WIP: time to start testing

    * tests: `ArrayAdd` and `ArrayMul`

    * tests passing

    * update comments

    * feat: 2 key depth 1 json

    * 2 kv json and all tests passing

    * nested json works!!!

    * reduce constraints

    * cleanup

    * rename variables

    * more cleaning

    * more cleanup

    * make comments clean

    * WAYLON NITPICKING ME LOL
Merge branch 'main' into feat/stack-machine
  • Loading branch information
Autoparallel committed Aug 20, 2024
2 parents 957922a + 9b6f694 commit 2e229c7
Show file tree
Hide file tree
Showing 6 changed files with 220 additions and 0 deletions.
74 changes: 74 additions & 0 deletions inputs/test_extract_depth/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
{
"key": [
107,
101,
121,
49
],
"data": [
123,
10,
32,
32,
32,
32,
34,
107,
101,
121,
49,
34,
58,
32,
34,
97,
98,
99,
34,
44,
10,
32,
32,
32,
32,
34,
107,
101,
121,
50,
34,
58,
32,
123,
10,
32,
32,
32,
32,
32,
32,
32,
32,
34,
107,
101,
121,
51,
34,
58,
32,
34,
100,
101,
102,
34,
10,
32,
32,
32,
32,
125,
10,
125
]
}
115 changes: 115 additions & 0 deletions inputs/test_extract_sambhav/input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
{
"key": [
107,
101,
121,
49
],
"data": [
123,
10,
32,
32,
32,
32,
34,
101,
120,
116,
114,
97,
99,
116,
34,
58,
32,
123,
10,
32,
32,
32,
32,
32,
32,
32,
32,
34,
102,
105,
108,
101,
34,
58,
32,
34,
101,
120,
116,
114,
97,
99,
116,
34,
44,
10,
32,
32,
32,
32,
32,
32,
32,
32,
34,
116,
101,
109,
112,
108,
97,
116,
101,
34,
58,
32,
34,
69,
120,
116,
114,
97,
99,
116,
34,
44,
10,
32,
32,
32,
32,
32,
32,
32,
32,
34,
112,
97,
114,
97,
109,
115,
34,
58,
32,
34,
34,
10,
32,
32,
32,
32,
125,
10,
125
]
}
14 changes: 14 additions & 0 deletions json_examples/reddit_response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"data": {
"redditorInfoByName": {
"id": "t2_bepsb",
"karma": {
"fromAwardsGiven": 0,
"fromAwardsReceived": 470,
"fromComments": 9583,
"fromPosts": 13228,
"total": 23281
}
}
}
}
7 changes: 7 additions & 0 deletions json_examples/sambhav_example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extract": {
"file": "extract",
"template": "Extract",
"params": ""
}
}
6 changes: 6 additions & 0 deletions json_examples/test_depth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"key1": "abc",
"key2": {
"key3": "def"
}
}
4 changes: 4 additions & 0 deletions json_examples/test_two_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"key1": "abc",
"key2": "def"
}

0 comments on commit 2e229c7

Please sign in to comment.