Skip to content

Commit

Permalink
Neat 418 fix docs (#612)
Browse files Browse the repository at this point in the history
* fix issues with steps

* remove print outs

* update v, and log

* update docs and workflow

* update v. and log

* Linting and static code checks

---------

Co-authored-by: nikokaoja <nikokaoja@users.noreply.github.com>
  • Loading branch information
nikokaoja and nikokaoja committed Sep 6, 2024
1 parent d4a3f75 commit 0fa38e3
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 214 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.PHONY: run-explorer run-tests run-linters build-ui build-python build-docker run-docker compose-up
version="0.90.1"
version="0.90.2"
run-explorer:
@echo "Running explorer API server..."
# open "http://localhost:8000/static/index.html" || true
Expand Down
2 changes: 1 addition & 1 deletion cognite/neat/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.90.1"
__version__ = "0.90.2"
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
configs: []
description: null
implementation_module: null
name: Visualize Semantic Data Model
name: Export Semantic Data Model
steps:
- complex_configs: {}
configs: {}
Expand Down Expand Up @@ -63,49 +63,4 @@ steps:
ui_config:
pos_x: 497
pos_y: 323
- complex_configs: {}
configs:
Disk storage directory: semantic-data-model
Graph: source
Graph store type: oxigraph
GraphDB API root URL: ''
Init procedure: reset
Query URL: ''
Update URL: ''
description: null
enabled: true
id: step_configure_graph_store
label: Configure Graph Store
max_retries: 0
method: GraphStoreConfiguration
params: {}
retry_delay: 3
stype: stdstep
system_component_id: null
transition_to:
- step_load_semantic_data_model
trigger: false
ui_config:
pos_x: 495
pos_y: 399
- complex_configs: {}
configs:
Add base URI: 'False'
File path: staging/semantic-data-model.ttl
MIME type: text/turtle
description: null
enabled: true
id: step_load_semantic_data_model
label: Load Semantic Data Model
max_retries: 0
method: GraphFromRdfFile
params: {}
retry_delay: 3
stype: stdstep
system_component_id: null
transition_to: []
trigger: false
ui_config:
pos_x: 495
pos_y: 476
system_components: []

This file was deleted.

9 changes: 9 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ Changes are grouped as follows:
- `Fixed` for any bug fixes.
- `Security` in case of vulnerabilities.

## [0.90.2] - 06-09-24
### Improved
- Visualize data model chapter in Knowledge Acquisition tutorial reduce to only export of data model to ontology
- New video made for the Export Semantic Data Model chapter in Knowledge Acquisition tutorial
- Workflow `Visualize_Semantic_Data_Model` renamed to `Export_Semantic_Data_Model` and reduce to only export

### Removed
- `Visualize_Data_Model_Using_Mock_Graph` removed since UI has been reduced to only have workflow builder & executor feature

## [0.90.1] - 06-09-24
### Fixed
- Fix issue with step doing file upload leading to blank screen in UI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ Nevertheless, this hard work pays off since the enterprise data model can be now



### Visualize Semantic Data Model
### Export Semantic Data Model
Due to additional information that David as an information architect has added to the enterprise data model,
David can exported Rules as semantic data model which consists of:

Expand All @@ -408,79 +408,16 @@ This file can be used in any ontology tool, such as [Protégé](https://protege.
both OWL and SHACL can be used to in a tool such as [SHACL Play!](https://shacl-play.sparna.fr/play/).

For purpose of this demonstration David will actually use `neat` to load generated semantic data model into
internal RDF store and visualize it using `neat` UI. To do this, David selects `Visualize Semantic Data Model` workflow
internal RDF store and visualize it using `neat` UI. To do this, David selects `Export Semantic Data Model` workflow
which unlike the previous is a bit more demanding as it requires configuration of additional steps, specifically:

- `RulesToSemanticDataModel` : which will convert `Rules` into semantic data model and store it as a Turtle file
- `GraphStoreConfiguration`: which will configure the internal RDF store
- `GraphFromRdfFile` : which will load the semantic data model (the Turtle file) into the internal RDF store

The process of configuration and execution of these steps is shown in the video below:

<iframe width="840" height="472" src="https://www.youtube.com/embed/_iTQatLBpns?si=CM8mcFsd9NlGZCGi" title="Semantic Data Model Generation and Visualization" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>


David is using following styling of nodes and edges to make the visualization more readable in neat,
which he copy/paste under `Node Style Editor` in `Graph Explorer`:

```JSON
{
"Class": {
"color": "#FF5733",
"size": 5
},
"NodeShape": {
"color": "#33FF57",
"size": 5
},
"ObjectProperty": {
"color": "#3357FF",
"size": 5
},
"DatatypeProperty": {
"color": "#F3FF33",
"size": 5
},
"Ontology": {
"color": "#FF33F6",
"size": 5
}
}
```

### Visualize Data Model through Mock Graph
To fully comprehend semantic data mode, one needs to understand basic semantic concepts.
But `neat` offer alternative way of visualizing the semantic data model, which is through
generation of mock graph based on the data model described in spreadsheets, and optionally
desired number of instances per class defined in the data model.

David selects `Visualize Data Model Using Mock Graph` which has been configured to create
the following mock graph, which is part `Generate Mock Graph` step:

```JSON
{"WindTurbine" : 10,
"WindFarm" : 1,
"OffshoreSubstation" : 1,
"DistributionSubstation" : 1,
"OnshoreSubstation" : 1,
"ArrayCable" : 1,
"ExportCable" : 1,
"Transmission" : 1,
"DistributionLine" : 1,
"Meter" : 1,
"ElectricCarCharger" : 1}
```

David uses the following style to color nodes in `Graph Explorer`:


```JSON
{"WindTurbine":{"color":"#FF0000","size":5},"WindFarm":{"color":"#00FF00","size":5},"OffshoreSubstation":{"color":"#0000FF","size":5},"TransmissionSubstation":{"color":"#FFFF00","size":5},"DistributionSubstation":{"color":"#00FFFF","size":5},"OnshoreSubstation":{"color":"#FF00FF","size":5},"ArrayCable":{"color":"#C0C0C0","size":5},"ExportCable":{"color":"#808080","size":5},"Transmission":{"color":"#800000","size":5},"DistributionLine":{"color":"#808000","size":5},"Meter":{"color":"#008080","size":5},"ElectricCarCharger":{"color":"#800080","size":5}}
```

The whole process of running this workflow is shown in the video below:

<iframe width="840" height="472" src="https://www.youtube.com/embed/D98AaPW_FXI?si=M3aVCj1bhvjXXWCf" title="Visualize data model using mock graph" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>


<iframe width="840" height="472" src="https://www.youtube.com/embed/rB9Orq46usA?si=9og4HWJDpJEgjrQL" title="Semantic Data Model Generation and Visualization" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>


### Summary
Expand All @@ -497,8 +434,7 @@ The whole process of running this workflow is shown in the video below:
**Information Architect usage of `neat`**:

1. Validate the sheet using the `neat` UI.
2. Visualize the sheet using the `neat` UI.
3. Export the ontology to an open standard format (e.g., OWL, SHACL, RDF).
2. Export data model to an open standard format (e.g., OWL, SHACL, RDF).


## DMS Architect: Alice
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cognite-neat"
version = "0.90.1"
version = "0.90.2"
readme = "README.md"
description = "Knowledge graph transformation"
authors = [
Expand Down

0 comments on commit 0fa38e3

Please sign in to comment.