hivemind-sqlite-database 0.0.2a1__tar.gz → 0.0.3a1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: hivemind-sqlite-database
3
- Version: 0.0.2a1
3
+ Version: 0.0.3a1
4
4
  Summary: sqlite database plugin for hivemind-core
5
5
  Home-page: https://github.com/JarbasHiveMind/hivemind-sqlite-database
6
6
  Author: jarbasAi
@@ -8,15 +8,20 @@ from ovos_utils.xdg_utils import xdg_data_home
8
8
 
9
9
  from hivemind_plugin_manager.database import Client, AbstractDB
10
10
 
11
+ from dataclasses import dataclass
11
12
 
13
+
14
+ @dataclass
12
15
  class SQLiteDB(AbstractDB):
13
16
  """Database implementation using SQLite."""
17
+ name: str = "clients"
18
+ subfolder: str = "hivemind-core"
14
19
 
15
- def __init__(self, name="clients", subfolder="hivemind-core"):
20
+ def __post_init__(self):
16
21
  """
17
22
  Initialize the SQLiteDB connection.
18
23
  """
19
- db_path = os.path.join(xdg_data_home(), subfolder, name + ".db")
24
+ db_path = os.path.join(xdg_data_home(), self.subfolder, self.name + ".db")
20
25
  LOG.debug(f"sqlite database path: {db_path}")
21
26
  os.makedirs(os.path.dirname(db_path), exist_ok=True)
22
27
 
@@ -1,6 +1,6 @@
1
1
  # START_VERSION_BLOCK
2
2
  VERSION_MAJOR = 0
3
3
  VERSION_MINOR = 0
4
- VERSION_BUILD = 2
4
+ VERSION_BUILD = 3
5
5
  VERSION_ALPHA = 1
6
6
  # END_VERSION_BLOCK
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: hivemind-sqlite-database
3
- Version: 0.0.2a1
3
+ Version: 0.0.3a1
4
4
  Summary: sqlite database plugin for hivemind-core
5
5
  Home-page: https://github.com/JarbasHiveMind/hivemind-sqlite-database
6
6
  Author: jarbasAi
@@ -7,4 +7,5 @@ hivemind_sqlite_database.egg-info/PKG-INFO
7
7
  hivemind_sqlite_database.egg-info/SOURCES.txt
8
8
  hivemind_sqlite_database.egg-info/dependency_links.txt
9
9
  hivemind_sqlite_database.egg-info/entry_points.txt
10
+ hivemind_sqlite_database.egg-info/requires.txt
10
11
  hivemind_sqlite_database.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ hivemind-plugin-manager<1.0.0,>=0.1.0
@@ -48,7 +48,7 @@ setup(
48
48
  url='https://github.com/JarbasHiveMind/hivemind-sqlite-database',
49
49
  license='Apache-2.0',
50
50
  author='jarbasAi',
51
- # install_requires=required("requirements.txt"),
51
+ install_requires=required("requirements.txt"),
52
52
  entry_points={'hivemind.database': PLUGIN_ENTRY_POINT},
53
53
  author_email='jarbasai@mailfence.com',
54
54
  description='sqlite database plugin for hivemind-core'