Skip to content

Commit

Permalink
Merge branch 'develop_carsten' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
cknoll committed Dec 14, 2023
2 parents dc1f525 + 9b97681 commit b8b4c5b
Show file tree
Hide file tree
Showing 56 changed files with 5,042 additions and 4,981 deletions.
1 change: 1 addition & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- main
- develop
- develop_carsten
pull_request:
branches:
- main
Expand Down
43 changes: 16 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,50 @@
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI version](https://badge.fury.io/py/pyerk.svg)](https://pypi.org/project/pyerk/)
[![Documentation Status](https://readthedocs.org/projects/pyerk-core/badge/?version=latest)](https://pyerk-core.readthedocs.io/en/latest)
![ci](https://github.com/ackrep-org/pyerk-core/actions/workflows/python-app.yml/badge.svg)
[![PyPI version](https://badge.fury.io/py/pyirk.svg)](https://pypi.org/project/pyirk/)
[![Documentation Status](https://readthedocs.org/projects/pyirk-core/badge/?version=latest)](https://pyirk-core.readthedocs.io/en/latest)
![ci](https://github.com/ackrep-org/pyirk-core/actions/workflows/python-app.yml/badge.svg)


# Overview: pyerk
# Overview: pyirk

Pyerk is the python implementation of the ***e**mergent **r**epresentation of **k**nowledge* framework.
Pyirk is a Python framework for ***i**mperative **r**epresentation of **k**nowledge*.

- Designed to formally represent knowledge (including meta levels)
- Implementation-status: "early alpha"
- Inspired by OWL, but much more expressive
- ... at the cost of guarantied computability
- Inspired by Wikidata, but much simpler
- Inspired by SUO-KIF, but with less brackets
- Represented directly in python: → imperative instaead of declarative knowledge representation
- Represented directly in python: → imperative instead of declarative knowledge representation


Pyerk originated and is currently (2022) mainly developed with focus on representing knowledge from the domain of *control theory* as part of the *Automatic Control Knowledge Repository ([ACKREP](https://ackrep.org))*. However, in principle, it aims to be applicable wo a wide range of domains.

While pyirk aims to be applicable to a wide range of knowledge domains, its origin an its current (2023) main focus is the representation of knowledge from the domain of *control theory* as part of the *Automatic Control Knowledge Repository ([ACKREP](https://ackrep.org))*.
Thus, a subset of the [Ontology of Control Systems Engineering](https://github.com/ackrep-org/ocse) is used as test data for pyirk. In fact, both projects are practically co-developed.

# Assumed Directory Structure
Not that, originally pyirk was called pyerk (imperative representation of knowledge), in case you come across some old version.

# Recommended Directory Structure

```
<erk-root>/
├── pyerk/ ← repo with the code of the core package
<irk-root>/
├── pyirk-core/ ← repo with the code of the core package
│ ├── .git/
│ ├── README.md ← the currently displayed file (README.md)
│ ├── setup.py ← deployment script
│ ├── src/pyerk/auxiliary.py ← module containing function get_erk_root_dir()
│ ├── src/pyirk/auxiliary.py ← module containing function get_irk_root_dir()
│ └── ...
├── django-erk-gui/ ← repo with the code for the django gui (project and! app)
├── django-irk-gui/ ← repo with the code for the django gui (project and! app)
│ │ (this package is optional)
│ ├── .git/
│ ├── manage.py
│ └── ...
├── erk-data/ ← directory that contains erk-knowledge packages (for actual usage)
│ ├── ocse/ ← a knowledge package (ontology of control systems engineering)
│ │ ├── .git/
│ │ ├── README.md
│ │ ├── ocse.py ← a knowledge module
│ │ │ (this one is currently used for unit testing)
│ │ └── ...
│ ├── xyz123/ ← another knowledge package
│ │ └── ...
│ └── ...
├── erk-data-for-unittests/ ← directory that contains erk-knowledge packages
│ └── ... (unittest version, probably older and different from
│ production data.)
└──...
```

# Documentation

Rudimentary documentation is available at <https://pyerk-core.readthedocs.io> (generated from the [`/docs`](/docs) directory). To get an overview of the most importent features you might also want to have a look at the source code, especially at the files [builtin_entities.py](/src/pyerk/builtin_entities.py) and the [test_core.py](tests/test_core.py).
Rudimentary documentation is available at <https://pyirk-core.readthedocs.io> (generated from the [`/docs`](/docs) directory). To get an overview of the most important features you might also want to have a look at the source code, especially at the files [builtin_entities.py](/src/pyirk/builtin_entities.py) and the test cases, e.g., [test_core.py](tests/test_core.py).


# Coding style
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Run `pip install -r requirements.txt` in this directory to install the dependenc
Run `make html` in this directory to build the docs on your system. See `build/html` for the result.


Automatically generated documentation is available at: <https://pyerk-core.readthedocs.io>. (Be sure to select the branch of interest from the menu in the lower right).
Automatically generated documentation is available at: <https://pyirk-core.readthedocs.io>. (Be sure to select the branch of interest from the menu in the lower right).


### Debug Readthedocs Build
Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
sys.path.insert(0, pathlib.Path(__file__).parents[2].resolve().as_posix())
# print(sys.path[0])

import pyerk
import pyirk

# -- Project information -----------------------------------------------------

project = "pyerk"
project = "pyirk"
copyright = "2022, Ackrep Team"
author = "Carsten Knoll et. al."

# The full version, including alpha/beta/rc tags
release = pyerk.__version__
release = pyirk.__version__


# -- General configuration ---------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions docs/source/devdoc/overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(sec_devdoc_overview)=
# pyerk Developer Documentation Overview
# pyirk Developer Documentation Overview



Expand All @@ -13,7 +13,7 @@ Originally the "real" OCSE data was used for testing. This had the advantage of
To keep the test data small but avoid additional maintaince effort we now automatically extract the relevant entities and statements from the real ocse.

```bash
pyerk -utd <path/to/ocse/dir>
pyirk -utd <path/to/ocse/dir>
```

Which entities (and objects) are relevant is specified in the `ocse_subset/templates` subdirectory of `testdata`. The syntax of the template files is as follows:
Expand Down
16 changes: 8 additions & 8 deletions docs/source/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Python Based Emergent Representation of Knowledge (Pyerk)
# Python Based Imperative Representation of Knowledge (Pyirk)

Pyerk is an experimental framework for *imperative* knowledge representation. I is basically a collection of classes and functions which facilitates the construction of and the interaction with knowledge graphs.
Pyirk is an experimental framework for *imperative* knowledge representation. I is basically a collection of classes and functions which facilitates the construction of and the interaction with knowledge graphs.

The framewok is structurally inspired by

Expand All @@ -12,7 +12,7 @@ The framewok is structurally inspired by
- [Suggested Upper Merged Ontology (SUMO)](https://www.ontologyportal.org/)
- modelling of higher order statements

However, pyerk is a pure python framework and aims to be intuitively usable without prior familiarity with knowledge engineering techniques such as OWL, but instead requiring only some understanding of programming.
However, pyirk is a pure python framework and aims to be intuitively usable without prior familiarity with knowledge engineering techniques such as OWL, but instead requiring only some understanding of programming.

## Motivation

Expand All @@ -22,17 +22,17 @@ While library catalogues, full text search engines and similar facilities help a

One reason is that the available technologies like OWL (based on so called [description logic](https://en.wikipedia.org/wiki/description_logic)) are widely considered to be hard to grasp by non-specialists. The current mainstream approach of formal knowledge representation thus consists the cooperation between domain-experts and knowledge engineers to create useful knowledge bases for specific domains.

In contrast, Pyerk aims to enable domain-experts themselves to create such knowledge bases, by providing an interface in the widespread Python programming language, which poses a significantly lower barrier compared to the special purpose OWL.
In contrast, Pyirk aims to enable domain-experts themselves to create such knowledge bases, by providing an interface in the widespread Python programming language, which poses a significantly lower barrier compared to the special purpose OWL.

Pyerk also aims to allow for much greater [expressive power](https://en.wikipedia.org/wiki/Expressive_power_(computer_science)) (e.g. allowing higher order logic statements) than most other approaches, despite the computational consequences.
Pyirk also aims to allow for much greater [expressive power](https://en.wikipedia.org/wiki/Expressive_power_(computer_science)) (e.g. allowing higher order logic statements) than most other approaches, despite the computational consequences.

## Status

The whole Pyerk project and even much more this documentation is currently still under development and should be considered as incomplete and only partially functional. Nevertheless some usefulness cannot be excluded.
The whole Pyirk project and even much more this documentation is currently still under development and should be considered as incomplete and only partially functional. Nevertheless some usefulness cannot be excluded.


## User Documentation
Information regarding the local usage of pyerk.
Information regarding the local usage of pyirk.
```{toctree}
:maxdepth: 1
:caption: User Documentation
Expand All @@ -43,7 +43,7 @@ userdoc/overview


## Developer Documentation
Information regarding actively contributing to pyerk.
Information regarding actively contributing to pyirk.
```{toctree}
:maxdepth: 1
:caption: Developer Documentation
Expand Down
4 changes: 2 additions & 2 deletions docs/source/userdoc/cli.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

.. argparse::
:module: pyerk.script
:module: pyirk.script
:func: create_parser
:prog: pyerk
:prog: pyirk
Loading

0 comments on commit b8b4c5b

Please sign in to comment.