This repository is a monorepo hosting:
- the Java backend extension of Datashare (
src
), this extension is mainly a wrapper around the Python Neo4j application - the Python Neo4j backend application handling (
neo4j-app
) - the Datashare Graph widget plugin frontend (
plugins/neo4j-graph-widget
)
Developers need the following dependencies on their operating system:
- Docker
- git
The neo4j
script allows to run commands for this repository.
Some commands may require to specify a project using the -p
flag.
All projects:
./neo4j setup
only the Python app:
./neo4j setup -p neo4j_app
All projects:
./neo4j build
only the Python app:
./neo4j build -p neo4j_app
To run code formatting use:
./neo4j format
it will run Python code base formatting.
The Java code style guides are located in checkstyle.xml. You can then use the Checkstyle Intellij plugin to highlight code style warnings and errors.
Additionally once the plugin has been installed you can import the checkstyle.xml as a
Java Code Style template Settings|Editor|Code Style|Manage...|Import..
.
This will allow you to automatically format you code according to the style guide when running the Reformat Code
action in Intellij.
Be aware that reformatting code will only solve formatting style issues and other issues might be left.
Checkstyle
is also available for other IDEs and you should be able to integrate it in your preferred IDE.
./neo4j start_all_test_services
./neo4j stop_all_test_services
To start/stop Elasticsearch only, run:
./neo4j start_test_elasticsearch
./neo4j stop_test_elasticsearch
to use a different port run:
./neo4j start_test_elasticsearch --elasticsearch-port 9999
To start/srop neo4j only, run:
./neo4j start_test_neo4j
./neo4j stop_test_neo4j
To run all tests locally run:
./neo4j test
To run a specify test run:
./neo4j test -p neo4j_app
available tests are neo4j_app
, neo4j_app_format
, neo4j_extension
and neo4j_extension_format
You can use any of the above test commands replacing test
by docker_test
to run them inside a docker container.
For instance:
./neo4j docker_test -p neo4j_app