Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aMahanna committed Dec 10, 2023
1 parent 0120ed4 commit 5bd4ec3
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 16 deletions.
Binary file added docs/_static/adb_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/rdf_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
db = ArangoClient().db('_system', username='root', password='passwd')
# Initialize the ArangoRDF client.
arangordf = ArangoRDF(db)
adbrdf = ArangoRDF(db)
# Create a new RDF graph.
rdf_graph = Graph()
rdf_graph.parse("https://raw.githubusercontent.com/stardog-union/stardog-tutorials/master/music/beatles.ttl")
rdf_graph.parse("https://raw.githubusercontent.com/stardog-union/stardog-tutorials/master/music/beatles.ttl", format="ttl")
# RDF to ArangoDB
adb_graph_rpt = adbrdf.rdf_to_arangodb_by_rpt("BeatlesRPT", rdf_graph, overwrite_graph=True)
Expand Down
42 changes: 28 additions & 14 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
.. ArangoRDF documentation master file, created by
sphinx-quickstart on Sat Dec 9 18:56:57 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
.. image:: /static/adb_logo.png
.. image:: /static/rdf_logo.png

Welcome to ArangoRDF's documentation!
=====================================
|
.. toctree::
:maxdepth: 2
:caption: Contents:
ArangoRDF
-------------

Welcome to the documentation for **ArangoRDF**, a Python adapter for ArangoDB_ & RDF_.

Requirements
=============

- ArangoDB version 3.9+
- Python version 3.8+

Installation
============

.. code-block:: bash
~$ pip install arango-rdf --upgrade
Contents
========

.. toctree::
:maxdepth: 1

Indices and tables
==================
overview
specs

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
.. _ArangoDB: https://www.arangodb.com
.. _RDF: https://www.w3.org/RDF/
27 changes: 27 additions & 0 deletions docs/overview.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Getting Started
---------------

Here is an example showing how the **arango-rdf** package can be used:

.. testcode::

from rdflib import Graph
from arango import ArangoClient
from arango_rdf import ArangoRDF

# Initialize the ArangoDB db client.
db = ArangoClient(hosts='http://localhost:8529).db('_system', username='root', password='passwd')

# Initialize ArangoRDF
arangordf = ArangoRDF(db)

# Create a new RDF graph.
rdf_graph = Graph()
rdf_graph.parse("https://raw.githubusercontent.com/stardog-union/stardog-tutorials/master/music/beatles.ttl")

# RDF to ArangoDB
adb_graph_rpt = adbrdf.rdf_to_arangodb_by_rpt("BeatlesRPT", rdf_graph, overwrite_graph=True)
adb_graph_pgt = adbrdf.rdf_to_arangodb_by_pgt("BeatlesPGT", rdf_graph, overwrite_graph=True)

# ArangoDB to RDF
rdf_graph_2, adb_mapping = adbrdf.arangodb_graph_to_rdf("Beatles", Graph())
21 changes: 21 additions & 0 deletions docs/specs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
API Specification
-----------------

This page contains the specification for all classes and methods available in
arango-rdf.

.. _ArangoRDF:

ArangoRDF
=========

.. autoclass:: arango_rdf.main.ArangoRDF
:members:

.. _ArangoRDFController:

ArangoRDFController
===================

.. autoclass:: arango_rdf.controller.ArangoRDFController
:members:

0 comments on commit 5bd4ec3

Please sign in to comment.