laderr-engine

Python Library for LaDeRR Language

https://github.com/pedropaulofb/laderr-engine

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.9%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Python Library for LaDeRR Language

Basic Info
  • Host: GitHub
  • Owner: pedropaulofb
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Size: 31.2 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed 9 months ago
Metadata Files
Readme License Citation

README.md

LaDeRR Engine

LaDeRR Engine logo

The LaDeRR Engine is a Python-based processing utility designed for the LaDeRR (Language for Describing Risk and Resilience) specification. It provides functionalities to convert LaDeRR specifications into RDF graphs, perform SHACL-based validations, apply reasoning to enrich data, generate visualizations, and produce comprehensive reports.

For a complete description of the LaDeRR language, please refer to the LaDeRR User Guide.

Installation

  1. Clone the repository:

bash git clone https://github.com/pedropaulofb/laderr-engine.git cd laderr-engine

  1. Create and activate a virtual environment (optional but recommended):

```bash python -m venv venv

For Windows:

venv\Scripts\activate

For Linux/Mac:

source venv/bin/activate ```

  1. Install dependencies:

bash pip install -r requirements.txt

Usage

The LaDeRR Engine can be used either as a standalone script or integrated as a library in your Python projects.

As a Script

Run the following command, specifying your input TOML file and an output base path (used as prefix for generated files):

bash python laderr_engine.py <input_file> <output_base>

Example:

bash python laderr_engine.py example\example_doc_in.toml example\output\example_doc_out

As a Library

You can integrate the LaDeRR Engine functionalities directly into your Python projects by importing methods from the Laderr utility class, located in the module laderr_engine.laderr_lib.laderr.

This class provides static methods to:

  • Convert LaDeRR specifications into RDF graphs.
  • Validate RDF graphs using SHACL constraints.
  • Apply reasoning to enrich RDF data.
  • Generate visualizations and reports.
  • Save RDF graphs and processed specifications.

Below is an example demonstrating how to process a LaDeRR specification within your Python code:

```python from laderrengine.laderrlib import Laderr

Specify the input LaDeRR specification and output base path

inputspecpath = "path/to/your/specification.toml" outputfilebase = "path/to/output/base_name"

Process the specification using default settings

try: Laderr.processspecification( inputspecpath=inputspecpath, outputfilebase=outputfile_base, verbose=True # Set to False to suppress detailed logging ) except Exception as e: print(f"Error processing LaDeRR specification: {e}") ```

For detailed usage, additional configurations, and other available methods, refer directly to the docstrings provided within the Laderr class methods.

Contributing

Contributions are welcome! If you would like to contribute, please fork the repository and submit a pull request.

Author

The LaDeRR Engine is developed and maintained by:

Feel free to reach out using the provided links. For inquiries, contributions, or to report any issues, you can open a new issue on this repository.

Owner

  • Name: Pedro Paulo Favato Barcelos
  • Login: pedropaulofb
  • Kind: user
  • Location: Bolzano, Italy
  • Company: Free University of Bozen-Bolzano

Research Assistant at the Faculty of Computer Science of the Free University of Bozen-Bolzano, KRDB Research Centre for Knowledge and Data.

Citation (CITATION.cff)

cff-version: 1.2.0
title: LaDeRR Python Library
message: >-
  If you use this software, please cite it using the metadata from this file.
type: software
authors:
  - given-names: Pedro Paulo
    family-names: Favato Barcelos
    email: p.p.favatobarcelos@utwente.nl
    affiliation: University of Twente
    orcid: 'https://orcid.org/0000-0003-2736-7817'
identifiers:
  - type: url
    value: 'https://github.com/pedropaulofb/laderr-lib'
    description: Git repository
repository-code: 'https://github.com/pedropaulofb/laderr-lib'
url: 'https://github.com/pedropaulofb/laderr-lib'
repository-artifact: 'https://pypi.org/project/laderr-lib/'
abstract: A Python library for the Language for Describing Risk and Resilience (LaDeRR) language.
keywords: ["ontouml", "ontology", "ontology-engineering", "risk", "resilience", "risk management"]
license: Apache-2.0

GitHub Events

Total
  • Delete event: 6
  • Issue comment event: 1
  • Push event: 85
  • Pull request event: 1
  • Create event: 6
Last Year
  • Delete event: 6
  • Issue comment event: 1
  • Push event: 85
  • Pull request event: 1
  • Create event: 6

Dependencies

poetry.lock pypi
  • 128 dependencies
pyproject.toml pypi
  • flake8 ^7.0.0 develop
  • flake8-broken-line ^1.0.0 develop
  • flake8-fixme ^1.1.1 develop
  • flake8-implicit-str-concat ^0.4.0 develop
  • flake8-noqa ^1.3.2 develop
  • flake8-pyproject ^1.2.3 develop
  • flake8-pytest-style ^2.0.0 develop
  • flake8-return ^1.2.0 develop
  • flake8-unused-arguments ^0.0.13 develop
  • flake8-useless-assert ^0.4.4 develop
  • loguru ^0.7.2 develop
  • mypy ^1.7.0 develop
  • pep8-naming ^0.14.0 develop
  • poetry ^1.7.1 develop
  • pre-commit ^3.4.0 develop
  • pydoclint ^0.5.6 develop
  • pydocstyle ^6.3.0 develop
  • pyflakes ^3.1.0 develop
  • pytest ^8.0.0 develop
  • pytest-cov ^5.0.0 develop
  • sphinx ^7.4.7 develop
  • sphinx-autoapi ^3.0.0 develop
  • sphinx-rtd-size ^0.2.0 develop
  • sphinx-rtd-theme ^2.0.0 develop
  • sphinx-toolbox ^3.5.0 develop
  • tryceratops ^2.3.2 develop
  • python ^3.09
  • rdflib ^7.0.0
  • tomli ^2.0.1