graft is a Python toolkit for working with different graph implementations.
$ pip install poetry
$ poetry install
# or
$ pip install -e .
Optional dependencies can be installed using the extras syntax.
$ poetry install -E logging
# or
$ pip install -e .[logging]
Tool endpoints will be added here as they are developed.
# List all of the available tools.
$ python -m graft
# Prints the schema and prompts the user to upload to a local Dgraph instance.
$ python -m graft.tools.schema
A test suite is available in the tests directory.
Each file named test_{filename}
will be considered part of the test suite.
They are found and run with pytest.
$ py.test
# or
$ poetry run pytest
Configuration is found in the pytest.ini
file.
The coverage information is retrieved by regex in the GitLab CI (check .gitlab-ci.yml
).
The code for graft is handled by the black Python code formatter.
$ black .
Code is checked against the flake8 tool as part of the test suite.
Add # noqa
to the end of lines that should not be linted.
Add # pragma: no cover
to the end of blocks/statements that should not be covered.
Distribution Statement "A" (Approved for Public Release, Distribution Unlimited).