ontouml-models-lib

A Python library for accessing and managing OntoUML models from the OntoUML/UFO Catalog, designed to simplify software development by providing easy-to-use functions.

https://github.com/ontouml/ontouml-models-lib

Science Score: 67.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
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.2%) to scientific vocabulary

Keywords

ontology ontology-engineering ontouml ontouml-models ontouml-ufo-catalog sparql
Last synced: 6 months ago · JSON representation ·

Repository

A Python library for accessing and managing OntoUML models from the OntoUML/UFO Catalog, designed to simplify software development by providing easy-to-use functions.

Basic Info
Statistics
  • Stars: 0
  • Watchers: 4
  • Forks: 0
  • Open Issues: 0
  • Releases: 2
Topics
ontology ontology-engineering ontouml ontouml-models ontouml-ufo-catalog sparql
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

Project DOI Project Status - Active GitHub - Release Date - PublishedAt GitHub - Last Commit - Branch PyPI - Project PyPI - Downloads Language - Top Language - Version CodeFactor Grade OpenSSF Scorecard Code style: black License - GitHub pre-commit Website

OntoUML/UFO Catalog Python Library

Overview

This Python library provides tools for manipulating and querying ontology models within the OntoUML/UFO framework. It is designed to work with concepts and models that adhere to the standards and practices outlined in the OntoUML/UFO Catalog. The library supports operations on models stored in machine-readable formats such as JSON and Turtle, and enables the execution of SPARQL queries on these models.

About the OntoUML/UFO Catalog

The FAIR Model Catalog for Ontology-Driven Conceptual Modeling Research, also known as OntoUML/UFO Catalog, is a structured and open-source repository containing a collection of OntoUML and UFO ontology models. The catalog is designed to support empirical research in OntoUML and UFO, as well as the broader field of conceptual modeling. It provides a diverse range of models created by modelers with varying expertise, covering multiple domains and purposes. These models are available in machine-readable formats such as JSON and Turtle, which facilitate automated processing and querying. Each model in the catalog is accessible via a permanent identifier, ensuring long-term availability and reference.

The catalog organizes its content into a well-defined structure, storing models and their metadata in linked data formats. This structure allows for the integration of the models into a knowledge graph, enabling advanced querying and analysis using SPARQL. The OntoUML/UFO Catalog is built to be collaborative and accessible, allowing users to contribute to and leverage a comprehensive resource for conceptual modeling research. For more details, please visit the official OntoUML/UFO Catalog repository: OntoUML/UFO Catalog.

Features

  • Catalog Management: Load, manage, and query collections of ontology models.
  • Model Interaction: Interact with individual ontology models, including querying and metadata management.
  • SPARQL Query Execution: Execute SPARQL queries on RDF graphs representing ontology models.
  • Metadata Handling: Support for metadata schemas used in the OntoUML/UFO Catalog, ensuring consistency and compliance with the catalog's structure.

Installation

To install the library, use pip:

bash pip install ontouml-models-lib

The Library's Classes

The Catalog, Model, and Query classes are core components of the OntoUML/UFO Catalog Python library, designed to enable manipulation and querying of ontology models. The Catalog class is used to manage collections of ontology models, allowing users to load, query, and interact with multiple models as a cohesive unit. The Model class represents an individual ontology model, providing methods for querying its RDF graph and accessing metadata. The Query class encapsulates SPARQL queries, enabling their execution on RDF graphs within the OntoUML/UFO framework.

These classes are essential when working with the OntoUML/UFO Catalog, which is a repository of high-quality, curated ontology models. Users can utilize the Catalog class to manage entire collections of models, the Model class to interact with individual models, and the Query class to run specific queries on the data. This design ensures that users can efficiently organize, access, and analyze ontology models in a standardized way.

Examples

Example 1: Working with the Catalog Class

```python from ontoumlmodelslib import Catalog

Load a catalog from a specified path

catalog = Catalog('/path/to/catalog')

List all models in the catalog

models = catalog.list_models() print(models)

Perform a query across all models in the catalog

query = Query('/path/to/query.sparql') results = catalog.execute_query(query) print(results) ```

Example 2: Working with the Model Class

