Skip to content

Latest commit

 

History

History
128 lines (90 loc) · 2.91 KB

README-dev.md

File metadata and controls

128 lines (90 loc) · 2.91 KB

Development

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)

Dependencies

Core

Developers need the following dependencies on their operating system:

Frontend

Test and build

Dev commands

The neo4j script allows to run commands for this repository. Some commands may require to specify a project using the -p flag.

Setting up

All projects:

./neo4j setup

only the Python app:

./neo4j setup -p neo4j_app

Building

All projects:

./neo4j build

only the Python app:

./neo4j build -p neo4j_app

Format and code styles

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.

Testing

Start and stop test services
./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
Run tests locally

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

Run tests inside Docker (like in the CI)

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