Skip to content

Commit

Permalink
Merge pull request #6 from JarbasHiveMind/release-0.0.3a1
Browse files Browse the repository at this point in the history
Release 0.0.3a1
  • Loading branch information
JarbasAl authored Dec 29, 2024
2 parents daef65c + 9f817e2 commit 06f85bf
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Changelog

## [0.0.3a1](https://github.com/JarbasHiveMind/hivemind-sqlite-database/tree/0.0.3a1) (2024-12-29)

[Full Changelog](https://github.com/JarbasHiveMind/hivemind-sqlite-database/compare/0.0.2a1...0.0.3a1)

**Merged pull requests:**

- fix: move to dataclass + requirements.txt [\#5](https://github.com/JarbasHiveMind/hivemind-sqlite-database/pull/5) ([JarbasAl](https://github.com/JarbasAl))

## [0.0.2a1](https://github.com/JarbasHiveMind/hivemind-sqlite-database/tree/0.0.2a1) (2024-12-29)

[Full Changelog](https://github.com/JarbasHiveMind/hivemind-sqlite-database/compare/0.0.1...0.0.2a1)

**Merged pull requests:**

- fix: missing hivemind entrypoint in setup.py [\#3](https://github.com/JarbasHiveMind/hivemind-sqlite-database/pull/3) ([JarbasAl](https://github.com/JarbasAl))



\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
9 changes: 7 additions & 2 deletions hivemind_sqlite_database/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@

from hivemind_plugin_manager.database import Client, AbstractDB

from dataclasses import dataclass


@dataclass
class SQLiteDB(AbstractDB):
"""Database implementation using SQLite."""
name: str = "clients"
subfolder: str = "hivemind-core"

def __init__(self, name="clients", subfolder="hivemind-core"):
def __post_init__(self):
"""
Initialize the SQLiteDB connection.
"""
db_path = os.path.join(xdg_data_home(), subfolder, name + ".db")
db_path = os.path.join(xdg_data_home(), self.subfolder, self.name + ".db")
LOG.debug(f"sqlite database path: {db_path}")
os.makedirs(os.path.dirname(db_path), exist_ok=True)

Expand Down
4 changes: 2 additions & 2 deletions hivemind_sqlite_database/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# START_VERSION_BLOCK
VERSION_MAJOR = 0
VERSION_MINOR = 0
VERSION_BUILD = 1
VERSION_ALPHA = 0
VERSION_BUILD = 3
VERSION_ALPHA = 1
# END_VERSION_BLOCK
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hivemind-plugin-manager>=0.1.0,<1.0.0
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def required(requirements_file):
if pkg.strip() and not pkg.startswith("#")]


PLUGIN_ENTRY_POINT = 'hivemind-sqlite-db-plugin=hivemind_sqlite_database:SQLiteDB'

setup(
name='hivemind-sqlite-database',
Expand All @@ -47,7 +48,8 @@ def required(requirements_file):
url='https://github.com/JarbasHiveMind/hivemind-sqlite-database',
license='Apache-2.0',
author='jarbasAi',
# install_requires=required("requirements.txt"),
install_requires=required("requirements.txt"),
entry_points={'hivemind.database': PLUGIN_ENTRY_POINT},
author_email='[email protected]',
description='sqlite database plugin for hivemind-core'
)

0 comments on commit 06f85bf

Please sign in to comment.