```python from ontoumlmodelslib import Model, Query

Load an individual ontology model

model = Model('/path/to/ontologymodelfolder')

Print the title of the model

print(model.title)

Execute a SPARQL query on the model

query = Query('/path/to/query.sparql') results = model.execute_query(query) print(results) ```

Example 3: Working with the Query Class

```python from ontoumlmodelslib import Query

Load a SPARQL query from a file

query = Query('/path/to/query.sparql')

Access the query content

print(query.query_content)

Compute the hash of the query (useful for caching results)

print(query.hash) ```

How to Contribute

We welcome and appreciate contributions from the community! Whether you want to report a bug, suggest a new feature, or improve our codebase, your input is valuable.

Reporting Issues

Code Contributions

  1. Fork the project repository and create a new feature branch for your work: git checkout -b feature/YourFeatureName.
  2. Make and commit your changes with descriptive commit messages.
  3. Push your work back up to your fork: git push origin feature/YourFeatureName.
  4. Submit a pull request to propose merging your feature branch into the main project repository.

Test Contributions

  • Enhance the project's reliability by adding new tests or improving existing ones.

General Guidelines

  • Ensure your code follows our coding standards.
  • Update the documentation as necessary.
  • Make sure your contributions do not introduce new issues.

We appreciate your time and expertise in contributing to this project!

License

This library is licensed under the Creative Commons Attribution-ShareAlike 4.0 International Public License. Please note that the models included in the OntoUML/UFO Catalog may have their own licenses, as specified in their metadata.

Author

The ontouml-models-lib library 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: OntoUML
  • Login: OntoUML
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
title: ontouml-models-lib 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/ontouml/ontouml-models-lib'
    description: Git repository
repository-code: 'https://github.com/ontouml/ontouml-models-lib'
url: 'https://ontouml.github.io/ontouml-models-lib/'
repository-artifact: 'https://pypi.org/project/ontouml-models-lib/'
abstract: A Python library for accessing and managing OntoUML models from the OntoUML/UFO Catalog,
designed to simplify software development by providing easy-to-use functions.
keywords: ["ontouml", "ontouml-models", "ontology", "ontology-engineering", "catalog"]
license: Apache-2.0

GitHub Events

Total
Last Year

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 20 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
pypi.org: ontouml-models-lib

ontouml-models-lib Python Library

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 20 Last month
Rankings
Dependent packages count: 10.5%
Average: 34.8%
Dependent repos count: 59.1%
Maintainers (1)
Last synced: 7 months ago

Dependencies

pyproject.toml pypi
  • flake8 ^6.1.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 ^1.7.2 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
  • myst-parser ^2.0.0 develop
  • pep8-naming ^0.13.3 develop
  • poetry ^1.7.1 develop
  • pre-commit ^3.4.0 develop
  • pydoclint ^0.3.8 develop
  • pydocstyle ^6.3.0 develop
  • pyflakes ^3.1.0 develop
  • pytest ^7.4.2 develop
  • pytest-cov ^4.1.0 develop
  • sphinx ^7.2.6 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
  • tomli ^2.0.1 develop
  • tryceratops ^2.3.2 develop
  • python ^3.09
poetry.lock pypi
  • 124 dependencies
