Iskander14yo commented on code in PR #931: URL: https://github.com/apache/incubator-graphar/pull/931#discussion_r3352006105
########## python/src/cli/README.md: ########## @@ -1,96 +1,99 @@ # GraphAr Python CLI -GraphAr python cli uses [pybind11][] and [scikit-build-core][] to bind C++ code into Python and build command line tools through Python. Command line tools developed using [typer][]. +The GraphAr Python package installs a `graphar` command-line tool for inspecting +GraphAr metadata and importing data into GraphAr format. -[pybind11]: https://pybind11.readthedocs.io -[scikit-build-core]: https://scikit-build-core.readthedocs.io -[typer]: https://typer.tiangolo.com/ - -## Requirements - -- Linux (work fine on Ubuntu 22.04) -- Cmake >= 3.15 -- Arrow >= 12.0 -- Python >= 3.7 -- pip == latest +The CLI is implemented with [Typer][] and uses the same Python bindings as the +[`graphar` Python package](../../README.md). +[Typer]: https://typer.tiangolo.com/ -The best testing environment is `ghcr.io/apache/graphar-dev` Docker environment. +## Requirements -And using Python in conda or venv is a good choice. +- Python >= 3.9 +- pip +- CMake >= 3.15, Apache Arrow >= 12.0, and a C++ toolchain when building from source ## Installation -### Install from Pypi Install the latest released version from PyPI: ```bash pip install -U graphar ``` -### Install from Source +Or install from the repository root: -- Clone this repository -- `pip install ./python` or set verbose level `pip install -v ./python` +```bash +pip install ./python +``` -## Usage +Verify the CLI is available: ```bash graphar --help - -# check the metadata, verify whether the vertex edge information and attribute information of the graph are valid -graphar check -p ../testing/neo4j/MovieGraph.graph.yml - -# show the vertex -graphar show -p ../testing/neo4j/MovieGraph.graph.yml -v Person - -# show the edge -graphar show -p ../testing/neo4j/MovieGraph.graph.yml -es Person -e ACTED_IN -ed Movie - -# import graph data by using a config file -graphar import -c ../testing/neo4j/data/import.mini.yml ``` -## Import config file +## Usage -The config file supports `yaml` data type. We provide two reference templates for it: full and mini. Review Comment: Can you please point me to these templates? I think it's better to have links to them (if this info is not outdated) or delete this block otherwise (what I did). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
