Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search prov dag #26

Open
wants to merge 143 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
edf6cc9
Add js-search dep
Oddant1 Jan 23, 2025
5749eff
Add JSON search
Oddant1 Jan 23, 2025
be96d45
Add search obj
Oddant1 Jan 23, 2025
a1ed100
_uuid
Oddant1 Jan 23, 2025
df08e49
No debug log
Oddant1 Jan 23, 2025
63fd9a2
Use fuse-js
Oddant1 Jan 27, 2025
54800d1
set up json and fuse search
Oddant1 Jan 27, 2025
a88c5b3
Update DAG to read already parsed and stored json
Oddant1 Jan 27, 2025
9366a82
Cleanup
Oddant1 Jan 28, 2025
ff3b6c2
Key entire section on readerModel.provData
Oddant1 Jan 28, 2025
3ab7d55
start adding searchbar
Oddant1 Jan 28, 2025
a9cf814
merge
Oddant1 Jan 29, 2025
1599580
audit fix
Oddant1 Jan 29, 2025
a2b60da
format
Oddant1 Jan 29, 2025
46bbab9
Start refactoring to create nodes while recursing
Oddant1 Jan 29, 2025
149c910
Rewriting prov dag parse
Oddant1 Jan 30, 2025
0a59ce7
format
Oddant1 Jan 30, 2025
4457083
Merge branch 'main' into search-prov-dag
Oddant1 Jan 30, 2025
8c8cefc
Only need to pass along UUID
Oddant1 Jan 30, 2025
91d8168
details -> citations
Oddant1 Jan 30, 2025
ff61500
We have edges and whatnot now yay
Oddant1 Jan 30, 2025
cba5c8b
Get json
Oddant1 Jan 30, 2025
841c053
Cludge collections to prove I understand what was wrong
Oddant1 Jan 30, 2025
f37c391
Massive refactor of recursive code
Oddant1 Jan 31, 2025
9a18de7
Clean up some state
Oddant1 Jan 31, 2025
e46e2c8
Ton of comments
Oddant1 Jan 31, 2025
7ec49ad
Refactor for collections
Oddant1 Jan 31, 2025
de2a168
Create the Fuse search
Oddant1 Feb 1, 2025
ab122a2
Proof of concept for search
Oddant1 Feb 1, 2025
e5e956a
Whitespace
Oddant1 Feb 1, 2025
d1f690b
Combine arrays better
Oddant1 Feb 1, 2025
949ac8c
Buncha cleanup of types
Oddant1 Feb 3, 2025
7919149
Hack to guarantee collection order
Oddant1 Feb 3, 2025
03da943
values not keys
Oddant1 Feb 3, 2025
10245db
Add minimal biMap
Oddant1 Feb 3, 2025
f55e08b
Turn hit json into ids
Oddant1 Feb 3, 2025
fe769d7
Start removing fuse
Oddant1 Feb 4, 2025
72865db
Start reworking json search
Oddant1 Feb 4, 2025
3953baf
Play with no fuse
Oddant1 Feb 4, 2025
13b0a30
wire up basic search
Oddant1 Feb 5, 2025
e37bdb7
format
Oddant1 Feb 5, 2025
687a6f9
Select first result
Oddant1 Feb 5, 2025
5a62b12
Accidentally pasted one word in the middle of another
Oddant1 Feb 5, 2025
10974de
remove debug log
Oddant1 Feb 5, 2025
d8a66f7
Basic support for AND
Oddant1 Feb 5, 2025
1f98427
Format
Oddant1 Feb 5, 2025
02da426
basic key to array
Oddant1 Feb 5, 2025
635c4c3
format
Oddant1 Feb 5, 2025
fdae42c
Helps to have the split character
Oddant1 Feb 5, 2025
db929b0
Cobbled together parser
Oddant1 Feb 18, 2025
f8df587
TODO
Oddant1 Feb 18, 2025
131fc08
Make CSS global
Oddant1 Feb 18, 2025
fd916c5
Start adding flip through search
Oddant1 Feb 18, 2025
c6e40e0
format
Oddant1 Feb 18, 2025
45cfe41
Better flip through search
Oddant1 Feb 18, 2025
3f97b44
Sort hits by row then col
Oddant1 Feb 18, 2025
403eb3e
Default searchIndex to 1
Oddant1 Feb 18, 2025
4b543eb
Only show search buttons if we have hits
Oddant1 Feb 18, 2025
d35aff1
Merge branch 'main' into search-prov-dag
Oddant1 Feb 18, 2025
9896027
searchIndex wraps
Oddant1 Feb 18, 2025
1eb97b8
Specify NodeSingular type
Oddant1 Feb 18, 2025
de101a4
just make it any because importing the types is looking borked
Oddant1 Feb 18, 2025
20935c7
Still need to import cytoscape
Oddant1 Feb 18, 2025
173af39
Re-Focus and Clear buttons
Oddant1 Feb 18, 2025
e92df0d
Don't parse into Date object, we need a string for searching
Oddant1 Feb 25, 2025
e7f9e61
Comments
Oddant1 Feb 27, 2025
773ad88
get q2-plugin from ref
Oddant1 Feb 27, 2025
bdf253a
Lark grammar
Oddant1 Feb 27, 2025
c1c34fa
Don't need that
Oddant1 Feb 27, 2025
c79b927
More robust search
Oddant1 Feb 27, 2025
3b6f547
Cleanup
Oddant1 Feb 27, 2025
948c626
npm run format
Oddant1 Feb 27, 2025
2c3396d
Remove another log
Oddant1 Feb 27, 2025
00b503a
Need to return the sets they don't modify in place
Oddant1 Feb 27, 2025
3b6385c
Quick hack to make using the input wider and less annoying to use
Oddant1 Feb 27, 2025
6d6cfdf
remove log
Oddant1 Feb 27, 2025
49e6535
Use the return value
Oddant1 Feb 27, 2025
c4c1a50
Too quick of a hack for the searchbar. Undo that
Oddant1 Feb 28, 2025
0168e09
Improve search for non-string values
Oddant1 Feb 28, 2025
61ea542
Extraneous word
Oddant1 Feb 28, 2025
fb7f076
Add vitest
Oddant1 Feb 28, 2025
f20fed5
Add anchors to search
Oddant1 Feb 28, 2025
b9379bc
Add optional input to BiMap constructor
Oddant1 Feb 28, 2025
c22f054
Refactor prov search to make it less entwined and more testable
Oddant1 Feb 28, 2025
07ca83f
npm run format
Oddant1 Feb 28, 2025
c760016
Start making search bar actually usable
Oddant1 Feb 28, 2025
c96b2c6
Merge branch 'main' into search-prov-dag
Oddant1 Feb 28, 2025
fed6d59
Make bar and buttons a bit less ugly
Oddant1 Feb 28, 2025
e2c7c94
More space between buttons
Oddant1 Feb 28, 2025
9129e45
Refactor code for searchbar
Oddant1 Feb 28, 2025
072eaf4
Actually escape the escaped end anchor
Oddant1 Feb 28, 2025
24097ad
More refactors
Oddant1 Feb 28, 2025
32cbcd9
Remove dead file
Oddant1 Feb 28, 2025
d5bec70
Set.Union and Set.Intersection are very new, implement them myself fo…
Oddant1 Feb 28, 2025
6ffb2a0
typo
Oddant1 Feb 28, 2025
f00626d
Search test
Oddant1 Mar 3, 2025
c887355
Merge branch 'main' into search-prov-dag
Oddant1 Mar 5, 2025
5ccc4c4
Add comment
Oddant1 Mar 5, 2025
2d03bfa
Better tests
Oddant1 Mar 5, 2025
cd474e9
Allow for custom per panel styling
Oddant1 Mar 5, 2025
008628f
Remove dead (and typoed) log
Oddant1 Mar 5, 2025
be55b25
Play with the searchbar and query instructions text
Oddant1 Mar 5, 2025
2854885
Move the query instructions to the Details panel
Oddant1 Mar 5, 2025
02bb6a7
Add a placeholder to the search bar
Oddant1 Mar 5, 2025
5a537d1
More text formatting. Still don't really like it
Oddant1 Mar 6, 2025
9fc8b18
Missed one
Oddant1 Mar 6, 2025
6116c42
More formatting
Oddant1 Mar 6, 2025
03530f3
More formatting
Oddant1 Mar 6, 2025
e63136d
Put the search bar in a panel
Oddant1 Mar 6, 2025
638da39
Balance the top and bottom margins of the buttons
Oddant1 Mar 6, 2025
5d8a40c
Adjust bold text a bit more
Oddant1 Mar 6, 2025
3b47a76
Update instructions
Oddant1 Mar 6, 2025
046b31c
Typo
Oddant1 Mar 6, 2025
5f254f3
Refactor this styling
Oddant1 Mar 6, 2025
7ec4961
Add search error notification
Oddant1 Mar 6, 2025
165f8a8
Make error less bad
Oddant1 Mar 6, 2025
9ebcc0b
Make error more responsive
Oddant1 Mar 6, 2025
cb7aabb
Format
Oddant1 Mar 6, 2025
eee62c4
@ebolyen's feedback
Oddant1 Mar 7, 2025
dce2377
Merge branch 'main' into search-prov-dag
Oddant1 Mar 10, 2025
f5feef7
idk about that padding
Oddant1 Mar 10, 2025
462882d
Add padding only if no scrollbar
Oddant1 Mar 10, 2025
5359cd6
I think this padding looks better
Oddant1 Mar 10, 2025
ed751bc
Search for keys without values
Oddant1 Mar 10, 2025
eeabe3f
Numerical comparison operators
Oddant1 Mar 10, 2025
f10a742
npm format
Oddant1 Mar 10, 2025
cc4bae3
Remove debug prints
Oddant1 Mar 11, 2025
20f34c3
Fix NUMBER transformer
Oddant1 Mar 11, 2025
9be33a1
Null is a valid search value, undefined is not
Oddant1 Mar 11, 2025
431cf60
Merge branch 'main' into search-prov-dag
Oddant1 Mar 17, 2025
2b0c2ee
BIIIIIIG ole refactor
Oddant1 Mar 17, 2025
16c35f7
Whitespace
Oddant1 Mar 17, 2025
49b00e6
update query instructions
Oddant1 Mar 17, 2025
2ae27a4
Better errors
Oddant1 Mar 18, 2025
b19d2df
Make escaped anchors work properly
Oddant1 Mar 18, 2025
b917091
Refactor searchJSOnMap
Oddant1 Mar 18, 2025
00a8e13
format
Oddant1 Mar 18, 2025
5e823a3
A few more tweaks to the help text
Oddant1 Mar 18, 2025
f2e8073
Whitespace
Oddant1 Mar 18, 2025
d6387ab
Try to debug why error isn't showing
Oddant1 Mar 18, 2025
e9d26dc
Infer error type based on object state
Oddant1 Mar 18, 2025
83da075
typo
Oddant1 Mar 18, 2025
5a81eb8
Cleanup some unneeded imports/exports
Oddant1 Mar 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions grammar.lark
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// This grammar can be compiled to parser.js with the following command:
//
// `lark-js grammar.lark -o ./src/lib/scripts/parser.js`
//
// This command is dependent on lark-js which can be installed via pip and lark
// version 1.1.5 which can also be installed via pip
//
// lark-js creates parser.js to be a node module. The resulting file requires
// the following edits.
//
// 1. `function get_parser` -> `export function get_parser`
// 2. `class Transformer` -> `export class Transformer`
// 3. Delete the entire module.exports section

start: [(key | pair) ((AND | OR) (key | pair))*]

pair: pair_single
| pair_group

pair_single: key ":" value
pair_group: "(" [pair ((AND | OR) pair)*] ")"

key: KEY_VALUE (KEY_SEP KEY_VALUE)*

KEY_SEP: "."
KEY_VALUE: /([\w\d\_\-]+(\\\.)*)+/

value: STRING
| NUMBER
| TRUE
| FALSE
| NULL
| value_group

value_group: "(" value [((AND | OR) value)*] ")"

STRING: /"(.*?)"/
NUMBER: COMPARISON? SIGNED_NUMBER

COMPARISON: ">"
| ">="
| "<"
| "<="

TRUE: "true"
FALSE: "false"
NULL: "null"

AND: "AND"
OR: "OR"

%import common.SIGNED_NUMBER
%import common.WS
%ignore WS
Loading