requirements.txt pypi
  • alabaster ==0.7.16
  • apeye ==1.4.1
  • apeye-core ==1.1.5
  • astroid ==3.3.2
  • autodocsumm ==0.2.13
  • babel ==2.16.0
  • beautifulsoup4 ==4.12.3
  • build ==1.2.1
  • cachecontrol ==0.14.0
  • certifi ==2024.7.4
  • cffi ==1.17.0
  • cfgv ==3.4.0
  • charset-normalizer ==3.3.2
  • cleo ==2.1.0
  • click ==8.1.7
  • colorama ==0.4.6
  • coverage ==7.6.1
  • crashtest ==0.4.1
  • cryptography ==43.0.0
  • cssutils ==2.11.1
  • dict2css ==0.3.0.post1
  • distlib ==0.3.8
  • docstring-parser-fork ==0.0.9
  • docutils ==0.20.1
  • domdf-python-tools ==3.9.0
  • dulwich ==0.21.7
  • exceptiongroup ==1.2.2
  • fastjsonschema ==2.20.0
  • filelock ==3.15.4
  • flake8 ==7.1.1
  • flake8-broken-line ==1.0.0
  • flake8-fixme ==1.1.1
  • flake8-implicit-str-concat ==0.4.0
  • flake8-noqa ==1.4.0
  • flake8-plugin-utils ==1.3.3
  • flake8-pyproject ==1.2.3
  • flake8-pytest-style ==2.0.0
  • flake8-return ==1.2.0
  • flake8-unused-arguments ==0.0.13
  • flake8-useless-assert ==0.4.4
  • html5lib ==1.1
  • identify ==2.6.0
  • idna ==3.7
  • imagesize ==1.4.1
  • importlib-metadata ==8.2.0
  • iniconfig ==2.0.0
  • installer ==0.7.0
  • isodate ==0.6.1
  • jaraco-classes ==3.4.0
  • jeepney ==0.8.0
  • jinja2 ==3.1.4
  • keyring ==24.3.1
  • loguru ==0.7.2
  • markdown-it-py ==3.0.0
  • markupsafe ==2.1.5
  • mccabe ==0.7.0
  • mdurl ==0.1.2
  • more-itertools ==10.4.0
  • msgpack ==1.0.8
  • mypy ==1.11.1
  • mypy-extensions ==1.0.0
  • natsort ==8.4.0
  • nodeenv ==1.9.1
  • numpy ==2.0.1
  • packaging ==24.1
  • pandas ==2.2.2
  • pep8-naming ==0.14.1
  • pexpect ==4.9.0
  • pkginfo ==1.11.1
  • platformdirs ==4.2.2
  • pluggy ==1.5.0
  • poetry ==1.8.3
  • poetry-core ==1.9.0
  • poetry-plugin-export ==1.8.0
  • pre-commit ==3.8.0
  • ptyprocess ==0.7.0
  • pycodestyle ==2.12.1
  • pycparser ==2.22
  • pydoclint ==0.5.6
  • pydocstyle ==6.3.0
  • pyflakes ==3.2.0
  • pygments ==2.18.0
  • pyparsing ==3.1.2
  • pyproject-hooks ==1.1.0
  • pytest ==8.3.2
  • pytest-cov ==5.0.0
  • python-dateutil ==2.9.0.post0
  • pytz ==2024.1
  • pywin32-ctypes ==0.2.2
  • pyyaml ==6.0.2
  • rapidfuzz ==3.9.6
  • rdflib ==7.0.0
  • requests ==2.32.3
  • requests-toolbelt ==1.0.0
  • rich ==13.7.1
  • ruamel-yaml ==0.18.6
  • ruamel-yaml-clib ==0.2.8
  • secretstorage ==3.3.3
  • shellingham ==1.5.4
  • six ==1.16.0
  • snowballstemmer ==2.2.0
  • soupsieve ==2.5
  • sphinx ==7.4.7
  • sphinx-autoapi ==3.2.1
  • sphinx-autodoc-typehints ==2.2.3
  • sphinx-jinja2-compat ==0.3.0
  • sphinx-prompt ==1.8.0
  • sphinx-rtd-size ==0.2.0
  • sphinx-rtd-theme ==2.0.0
  • sphinx-tabs ==3.4.5
  • sphinx-toolbox ==3.7.0
  • sphinxcontrib-applehelp ==2.0.0
  • sphinxcontrib-devhelp ==2.0.0
  • sphinxcontrib-htmlhelp ==2.1.0
  • sphinxcontrib-jquery ==4.1
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==2.0.0
  • sphinxcontrib-serializinghtml ==2.0.0
  • standard-imghdr ==3.10.14
  • tabulate ==0.9.0
  • tomli ==2.0.1
  • tomlkit ==0.13.0
  • trove-classifiers ==2024.7.2
  • tryceratops ==2.3.3
  • typing-extensions ==4.12.2
  • tzdata ==2024.1
  • urllib3 ==2.2.2
  • virtualenv ==20.26.3
  • webencodings ==0.5.1
  • win32-setctime ==1.1.0
  • xattr ==1.1.0
  • zipp ==3.20.0