-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
karma update messages to dedicated log channel + remove SPECIAL_REPLI…
…ES (#114) * bump version * fix action file * Update README.md * Update README.md * Update README.md * Update .pre-commit-config.yaml #107 * test commit * add a runtime * bug toml file: remote: -----> Add Poetry to the PATH remote: -----> Export requirements.txt from Poetry remote: remote: TOMLError remote: remote: Invalid TOML file /tmp/build_fd4bfa75/pyproject.toml: Key "name" already exists. * another duplicated key: remote: -----> Add Poetry to the PATH remote: -----> Export requirements.txt from Poetry remote: remote: TOMLError remote: remote: Invalid TOML file /tmp/build_0b421871/pyproject.toml: Key "version" already exists. * fix for #103 bumped version upgraded pre-commit pre-commit mypy errors: removed int type hint from KarmaNote + changed | to Union (which should have been supported hm) * fix test * fixes #113 * update readme
- Loading branch information
1 parent
ba9d25a
commit 680fa3e
Showing
10 changed files
with
55 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
[tool.poetry] | ||
name = "karmabot" | ||
version = "3.2.0" | ||
authors = ["PyBites <[email protected]>", "Patrick-Oliver Groß <[email protected]>"] | ||
classifiers = [ | ||
"License :: OSI Approved :: MIT License", | ||
|
@@ -16,7 +17,6 @@ license = "MIT" | |
maintainers = ["Patrick-Oliver Groß <[email protected]>"] | ||
readme = "README.md" | ||
repository = "https://github.com/PyBites-Open-Source/karmabot" | ||
version = "3.1.0" | ||
|
||
[tool.poetry.dependencies] | ||
SQLAlchemy = "^2.0.1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python-3.11.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
import datetime | ||
|
||
import sqlalchemy as sa | ||
|
||
from karmabot.db.modelbase import SqlAlchemyBase | ||
|
||
|
||
class KarmaNote(SqlAlchemyBase): | ||
"""Models a simple note system in the DB""" | ||
|
||
__tablename__ = "karma_note" | ||
|
||
id: int = sa.Column( # noqa | ||
sa.BigInteger().with_variant(sa.Integer, "sqlite"), | ||
primary_key=True, | ||
autoincrement=True, | ||
) | ||
user_id = sa.Column(sa.String, sa.ForeignKey("karma_user.user_id"), nullable=False) | ||
timestamp = sa.Column(sa.DateTime, default=datetime.datetime.now, nullable=False) | ||
note = sa.Column(sa.String) | ||
|
||
def __repr__(self): | ||
return ( | ||
f"[KarmaNote] ID: {self.id} | {self.user_id} -> " | ||
f"{self.timestamp} | Note: {self.note}" | ||
) | ||
|
||
def __str__(self): | ||
return ( | ||
f"(ID: {self.id}) from {self.timestamp.strftime('%Y-%m-%d, %H:%M')}: " | ||
f"{self.note}." | ||
) | ||
import datetime | ||
|
||
import sqlalchemy as sa | ||
|
||
from karmabot.db.modelbase import SqlAlchemyBase | ||
|
||
|
||
class KarmaNote(SqlAlchemyBase): | ||
"""Models a simple note system in the DB""" | ||
|
||
__tablename__ = "karma_note" | ||
|
||
id = sa.Column( # noqa | ||
sa.BigInteger().with_variant(sa.Integer, "sqlite"), | ||
primary_key=True, | ||
autoincrement=True, | ||
) | ||
user_id = sa.Column(sa.String, sa.ForeignKey("karma_user.user_id"), nullable=False) | ||
timestamp = sa.Column(sa.DateTime, default=datetime.datetime.now, nullable=False) | ||
note = sa.Column(sa.String) | ||
|
||
def __repr__(self): | ||
return ( | ||
f"[KarmaNote] ID: {self.id} | {self.user_id} -> " | ||
f"{self.timestamp} | Note: {self.note}" | ||
) | ||
|
||
def __str__(self): | ||
return ( | ||
f"(ID: {self.id}) from {self.timestamp.strftime('%Y-%m-%d, %H:%M')}: " | ||
f"{self.note}." | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters