pandahub 0.3.10__zip → 0.3.11__zip
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.
- {pandahub-0.3.10 → pandahub-0.3.11}/CHANGELOG.md +4 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/PKG-INFO +1 -1
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/lib/PandaHub.py +3 -11
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/lib/database_toolbox.py +17 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub.egg-info/PKG-INFO +1 -1
- {pandahub-0.3.10 → pandahub-0.3.11}/pyproject.toml +1 -1
- {pandahub-0.3.10 → pandahub-0.3.11}/CONTRIBUTING.rst +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/LICENSE +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/MANIFEST.in +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/README.md +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/__init__.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/__init__.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/dependencies.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/internal/__init__.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/internal/db.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/internal/schemas.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/internal/settings.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/internal/toolbox.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/internal/users.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/main.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/routers/__init__.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/routers/auth.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/routers/net.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/routers/projects.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/routers/timeseries.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/routers/users.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/api/routers/variants.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/lib/__init__.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/lib/datatypes.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/lib/mongodb_indexes.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/lib/timeseries/__init__.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/lib/timeseries/data_sources/__init__.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/lib/timeseries/data_sources/mongo_data.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub/lib/timeseries/output_writer_mongodb.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub.egg-info/SOURCES.txt +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub.egg-info/dependency_links.txt +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub.egg-info/requires.txt +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/pandahub.egg-info/top_level.txt +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/requirements.txt +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/setup.cfg +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/setup.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/test/__init__.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/test/conftest.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/test/performance_test.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/test/test_client.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/test/test_networks.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/test/test_projects.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/test/test_timeseries.py +0 -0
- {pandahub-0.3.10 → pandahub-0.3.11}/tutorials/config.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pandahub
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.11
|
|
4
4
|
Summary: Data hub for pandapower and pandapipes networks based on MongoDB
|
|
5
5
|
Author-email: Jan Ulffers <jan.ulffers@iee.fraunhofer.de>, Leon Thurner <leon.thurner@retoflow.de>, Jannis Kupka <jannis.kupka@retoflow.de>, Mike Vogt <mike.vogt@iee.fraunhofer.de>, Joschka Thurner <joschka.thurner@retoflow.de>, Alexander Scheidler <alexander.scheidler@iee.fraunhofer.de>
|
|
6
6
|
License: Copyright (c) 2022 by University of Kassel, Fraunhofer Institute for Energy Economics
|
|
@@ -23,12 +23,14 @@ import pandapipes as pps
|
|
|
23
23
|
from pandapipes import from_json_string as from_json_pps, FromSerializableRegistryPpipe
|
|
24
24
|
import pandapower as pp
|
|
25
25
|
import pandapower.io_utils as io_pp
|
|
26
|
+
|
|
26
27
|
from pandahub.api.internal.settings import MONGODB_URL, MONGODB_USER, MONGODB_PASSWORD, MONGODB_GLOBAL_DATABASE_URL, \
|
|
27
28
|
MONGODB_GLOBAL_DATABASE_USER, MONGODB_GLOBAL_DATABASE_PASSWORD, CREATE_INDEXES_WITH_PROJECT
|
|
28
29
|
from pandahub.lib.database_toolbox import (
|
|
29
30
|
create_timeseries_document,
|
|
30
31
|
convert_timeseries_to_subdocuments,
|
|
31
32
|
convert_element_to_dict,
|
|
33
|
+
get_mongo_client,
|
|
32
34
|
json_to_object,
|
|
33
35
|
serialize_object_data,
|
|
34
36
|
get_dtypes,
|
|
@@ -94,19 +96,9 @@ class PandaHub:
|
|
|
94
96
|
mongodb_indexes=MONGODB_INDEXES,
|
|
95
97
|
elements_without_vars = None,
|
|
96
98
|
):
|
|
97
|
-
mongo_client_args = {
|
|
98
|
-
"host": connection_url,
|
|
99
|
-
"uuidRepresentation": "standard",
|
|
100
|
-
"connect": False,
|
|
101
|
-
}
|
|
102
|
-
if connection_user:
|
|
103
|
-
mongo_client_args |= {
|
|
104
|
-
"username": connection_user,
|
|
105
|
-
"password": connection_password,
|
|
106
|
-
}
|
|
107
99
|
self._datatypes = datatypes
|
|
108
100
|
self.mongodb_indexes = mongodb_indexes
|
|
109
|
-
self.mongo_client =
|
|
101
|
+
self.mongo_client = get_mongo_client(connection_url, connection_user, connection_password)
|
|
110
102
|
self.mongo_client_global_db = None
|
|
111
103
|
self.active_project = None
|
|
112
104
|
self.user_id = user_id
|
|
@@ -3,6 +3,9 @@ from typing import Optional
|
|
|
3
3
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
import pandas as pd
|
|
6
|
+
from pymongo import MongoClient
|
|
7
|
+
|
|
8
|
+
from pandahub.api.internal.settings import MONGODB_URL, MONGODB_USER, MONGODB_PASSWORD
|
|
6
9
|
from pandahub.lib.datatypes import DATATYPES
|
|
7
10
|
import base64
|
|
8
11
|
import hashlib
|
|
@@ -421,3 +424,17 @@ def migrate_userdb_to_beanie(ph):
|
|
|
421
424
|
{'$unset': 'id'},
|
|
422
425
|
{'$out': 'users'}]
|
|
423
426
|
userdb.aggregate(migration)
|
|
427
|
+
|
|
428
|
+
def get_mongo_client(connection_url=MONGODB_URL, connection_user=MONGODB_USER,
|
|
429
|
+
connection_password=MONGODB_PASSWORD) -> MongoClient:
|
|
430
|
+
mongo_client_args = {
|
|
431
|
+
"host": connection_url,
|
|
432
|
+
"uuidRepresentation": "standard",
|
|
433
|
+
"connect": False,
|
|
434
|
+
}
|
|
435
|
+
if connection_user:
|
|
436
|
+
mongo_client_args |= {
|
|
437
|
+
"username": connection_user,
|
|
438
|
+
"password": connection_password,
|
|
439
|
+
}
|
|
440
|
+
return MongoClient(**mongo_client_args)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pandahub
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.11
|
|
4
4
|
Summary: Data hub for pandapower and pandapipes networks based on MongoDB
|
|
5
5
|
Author-email: Jan Ulffers <jan.ulffers@iee.fraunhofer.de>, Leon Thurner <leon.thurner@retoflow.de>, Jannis Kupka <jannis.kupka@retoflow.de>, Mike Vogt <mike.vogt@iee.fraunhofer.de>, Joschka Thurner <joschka.thurner@retoflow.de>, Alexander Scheidler <alexander.scheidler@iee.fraunhofer.de>
|
|
6
6
|
License: Copyright (c) 2022 by University of Kassel, Fraunhofer Institute for Energy Economics
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pandahub"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.11" # File format version '__format_version__' is tracked in __init__.py
|
|
8
8
|
authors=[
|
|
9
9
|
{ name = "Jan Ulffers", email = "jan.ulffers@iee.fraunhofer.de" },
|
|
10
10
|
{ name = "Leon Thurner", email = "leon.thurner@retoflow.de" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|