Documentation can be found here: https://oc-ocdm.readthedocs.io.
oc_ocdm is a Python ≥3.7 library that enables the user to import, produce, modify and export RDF data structures which are compliant with the OCDM v2.0.1 specification.
This package can be simply installed with pip:
pip install oc_ocdm
Please, have a look at the notebooks available here.
pip install poetry
git clone https://github.com/iosonopersia/oc_ocdm
cd ./oc_ocdm
poetry install
dist
):
poetry build
pip install ./dist/oc_ocdm-<VERSION>.tar.gz
oc_ocdm
library in your Python modules as follows:
from oc_ocdm.graph import GraphSet
from oc_ocdm.graph.entities.bibliographic import AgentRole
# ...
Just run the following command inside the root project folder:
poetry run test
See Poetry commands documentation.
AAA: when adding a non-dev dependency via poetry add
, always remember to add
that same dependency to the autodoc_mock_imports
list in docs/source/conf.py
(otherwise "Read the Docs" won't be able to compile the documentation correctly!).
poetry publish --build
pip install Sphinx sphinx_rtd_theme
rm ./docs/source/modules/*
sphinx-apidoc -o ./docs/source/modules oc_ocdm *test*
Warning! In order to avoid getting the following WARNING: html_static_path entry '_static' does not exist
, you'll
need to manually create an empty _static
folder with the command:
mkdir docs/source/_static
docs
folder:
cd docs
make.bat html
make html
build/html/index.html
file with a web browser of your choice!If you are using or extending oc_ocdm
as part of a scientific publication, we would appreciate a citation of our article.
@inproceedings{persiani2022programming,
title={{A} {P}rogramming {I}nterface for {C}reating {D}ata {A}ccording to the {SPAR} {O}ntologies and the {O}pen{C}itations {D}ata {M}odel},
author={Persiani, Simone and Daquino, Marilena and Peroni, Silvio},
booktitle={The Semantic Web: 19th International Conference, ESWC 2022, Hersonissos, Crete, Greece, May 29--June 2, 2022, Proceedings},
pages={305--322},
year={2022},
organization={Springer}
}
This work has been funded by the project “Open Biomedical Citations in Context Corpus” (Wellcome Trust, Grant n. 214471/Z/18/Z) and the project “Wikipedia Citations in Wikidata” (Wikimedia Foundation, https://meta.wikimedia.org/wiki/Wikicite/grant/Wikipedia_Citations_in_Wikidata).
We would like to thank (in alphabetic order) Fabio Mariani (@FabioMariani), Arcangelo Massari (@arcangelo7), and Gabriele Pisciotta (@GabrielePisciotta) for the constructive feedback.