Skip to content

ENH: Add minimal wrapping of libcaosdb's C interface

Florian Spreckelsen requested to merge f-c-import into dev

Summary

Add the first steps towards a Julia client basing on the Extern C interface of caosdb-cpplib. The client is able to connect to a server using SSL and retrieve the version of the server, see https://gitlab.indiscale.com/caosdb/customers/lfpb/management/-/issues/403.

Focus

All relevant modules are in src/CaosDB.jl, the README_SETUP.md has been updated accordingly.

Test Environment

Build and install caosdb-cpplib in the f-extern-c branch and make the location of libccaosdb.so known to Julia's ccall, e.g., by adding it to your LD_LIBRARY_PATH. Then start a CaosDB server in f-grpc-dev, e.g., by using caosdb-deploy in f-grpc.

Then, start julia with the --project option from the caosdb-julialib directory, or, alternatively, start Julia and add CaosDB.jl by

julia> ]add "path/to/caosdb-julialib"

Establish a connection via

julia> using CaosDB
julia> CaosDB.Connection.connect(host="...", port="...", cacert="...", username="...", password="...")

You may omit some or all parameters in the call to CaosDB.Connection.connect if the default values apply to you or if you defined the corresponding environmental variables.

Check List for the Author

Please, prepare your MR for a review. Be sure to write a summary and a focus and create gitlab comments for the reviewer. They should guide the reviewer through the changes, explain your changes and also point out open questions. For further good practices have a look at our review guidelines

  • All automated tests pass
  • Reference related Issues
  • Up-to-date CHANGELOG.md
  • Annotations in code (Gitlab comments)
    • Intent of new code
    • Problems with old code
    • Why this implementation?

Check List for the Reviewer

  • I understand the intent of this MR
  • All automated tests pass
  • Up-to-date CHANGELOG.md
  • The test environment setup works and the intended behavior is reproducible in the test environment
  • In-code documentation and comments are up-to-date.
  • Check: Are there spezifications? Are they satisfied?

For further good practices have a look at our review guidelines.

Edited by Henrik tom Wörden

Merge request reports

Loading