A python module for building SOSA based RDF graphs
Project description
Introduction - PySOSA
A python module for building SOSA based RDF graphs
The LANDRS (Linked And Networked DRoneS) project amongst other things works to create an ontology and building an OpenAPI specification for creating a Restful API for building linked data native drone data applications. LANDRS is a Sloan Foundation funded project to build open source APIs for managing scientific data on drones through the use of web standards and linked data technologies.
Updated PySOSA Design diagram is here
The project endeavors to implement PySOSA: A python module for building SOSA based RDF graphs. Sensor, Observation, Sample, and Actuator (SOSA) ontology, provides a lightweight core for Semantic Sensor Network (SSN). SOSA aims at broadening the target audience and application areas that can make use of Semantic Web ontologies. To find out more about SOSA and SSN check out https://www.w3.org/TR/vocab-ssn/#SOSAPlatform and https://www.w3.org/TR/vocab-ssn/
Getting started
PySOSA is A python module for building RDF graphs using the W3C SOSA (Sensors, Observations, Samples, and Actuators) ontology. For more see https://github.com/landrs-toolkit/PySOSA. In short PySOSA implements a python-based Linked-Data API for Networked Drones.
Visit www.landrs.org or www.ld.landrs.org
Requirements
We recommend Pycharm IDE, but this should work in any other IDE of choice. To run this module successfully, ensure you have the pre-requisites correctly installed. You can install all the requirements by running
$ pip install -r requirements.txt
See list of required libs here https://github.com/landrs-toolkit/PySOSA/blob/master/requirements.txt
The best way to install rdflib is to use pip. If the above install fails, install using pip as follows:
$ pip install rdflib
$ pip install PyLD
$ pip install pytz
$ pip -U install pylint
$ install pyreverse
How to install from Pypi
- Pre Requisites. Before using, you must have the following:
- Installation. Install using pip: pip install pysosa Link to pysosa pypi
- Configuration. Configure all connection parameters on the IDE
- Downloading the code! Run Your function
- Checking your recently installed package.
Generating Docs
How to generate the UML using Pycharm as a recommended IDE.
- cd into the directory of where the project resides
- Make sure pylint3 and graphviz are installed
- Run the command: $ pyreverse -S to generate the dot files in the current folder
-
$ pyreverse -S <modulename>
- Once the dot files are generated use the following command to generate the output in one of the formats available
-
$ dot -Tpdf <dotfilename> -o output
-
$ dot -Txxx shows all the available output formats
Install pylint3 from Install. If you have anaconda already installed use pip -U install pylint to update the pylint so that pyreverse is added to the scripts folder.
Install Pyreverse
You need to install graphViz as the pyreverse generates the UML diagrams in dot format and needs the dot.exe provided by Graphviz. Once GraphViz is installed make sure the bin folder is added to the PATH variable so that pyreverse can find it at run time.
Install sphinx
Running the Tests
The instructions for getting the project up and running on your local machine and testing purposes
E.g you can run tests for the platform class on the terminal as shown.
$ python -m unittest test_Platform.py
Example for testing Sensor class:
-
$ python -m unittest test_Sensor.py
Contributing
Pull requests and issue submissions are highly welcomed. This is an open project, published openly under Apache 2.0. We are excited to have you contribute to this project! See instructions on how you can contribute on this guide: https://github.com/landrs-toolkit/PySOSA/blob/master/CONTRIBUTING.md
Issues
Navigate the git repo to find active issues. Some of the known issues include:
- Order of sensors and platform on the graph output to be fixed
- The output of the graph needs to be formatted
- More tests needs to be done to cover all test cases
- Need to check if the function for adding objects to the graph does add and check duplicate
- Need a function that queries unit testing and code coverage more unit testing needed
License
This project is and always will be published openly under Apache 2.0
Contacts
- Get in touch with us on the landrs website
- Email us at landrs@nd.edu
- Twitter Handle https://twitter.com/DroneData4Good
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file PySOSA-0.0.2.tar.gz
.
File metadata
- Download URL: PySOSA-0.0.2.tar.gz
- Upload date:
- Size: 90.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dd44276b7d3d13a64a619d5b8602ff488221c63f17cd86741e03d6b4a5a4fa6 |
|
MD5 | d32306c237107fea4369597c1b642729 |
|
BLAKE2b-256 | a7a6269b6d8cd8ab6c615c4850daeeb7913802a1ad0b9ca20f75321088a73ea7 |