qupled 1.3.4__cp311-cp311-macosx_13_0_x86_64.whl → 1.3.5__cp311-cp311-macosx_13_0_x86_64.whl
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.
- qupled/.dylibs/libomp.dylib +0 -0
- qupled/database.py +26 -5
- qupled/hf.py +9 -3
- qupled/lib/libfmt.a +0 -0
- qupled/native.cpython-311-darwin.so +0 -0
- {qupled-1.3.4.dist-info → qupled-1.3.5.dist-info}/METADATA +1 -1
- {qupled-1.3.4.dist-info → qupled-1.3.5.dist-info}/RECORD +10 -10
- {qupled-1.3.4.dist-info → qupled-1.3.5.dist-info}/WHEEL +0 -0
- {qupled-1.3.4.dist-info → qupled-1.3.5.dist-info}/licenses/LICENSE +0 -0
- {qupled-1.3.4.dist-info → qupled-1.3.5.dist-info}/top_level.txt +0 -0
qupled/.dylibs/libomp.dylib
CHANGED
Binary file
|
qupled/database.py
CHANGED
@@ -4,12 +4,15 @@ import struct
|
|
4
4
|
from datetime import datetime
|
5
5
|
from enum import Enum
|
6
6
|
from collections.abc import Callable
|
7
|
+
from pathlib import Path
|
7
8
|
|
8
9
|
import numpy as np
|
9
10
|
import sqlalchemy as sql
|
10
11
|
from sqlalchemy.dialects.sqlite import insert as sqlite_insert
|
11
12
|
import blosc2
|
12
13
|
|
14
|
+
from . import native
|
15
|
+
|
13
16
|
|
14
17
|
class DataBaseHandler:
|
15
18
|
"""
|
@@ -18,10 +21,13 @@ class DataBaseHandler:
|
|
18
21
|
and deleting data, as well as managing the database schema."
|
19
22
|
"""
|
20
23
|
|
24
|
+
BLOB_STORAGE_DIRECTORY = "blob_data"
|
25
|
+
DATABASE_DIRECTORY = "qupled_store"
|
21
26
|
DEFAULT_DATABASE_NAME = "qupled.db"
|
22
|
-
|
27
|
+
FIXED_TABLE_NAME = "fixed"
|
23
28
|
INPUT_TABLE_NAME = "inputs"
|
24
29
|
RESULT_TABLE_NAME = "results"
|
30
|
+
RUN_TABLE_NAME = "runs"
|
25
31
|
|
26
32
|
class TableKeys(Enum):
|
27
33
|
COUPLING = "coupling"
|
@@ -61,12 +67,23 @@ class DataBaseHandler:
|
|
61
67
|
result_table (sqlalchemy.Table): The table schema for storing result data.
|
62
68
|
run_id (int | None): The ID of the current run, or None if no run is active.
|
63
69
|
"""
|
64
|
-
|
65
|
-
|
70
|
+
# Database path
|
71
|
+
database_name = (
|
72
|
+
self.DEFAULT_DATABASE_NAME if database_name is None else database_name
|
66
73
|
)
|
67
|
-
|
68
|
-
|
74
|
+
database_path = Path(self.DATABASE_DIRECTORY) / database_name
|
75
|
+
database_path.parent.mkdir(parents=True, exist_ok=True)
|
76
|
+
# Blob data storage
|
77
|
+
self.blob_storage = (
|
78
|
+
Path(self.DATABASE_DIRECTORY) / self.BLOB_STORAGE_DIRECTORY / database_name
|
79
|
+
)
|
80
|
+
self.blob_storage.mkdir(parents=True, exist_ok=True)
|
81
|
+
self.blob_storage = str(self.blob_storage)
|
82
|
+
# Create database
|
83
|
+
self.engine = sql.create_engine(f"sqlite:///{database_path}")
|
84
|
+
# Set sqlite properties
|
69
85
|
DataBaseHandler._set_sqlite_pragma(self.engine)
|
86
|
+
# Create tables
|
70
87
|
self.table_metadata = sql.MetaData()
|
71
88
|
self.run_table = self._build_run_table()
|
72
89
|
self.input_table = self._build_inputs_table()
|
@@ -252,6 +269,7 @@ class DataBaseHandler:
|
|
252
269
|
Returns:
|
253
270
|
None
|
254
271
|
"""
|
272
|
+
self._delete_blob_data_on_disk(run_id)
|
255
273
|
condition = self.run_table.c[self.TableKeys.PRIMARY_KEY.value] == run_id
|
256
274
|
statement = sql.delete(self.run_table).where(condition)
|
257
275
|
self._execute(statement)
|
@@ -430,6 +448,9 @@ class DataBaseHandler:
|
|
430
448
|
if run_id := result.inserted_primary_key:
|
431
449
|
self.run_id = run_id[0]
|
432
450
|
|
451
|
+
def _delete_blob_data_on_disk(self, run_id: int):
|
452
|
+
native.delete_blob_data_on_disk(self.engine.url.database, run_id)
|
453
|
+
|
433
454
|
@staticmethod
|
434
455
|
def _set_sqlite_pragma(engine):
|
435
456
|
"""
|
qupled/hf.py
CHANGED
@@ -87,7 +87,11 @@ class Solver:
|
|
87
87
|
`self.inputs` with the current `run_id`.
|
88
88
|
"""
|
89
89
|
self.db_handler.insert_run(self.inputs)
|
90
|
-
self.inputs.database_info
|
90
|
+
self.inputs.database_info = DatabaseInfo(
|
91
|
+
blob_storage=self.db_handler.blob_storage,
|
92
|
+
name=self.db_handler.engine.url.database,
|
93
|
+
run_id=self.run_id,
|
94
|
+
)
|
91
95
|
|
92
96
|
def _compute_native(self):
|
93
97
|
"""
|
@@ -197,7 +201,7 @@ class Input:
|
|
197
201
|
processes: int = 1
|
198
202
|
"""Number of MPI processes for parallel calculations. Default = ``1``"""
|
199
203
|
theory: str = "HF"
|
200
|
-
database_info: DatabaseInfo =
|
204
|
+
database_info: DatabaseInfo = None
|
201
205
|
|
202
206
|
def to_native(self, native_input: any):
|
203
207
|
"""
|
@@ -290,7 +294,9 @@ class DatabaseInfo:
|
|
290
294
|
Class used to store the database information passed to the native code.
|
291
295
|
"""
|
292
296
|
|
293
|
-
|
297
|
+
blob_storage: str = None
|
298
|
+
"""Directory used to store the blob data"""
|
299
|
+
name: str = None
|
294
300
|
"""Database name"""
|
295
301
|
run_id: int = None
|
296
302
|
"""ID of the run in the database"""
|
qupled/lib/libfmt.a
CHANGED
Binary file
|
Binary file
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: qupled
|
3
|
-
Version: 1.3.
|
3
|
+
Version: 1.3.5
|
4
4
|
Summary: qupled: a package to investigate quantum plasmas via the dielectric formalism
|
5
5
|
Author-email: Federico Lucco Castello <federico.luccocastello@gmail.com>
|
6
6
|
License-Expression: GPL-3.0-or-later
|
@@ -1,13 +1,13 @@
|
|
1
|
-
qupled-1.3.
|
2
|
-
qupled-1.3.
|
3
|
-
qupled-1.3.
|
4
|
-
qupled-1.3.
|
5
|
-
qupled-1.3.
|
1
|
+
qupled-1.3.5.dist-info/RECORD,,
|
2
|
+
qupled-1.3.5.dist-info/WHEEL,sha256=RyxoEM-DdYra2rgZTpxdiJkmjbwgUQ_Obk5UCeDLiEQ,137
|
3
|
+
qupled-1.3.5.dist-info/top_level.txt,sha256=HLJfvnCPZQVptCRuekWA_3Z98SMkCNCXViGiGh8VenA,7
|
4
|
+
qupled-1.3.5.dist-info/METADATA,sha256=VBEeGlRY55_tDEe-9zoVegM0Ggyqep_TCqU2pAdSpJs,4559
|
5
|
+
qupled-1.3.5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
6
6
|
qupled/qstls.py,sha256=G2A5e_PUP1lsUaKEajrH3ZuY2lD5wxmsyYi8n7IN6nQ,2424
|
7
7
|
qupled/serialize.py,sha256=uNGQnAE2ABQnWSV-yjtEecByaaW1OzQ7I_Hp7g6z-_0,1325
|
8
8
|
qupled/rpa.py,sha256=5QwdMpqEj8WIR3Ncu605XzNr2Cw3afpqrK3OXSkgCPs,606
|
9
9
|
qupled/timer.py,sha256=q1X9mpvSaq2NxFk6P22ceclTSd2tkdofF1lPdENLuJ8,985
|
10
|
-
qupled/database.py,sha256=
|
10
|
+
qupled/database.py,sha256=NJP6bfMGZFD3_nMAAWCJH8HujPpFEVQjY_EXqA4WMh4,27424
|
11
11
|
qupled/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
12
12
|
qupled/stlsiet.py,sha256=4zJMMhz1lmqcAGVz2OqwDKZa00jD1wJ5TXnW7siFKbs,3254
|
13
13
|
qupled/qstlsiet.py,sha256=UInCZT6jpTot8TQ6arpgqNMIg_KetCf3NL1r5xwxZhw,1039
|
@@ -17,8 +17,8 @@ qupled/stls.py,sha256=pxsqQG2yI_I59kCf8QdUbrSat53gX63u-sgFLPzAflQ,2878
|
|
17
17
|
qupled/vsstls.py,sha256=E07rQGF8HReVioWIw54vitm5lYP_hbEOi2MhoQC4aKk,7607
|
18
18
|
qupled/qvsstls.py,sha256=ygJilrCV6d6byYerPhkDCccapDlqaBqu9k5O_lg8BB0,1642
|
19
19
|
qupled/output.py,sha256=VP_7oKPuULYa0UB-wX_J_cLnGd2mZZxrYeeTpNY-iwE,3602
|
20
|
-
qupled/hf.py,sha256=
|
21
|
-
qupled/native.cpython-311-darwin.so,sha256=
|
20
|
+
qupled/hf.py,sha256=7MtwNwx0XQS6BRC97IzK-OsJH78ahKMG57U5elI6g0Y,12297
|
21
|
+
qupled/native.cpython-311-darwin.so,sha256=0IeYCIo_hmIvuoMad9ro_yJxzEhcqwQ_7N_CrdD9Ca8,840944
|
22
22
|
qupled/include/fmt/ostream.h,sha256=-DnzYoGzasnlFOTG2UT29mmaIQG7NunUgJqt5L0l_2E,7305
|
23
23
|
qupled/include/fmt/format-inl.h,sha256=w5DfUohEgLEx3_0XhCrz3ejq5s1_Gq_aMLY--jadbmE,73646
|
24
24
|
qupled/include/fmt/ranges.h,sha256=h6mRGvU1Jz6fm-0A1towg7ce7DSRyaVAEyWKiCNCtvM,24446
|
@@ -33,11 +33,11 @@ qupled/include/fmt/compile.h,sha256=aapCl7QvJzu_rPXJ7r5Laia1UtBvt0zRUcRyYMN7aFA,
|
|
33
33
|
qupled/include/fmt/format.h,sha256=Y71aNNE5v8oXJ7-6-UGvu1dRyHGtqqkbd9zlinByMHM,164588
|
34
34
|
qupled/include/fmt/std.h,sha256=BkZ7QF9AKR9A8mxuRsFddWJUWBw5dBOnfAKyt9Yty0E,16239
|
35
35
|
qupled/.dylibs/libgsl.28.dylib,sha256=bz2mf3EcPIGdx0T2wpH6l6zVaQxRO2EtN1jqFEfJfIA,2439680
|
36
|
-
qupled/.dylibs/libomp.dylib,sha256=
|
36
|
+
qupled/.dylibs/libomp.dylib,sha256=EwgkPySZvdRZmOAZDfr6qILdIihbF_6oUNZf0SeT2vY,746320
|
37
37
|
qupled/.dylibs/libsqlite3.3.50.2.dylib,sha256=QcdP9n44ulhvjHwjHG30uom9zjvfCaa3gl-wW82fhM0,1257648
|
38
38
|
qupled/.dylibs/libgslcblas.0.dylib,sha256=NfWNFuXlzbMY4B6XtUhPyrR0cryXuXn4_rIkSCW_cH4,272784
|
39
39
|
qupled/.dylibs/libSQLiteCpp.0.dylib,sha256=q_todZm5D2whFhVGpE2yjqXSeh6I5ubQNiQ6MCebpCY,94192
|
40
|
-
qupled/lib/libfmt.a,sha256=
|
40
|
+
qupled/lib/libfmt.a,sha256=iZ0elioqXc0ZlbsYmdR3CwJFVh5q7W_zBr4HiEnt9eM,223864
|
41
41
|
qupled/lib/pkgconfig/fmt.pc,sha256=YABN-s6qMGhGxWJmZ3eUF9VfrI5TN4Ox0IBfvSVM7tA,353
|
42
42
|
qupled/lib/cmake/fmt/fmt-targets-release.cmake,sha256=0hurnnAYtVc8r8yvaxkXAS5Op01RPnwKE6SFNOL1nYA,807
|
43
43
|
qupled/lib/cmake/fmt/fmt-config.cmake,sha256=Cd-Xn_HSZ-Lk5ZBDX8q49OQKSvnS0_k4r0-tb6G8LW4,999
|
File without changes
|
File without changes
|
File without changes
|