Skip to content

Commit 3a5ac50

Browse files
committed
Documentation updates
1 parent ff7b760 commit 3a5ac50

File tree

8 files changed

+131
-14
lines changed

8 files changed

+131
-14
lines changed

README.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
# RDF parser:
1+
### About:
22

33
- Parses CIM RDF/XML data to pandas dataframe with 4 columns [ID, KEY, VALUE, INSTANCE_ID] (triplestore like)
44
- The solution does not care about CIM version nor namespaces
55
- Input files can be xml or zip files (containing one or mutiple xml files)
66
- All files are parsed into one and same Pandas DataFrame, thus if you want single file or single data model, you need to filter on INSTANCE_ID column
77

8-
## Documentation:
8+
### Documentation:
99
https://haigutus.github.io/triplets
1010

11-
## To get started:
11+
### To get started:
12+
13+
```shell
14+
python -m pip install triplets
15+
```
16+
1217

1318
```python
1419
import pandas
@@ -18,7 +23,7 @@ path = "CGMES_v2.4.15_RealGridTestConfiguration_v2.zip"
1823
data = pandas.read_RDF([path])
1924
```
2025

21-
## Result:
26+
### Result:
2227

2328
![image](https://user-images.githubusercontent.com/11408965/64228384-53350500-ceef-11e9-9a8b-473ed1dc6e4d.png)
2429

@@ -32,4 +37,14 @@ data.type_tableview("ACLineSegment")
3237
![image](https://user-images.githubusercontent.com/11408965/64228433-7eb7ef80-ceef-11e9-81d4-43e39ecf099d.png)
3338

3439

40+
### Export:
41+
42+
```python
43+
data.export_to_cimxml(
44+
rdf_map=schemas.ENTSOE_CGMES_2_4_15_552_ED1,
45+
export_type=ExportType.XML_PER_INSTANCE_ZIP_PER_XML,
46+
)
47+
```
48+
49+
3550
Look into examples folders for more

docs/generate_documentation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sphinx-apidoc -f -M --separate -o source/ ../triplets ../triplets/rdfs_tools ../triplets/export_schema
1+
sphinx-apidoc -f -o docs/source triplets

docs/source/conf.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,15 @@
2626
'sphinx.ext.napoleon', # Support for NumPy-style docstrings
2727
'sphinx.ext.viewcode', # Add links to source code
2828
'sphinx.ext.githubpages', # Configures export suitable for github pages
29-
'sphinx_multiversion'
29+
'sphinx_multiversion',
30+
'myst_parser'
3031
]
3132

33+
source_suffix = {
34+
'.rst': 'restructuredtext',
35+
'.md': 'markdown',
36+
}
37+
3238
templates_path = ['_templates']
3339
exclude_patterns = [
3440
"setup.py",

docs/source/index.rst

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@
66
Documentation
77
======================
88

9+
.. toctree::
10+
:maxdepth: 1
11+
:caption: Quickstart:
12+
13+
quickstart
14+
915
.. toctree::
1016
:maxdepth: 2
1117
:caption: Contents:
1218

13-
triplets.cgmes_tools
1419
triplets.rdf_parser
20+
triplets.cgmes_tools
21+
triplets.rdfs_tools
1522

1623
Indices and tables
1724
==================

docs/source/quickstart.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Quickstart
2+
3+
```{include} ../../README.md
4+
```
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
triplets.export\_schema package
2+
===============================
3+
4+
Module contents
5+
---------------
6+
7+
.. automodule:: triplets.export_schema
8+
:members:
9+
:show-inheritance:
10+
:undoc-members:
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
triplets.rdfs\_tools package
2+
============================
3+
4+
Submodules
5+
----------
6+
7+
triplets.rdfs\_tools.RDFS\_to\_AzureDTDL\_V2 module
8+
---------------------------------------------------
9+
10+
.. automodule:: triplets.rdfs_tools.RDFS_to_AzureDTDL_V2
11+
:members:
12+
:show-inheritance:
13+
:undoc-members:
14+
15+
triplets.rdfs\_tools.cim\_rdfs\_to\_html module
16+
-----------------------------------------------
17+
18+
.. automodule:: triplets.rdfs_tools.cim_rdfs_to_html
19+
:members:
20+
:show-inheritance:
21+
:undoc-members:
22+
23+
triplets.rdfs\_tools.cim\_rdfs\_to\_json module
24+
-----------------------------------------------
25+
26+
.. automodule:: triplets.rdfs_tools.cim_rdfs_to_json
27+
:members:
28+
:show-inheritance:
29+
:undoc-members:
30+
31+
triplets.rdfs\_tools.cim\_rdfs\_to\_json\_deprecated module
32+
-----------------------------------------------------------
33+
34+
.. automodule:: triplets.rdfs_tools.cim_rdfs_to_json_deprecated
35+
:members:
36+
:show-inheritance:
37+
:undoc-members:
38+
39+
triplets.rdfs\_tools.rdfs\_tools module
40+
---------------------------------------
41+
42+
.. automodule:: triplets.rdfs_tools.rdfs_tools
43+
:members:
44+
:show-inheritance:
45+
:undoc-members:
46+
47+
Module contents
48+
---------------
49+
50+
.. automodule:: triplets.rdfs_tools
51+
:members:
52+
:show-inheritance:
53+
:undoc-members:

docs/source/triplets.rst

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,38 @@
11
triplets package
22
================
33

4-
.. automodule:: triplets
4+
Subpackages
5+
-----------
6+
7+
.. toctree::
8+
:maxdepth: 4
9+
10+
triplets.export_schema
11+
triplets.rdfs_tools
12+
13+
Submodules
14+
----------
15+
16+
triplets.cgmes\_tools module
17+
----------------------------
18+
19+
.. automodule:: triplets.cgmes_tools
520
:members:
621
:show-inheritance:
722
:undoc-members:
823

9-
Submodules
10-
----------
24+
triplets.rdf\_parser module
25+
---------------------------
1126

12-
.. toctree::
13-
:maxdepth: 4
27+
.. automodule:: triplets.rdf_parser
28+
:members:
29+
:show-inheritance:
30+
:undoc-members:
1431

15-
triplets.cgmes_tools
16-
triplets.rdf_parser
32+
Module contents
33+
---------------
34+
35+
.. automodule:: triplets
36+
:members:
37+
:show-inheritance:
38+
:undoc-members:

0 commit comments

Comments
 (0)