triplets 0.0.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ include versioneer.py
2
+ include triplet_tools/_version.py
@@ -0,0 +1,46 @@
1
+ Metadata-Version: 2.1
2
+ Name: triplets
3
+ Version: 0.0.3
4
+ Summary: Simple RDF tools to load/modify/export RDF data using Pandas DataFrames
5
+ Home-page: https://github.com/Haigutus/rdf_tools
6
+ Author: Kristjan Vilgo
7
+ Author-email: kristjan.vilgo@gmail.com
8
+ License: MIT
9
+ Description: # RDF parser:
10
+
11
+ - Parses CIM RDF/XML data to pandas dataframe with 4 columns [ID, KEY, VALUE, INSTANCE_ID] (triplestore like)
12
+ - The solution does not care about CIM version nor namespaces
13
+ - Input files can be xml or zip files (containing one or mutiple xml files)
14
+ - 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
15
+
16
+ ## To get started:
17
+
18
+ ```python
19
+ import pandas
20
+ from triplets import rdf_parser
21
+
22
+ path = "CGMES_v2.4.15_RealGridTestConfiguration_v2.zip"
23
+ data = pandas.read_RDF([path])
24
+ ```
25
+
26
+ ## Result:
27
+
28
+ ![image](https://user-images.githubusercontent.com/11408965/64228384-53350500-ceef-11e9-9a8b-473ed1dc6e4d.png)
29
+
30
+
31
+ You can then query a dataframe of all same type elements and its parameters across all [EQ, SSH, TP, SV etc.] instance files, where parameters are columns and index is object ID-s
32
+
33
+ ```python
34
+ data.type_tableview("ACLineSegment")
35
+ ```
36
+
37
+ ![image](https://user-images.githubusercontent.com/11408965/64228433-7eb7ef80-ceef-11e9-81d4-43e39ecf099d.png)
38
+
39
+
40
+ Look into examples folders for more
41
+
42
+ Platform: UNKNOWN
43
+ Classifier: Programming Language :: Python :: 3
44
+ Classifier: License :: OSI Approved :: MIT License
45
+ Classifier: Operating System :: OS Independent
46
+ Description-Content-Type: text/markdown
@@ -0,0 +1,32 @@
1
+ # RDF parser:
2
+
3
+ - Parses CIM RDF/XML data to pandas dataframe with 4 columns [ID, KEY, VALUE, INSTANCE_ID] (triplestore like)
4
+ - The solution does not care about CIM version nor namespaces
5
+ - Input files can be xml or zip files (containing one or mutiple xml files)
6
+ - 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
7
+
8
+ ## To get started:
9
+
10
+ ```python
11
+ import pandas
12
+ from triplets import rdf_parser
13
+
14
+ path = "CGMES_v2.4.15_RealGridTestConfiguration_v2.zip"
15
+ data = pandas.read_RDF([path])
16
+ ```
17
+
18
+ ## Result:
19
+
20
+ ![image](https://user-images.githubusercontent.com/11408965/64228384-53350500-ceef-11e9-9a8b-473ed1dc6e4d.png)
21
+
22
+
23
+ You can then query a dataframe of all same type elements and its parameters across all [EQ, SSH, TP, SV etc.] instance files, where parameters are columns and index is object ID-s
24
+
25
+ ```python
26
+ data.type_tableview("ACLineSegment")
27
+ ```
28
+
29
+ ![image](https://user-images.githubusercontent.com/11408965/64228433-7eb7ef80-ceef-11e9-81d4-43e39ecf099d.png)
30
+
31
+
32
+ Look into examples folders for more
@@ -0,0 +1,12 @@
1
+ [versioneer]
2
+ vcs = git
3
+ style = pep440
4
+ versionfile_source = triplets/_version.py
5
+ versionfile_build = triplets/_version.py
6
+ tag_prefix =
7
+ parentdir_prefix = triplets
8
+
9
+ [egg_info]
10
+ tag_build =
11
+ tag_date = 0
12
+
@@ -0,0 +1,27 @@
1
+ from setuptools import setup
2
+ import versioneer
3
+
4
+ with open("README.md", "r") as fh:
5
+ long_description = fh.read()
6
+
7
+ setup(
8
+ name='triplets',
9
+ version=versioneer.get_version().split("+")[0],
10
+ cmdclass=versioneer.get_cmdclass(),
11
+ packages=['triplets'],
12
+ long_description=long_description,
13
+ long_description_content_type="text/markdown",
14
+ url='https://github.com/Haigutus/rdf_tools',
15
+ license='MIT',
16
+ author='Kristjan Vilgo',
17
+ author_email='kristjan.vilgo@gmail.com',
18
+ description='Simple RDF tools to load/modify/export RDF data using Pandas DataFrames',
19
+ install_requires=[
20
+ "pandas", "lxml", 'aniso8601',
21
+ ],
22
+ classifiers=[
23
+ "Programming Language :: Python :: 3",
24
+ "License :: OSI Approved :: MIT License",
25
+ "Operating System :: OS Independent",
26
+ ]
27
+ )
@@ -0,0 +1,6 @@
1
+ from triplets import rdf_parser
2
+ from triplets import cgmes_tools
3
+ from triplets import rdfs_tools
4
+ from ._version import get_versions
5
+ __version__ = get_versions()['version']
6
+ del get_versions
@@ -0,0 +1,21 @@
1
+
2
+ # This file was generated by 'versioneer.py' (0.18) from
3
+ # revision-control system data, or from the parent directory name of an
4
+ # unpacked source archive. Distribution tarballs contain a pre-generated copy
5
+ # of this file.
6
+
7
+ import json
8
+
9
+ version_json = '''
10
+ {
11
+ "date": "2023-03-23T07:38:57+0200",
12
+ "dirty": false,
13
+ "error": null,
14
+ "full-revisionid": "d089c47c71cfe645bfa08117dd5378f52bc99502",
15
+ "version": "0.0.3"
16
+ }
17
+ ''' # END VERSION_JSON
18
+
19
+
20
+ def get_versions():
21
+ return json.loads(version_json)