Fixes relations directions for cypher queries
Install as package in root with:
pip install .
Run aliassetup.bat
to set aliases in windows cmd
Directory fixcypher_stream_method
this method is about ten times faster than Antlr AST, but not as flexible as the AST.
The main class is in the file: fixdirections_astmethod.py
And function fix_cypher_relations_directions
should be used.
Directory fixcypher_ast_method
is
easier to change. If you know how antlr works.
The main class is in the file: fixdirections_streammethod.py
And function fix_cypher_relations_directions
should be used.
- Go into the directory with dir or ls:
parse_antlr_to_cypher
- Change the file:
FixRelationsDirections.g4
- Run this command to rebuild the python files:
java -Xmx500M org.antlr.v4.Tool -Dlanguage=Python3 FixRelationsDirections.g4
- The files in
parse_antlr_to_cypher
is regenerated
The directory Tests contains pytest unit tests and also 2 files to test each method against the testcases
both tests use the following input file that is all tests provided for the task:
datasets/examples_2023-09-11.csv
as input file
test_fix_relations_directions_example.py
tests/validate_csv_testfile_with_antrl_ast_method.py
tests/validate_csv_testfile_with_streammethod.py