diff --git a/.github/workflows/automated-testing.yaml b/.github/workflows/automated-testing.yaml
index 00f7090a8..8aa9327ea 100644
--- a/.github/workflows/automated-testing.yaml
+++ b/.github/workflows/automated-testing.yaml
@@ -104,8 +104,8 @@ jobs:
mkdir -p ontologies/oeo/1/modules
wget https://openenergyplatform.org/ontology/oeo/releases/oeo-full.owl -P ontologies/oeo/1/
- mkdir -p ontologies/oeo_ext/
- cp oeo_ext/oeo_extended_store/oeox_template/oeo_ext_template_empty.owl ontologies/oeo_ext/oeo_ext.owl
+ mkdir -p media/oeo_ext/
+ cp oeo_ext/oeo_extended_store/oeox_template/oeo_ext_template_empty.owl media/oeo_ext/oeo_ext.owl
- name: Collectstatic files & compress
run: |
cp oeplatform/securitysettings.py.default oeplatform/securitysettings.py
diff --git a/dataedit/static/metaedit/schema.json b/dataedit/static/metaedit/schema.json
index 0cee47fc8..f8006ad88 100644
--- a/dataedit/static/metaedit/schema.json
+++ b/dataedit/static/metaedit/schema.json
@@ -69,7 +69,7 @@
"format": "button",
"options": {
"button": {
- "text": "Open OEO-EXT",
+ "text": "Open OEO-extended",
"icon": "external-link-alt",
"action": "openModalAction"
}
@@ -597,7 +597,7 @@
"format": "button",
"options": {
"button": {
- "text": "Open OEO-EXT",
+ "text": "Open OEO-extended",
"icon": "external-link-alt",
"action": "openModalAction"
}
@@ -653,7 +653,7 @@
"format": "button",
"options": {
"button": {
- "text": "Open OEO-EXT",
+ "text": "Open OEO-extended",
"icon": "external-link-alt",
"action": "openModalAction"
}
diff --git a/docker/Dockerfile b/docker/Dockerfile
index b9bd982fc..aea12da50 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -19,6 +19,8 @@ COPY ./docker/docker-entrypoint.sh /app/docker-entrypoint.sh
RUN mkdir -p /app/ontologies/oeo && cd /app/ontologies/oeo && wget https://github.com/OpenEnergyPlatform/ontology/releases/download/v2.4.0/build-files.zip && unzip build-files.zip && mv build-files 2.4.0 && rm -r __MACOSX && rm build-files.zip
+RUN mkdir -p /app/media/oeo_ext && cp /app/oeo_ext/oeo_extended_store/oeox_template/oeo_ext_template_empty.owl /app/media/oeo_ext/oeo_ext.owl
+
RUN cp /app/oeplatform/securitysettings.py.default /app/oeplatform/securitysettings.py && python manage.py collectstatic --noinput && rm /app/oeplatform/securitysettings.py
EXPOSE 80
diff --git a/docs/install-and-documentation/install/installation.md b/docs/install-and-documentation/install/installation.md
index 0670ff9cf..43f2d1025 100644
--- a/docs/install-and-documentation/install/installation.md
+++ b/docs/install-and-documentation/install/installation.md
@@ -275,6 +275,22 @@ The oeo-viewer is a visualization tool for our OEO ontology and it is under deve
After these steps, a `static` folder inside `oep-website/oeplatform/oeo_viewer/` will be created which includes the results of the `npm run build` command. These files are necessary for the oeo-viewer.
+## 6.2 Setup the OEO-extended app
+
+The OEO-extended ([oeo_ext](https://github.com/OpenEnergyPlatform/oeplatform/tree/develop/oeo_ext)) app is implemented as a plugin view that can quickly be added to any page of the OEP-website. Currently it is implemented in the OEMetaBuilder to add new composed units that can be annotated in the oemetadata. The OEO-extended itself is a ontology that extends the OEO and it is stored as OWL file format inside the media directory of the oeplatform. As the app itself will write to the files once the user submits a new unit via the interface you must grant access permissions on that directory to the user that runs the oeplatform code on your specific server.
+
+Setup a new folder in the `MEDIA_ROOT` directory specified in the `securitysettings.py`. By default this directory is called `media/`. You must create the sub directory specified in the setting `OEO_EXT_PATH` and add the OEO-extended files with the name specified in the `OEO_EXT_OWL_NAME` setting from `settings.py`.
+
+To get started you can copy the template OEO-extended owl file form [`oeplatform/oeo_ext/oeo_extended_store/oeox_template/oeo_ext_template_empty.owl`](https://github.com/OpenEnergyPlatform/oeplatform/tree/develop/oeo_ext/oeo_extended_store/oeox_template).
+
+Below you can find the desired structure using the default setting values:
+
+ ```bash
+ media/
+ └── oeo_ext
+ └── oeo_ext.owl
+ ```
+
## 7 Setup the Scenario-Bundles app
!!! note "Optional Step"
diff --git a/oeo_ext/templates/oeo_ext/partials/oeo-ext-plugin-ui.html b/oeo_ext/templates/oeo_ext/partials/oeo-ext-plugin-ui.html
index bdc97fb4f..15a0c8ee6 100644
--- a/oeo_ext/templates/oeo_ext/partials/oeo-ext-plugin-ui.html
+++ b/oeo_ext/templates/oeo_ext/partials/oeo-ext-plugin-ui.html
@@ -1,6 +1,25 @@
{% load django_bootstrap5 %}
+
+ With the extended OEO functionality, you can expand the terms found in the OEO.
+ Currently we only offer the possibility to create additional units. As it is possible
+ to create any combination of existing terms using the form below, the OEO extended module
+ will be stored on the OEP but also made available on
GitHub.
+ Before each release, we will review the content of the OEO extended with all newly composed entities
+ contributed by the Open Energy Family community.
+ We are about to publish an paper describing the approach used here and will provide the link shortly.
+
+
+
+ Early Access
+
+
+ This feature is still a research prototype and offers only a minimal user experience.
+ After you successfully create a new composed unit, you need to copy the URL, which then becomes
+ visible. You can access the URL in your browser and copy the name and URL into the oemetadata fields
+ for "Name" and "Path" as soon as you close this overlay.
+
Result
diff --git a/oeo_ext/views.py b/oeo_ext/views.py
index 600b5577f..1d4dd75e1 100644
--- a/oeo_ext/views.py
+++ b/oeo_ext/views.py
@@ -7,6 +7,7 @@
from oeo_ext.forms import ComposedUnitFormWrapper, UnitEntryForm
from oeo_ext.utils import create_new_unit
+from oeplatform.settings import EXTERNAL_URLS
# Suggested views maybe you will use other ones @adel
@@ -21,6 +22,7 @@ def get(self, request):
"form": form,
"nominator_forms": [],
"denominator_forms": [],
+ "oeox_github_link": EXTERNAL_URLS["oeo_extended_github"],
}
return render(request, "oeo_ext/partials/oeo-ext-plugin-ui.html", context)
diff --git a/oeplatform/settings.py b/oeplatform/settings.py
index 96e087910..981be9d4e 100644
--- a/oeplatform/settings.py
+++ b/oeplatform/settings.py
@@ -97,6 +97,7 @@
"tib_ts_oeo": "https://terminology.tib.eu/ts/ontologies/oeo",
"spdx_licenses": "https://spdx.github.io/license-list-data/",
"oemetadata_key_description": "https://github.com/OpenEnergyPlatform/oemetadata/blob/master/metadata/latest/metadata_key_description.md", # noqa E501
+ "oeo_extended_github": "https://github.com/OpenEnergyPlatform/oeo-extended", # noqa E501
}
# Kept this separate for now to avoid messing with the other list ...
@@ -152,6 +153,12 @@ def external_urls_context_processor(request):
except NameError:
BASE_DIR = ""
+# from security settings
+try:
+ MEDIA_ROOT # noqa F405
+except NameError:
+ MEDIA_ROOT = "/media"
+
try:
ONTOLOGY_ROOT # noqa F405
except NameError:
@@ -165,7 +172,8 @@ def external_urls_context_processor(request):
)
OPEN_ENERGY_ONTOLOGY_FULL_OWL_NAME = "oeo-full.owl"
- OEO_EXT_PATH = Path(ONTOLOGY_ROOT, "oeo_ext")
+if MEDIA_ROOT:
+ OEO_EXT_PATH = Path(MEDIA_ROOT, "oeo_ext")
OEO_EXT_NAME = "oeox"
OEO_EXT_OWL_NAME = "oeo_ext.owl"
OEO_EXT_OWL_PATH = OEO_EXT_PATH / OEO_EXT_OWL_NAME
diff --git a/versions/changelogs/current.md b/versions/changelogs/current.md
index abd862ded..7e961d9df 100644
--- a/versions/changelogs/current.md
+++ b/versions/changelogs/current.md
@@ -13,8 +13,11 @@
- Enhance the ontology pages, remove the modules page and fully rework the about page and oeo download capabilities. Additionally add the oeox and make its URIs available, also add more cases where a Http404 is raised to make [(#1807)](https://github.com/OpenEnergyPlatform/oeplatform/pull/1807)
- Update the OpenEnergyFamily group picture on the about page [(#1816)](https://github.com/OpenEnergyPlatform/oeplatform/pull/1816)
+
- Update existing ontology layout [(#1850)](https://github.com/OpenEnergyPlatform/oeplatform/pull/1850)
+- Add the Early access indicator to oeox plugin view buttons & The oeox owl file is now stored in the media directory to avoid writing to insecure directory. [(#1857)](https://github.com/OpenEnergyPlatform/oeplatform/pull/1857)
+
- Add the page header bar (name of feature and on page navigation below nav bar) to data upload wizard & oeo-viewer pages including links to external sources and academy tutorials [(#1860)](https://github.com/OpenEnergyPlatform/oeplatform/pull/1860).
- Remove "Create Table" card from wizard feature if the table exists and the user want to upload CSV data. (Note: Later on it should be possible to edit the table structure and possibly rename the table) [(#1860)](https://github.com/OpenEnergyPlatform/oeplatform/pull/1860).
@@ -36,4 +39,7 @@
## Documentation updates
- Improved OpenAPI documentation of oeplatform REST-API [(#1793)](https://github.com/OpenEnergyPlatform/oeplatform/pull/1793)
+
- Updated documentation for docker to include how to restart oeplatform [(#1830)](https://github.com/OpenEnergyPlatform/oeplatform/pull/1830)
+
+- Enhance installation instruction with information on how to setup the OEO-extended feature [(#1857)](https://github.com/OpenEnergyPlatform/oeplatform/pull/1857).