Please file issues on the GitHub issue tracker: https://github.com/apache/arrow-adbc/issues
The libraries here are all individual CMake projects.
Note: unlike the Arrow C++ build system, the CMake projects will not automatically download and build dependencies—you should configure CMake appropriately to find dependencies in system or package manager locations.
For example, the driver manager is built as follows:
$ mkdir -p build/driver_manager $ cd build/driver_manager $ cmake ../../c/driver_manager $ make -j
All libraries here can be built similarly. For information on what they do and their dependencies, see their individual READMEs.
To specify where dependencies are to the build, use standard CMake options such as CMAKE_PREFIX_PATH
. A list of dependencies for Conda (conda-forge) is included, and can be used as follows:
$ conda create -n adbc -c conda-forge --file ci/conda_env_cpp.txt $ conda activate adbc
Some of Arrow's build options are supported (under a different prefix):
ADBC_BUILD_SHARED
, ADBC_BUILD_STATIC
: build the shared/static libraries.ADBC_BUILD_TESTS
: build the unit tests (requires googletest/gmock).ADBC_INSTALL_NAME_RPATH
: set install_name
to @rpath
on MacOS. Usually it is more convenient to explicitly set this to OFF
for development.All libraries use the same build options to enable tests. For example, to build and run tests for the SQLite3 driver:
$ mkdir -p build/sqlite $ cd build/sqlite # You may need to set -DCMAKE_PREFIX_PATH such that googletest can be found $ cmake ../../c/driver/sqlite -DADBC_BUILD_TESTS=ON $ make -j $ ctest
Tests use Googletest. Some libraries may have additional test-time dependencies. For instance, the PostgreSQL and Flight SQL drivers require servers to test against. See their individual READMEs for details.
The documentation uses the Sphinx documentation generator.
A list of dependencies for Conda (conda-forge) is included, and can be used as follows:
$ conda create -n adbc -c conda-forge --file ci/conda_env_docs.txt $ conda activate adbc
To build the HTML documentation:
$ pushd c/apidoc $ doxygen $ popd # Optionally: to also build the Python documentation $ pushd python/adbc_driver_manager $ pip install -e .[test] $ popd $ cd docs $ make html
The output can be found in build/
.
The GLib bindings use the Meson build system.
A build of the driver manager is required. For example, if the libraries are installed to $HOME/local
:
$ meson setup \ --pkg-config-path=$HOME/local/lib/pkgconfig \ --prefix=$HOME/local \ build/glib \ glib $ meson install -C build/glib
A list of dependencies for Conda (conda-forge) is included, and can be used as follows:
$ conda create -n adbc -c conda-forge --file ci/conda_env_glib.txt $ conda activate adbc
Go libraries are a standard Go project.
$ cd go/adbc $ go build -v ./... $ go test -v ./...
The Java components are a standard Maven project.
$ cd java/ # Build and run tests $ mvn clean install
Python libraries are managed with setuptools. See individual READMEs for additional dependencies. In general, that means all projects can be built as follows:
$ cd python/adbc_driver_manager $ pip install -e .
Tests use pytest. Some libraries may have additional test-time dependencies. See their individual READMEs for details.
# Install dependencies $ pip install -e .[test] # Run tests $ pytest -vvx
The Ruby libraries are bindings around the GLib libraries.
Before opening a pull request, please run the static checks, which are enforced via pre-commit
. This will run linters, formatters, and other analysis. For example:
# Install pre-commit $ pip install pre-commit # or alternatively $ conda install -c conda-forge --file ci/conda_env_dev.txt # Set up hooks $ pre-commit install # Run manually $ pre-commit run Check Xml............................................(no files to check)Skipped Check Yaml...........................................(no files to check)Skipped Fix End of Files.....................................(no files to check)Skipped Trim Trailing Whitespace.............................(no files to check)Skipped clang-format.........................................(no files to check)Skipped cmake-format.........................................(no files to check)Skipped cpplint..............................................(no files to check)Skipped Google Java Formatter................................(no files to check)Skipped black................................................(no files to check)Skipped flake8...............................................(no files to check)Skipped isort................................................(no files to check)Skipped # Hooks automatically run on commit $ git commit
When committing, please follow Conventional Commits. This helps maintain semantic versioning of components.
Please use the following commit types: build
, chore
, ci
, docs
, feat
, fix
, perf
, refactor
, revert
, style
, test
.
Please use the following scopes:
c/driver/postgresql
, java/driver-manager
, …: for a component and all its bindings. For example, c/driver-manager
covers the C/C++ driver manager and its GLib and Python bindings, while java/driver/flight-sql
covers only the Flight SQL driver for Java. (The scope names are derived from the filesystem paths.)c/format
, go/format
, java/format
: for the core API definitions (adbc.h for C/C++, adbc.go for Go, adbc-core for Java).For example:
feat(c/driver/postgresql): implement prepared statements ci(go/adbc/drivermgr): pass through DYLD_LIBRARY_PATH in tests fix(java/driver/jdbc): adjust SQL type mapping for JDBC driver