Skip to content

Commit

Permalink
feat: enhance project description and keywords in config
Browse files Browse the repository at this point in the history
Generated-by: aiautocommit
  • Loading branch information
iloveitaly committed Nov 16, 2024
1 parent 193f839 commit 10c5707
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions activemodel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
from .timestamps import TimestampMixin

# TODO need a way to specify the session generator
# TODO need a way to specify the session generator
5 changes: 5 additions & 0 deletions activemodel/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ def after_update(self):
# TODO snake case tables automatically
@declared_attr
def __tablename__(cls) -> str:
"""
Automatically generates the table name for the model by converting the class name from camel case to snake case.
By default, the class is lower cased which makes it harder to read.
"""
return camel2snake(cls.__name__)

@classmethod
Expand Down
8 changes: 3 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[project]
name = "activemodel"
version = "0.1.0"
description = ""
description = "Make SQLModel more like an a real ORM"
readme = "README.md"
requires-python = ">=3.10"
dependencies = ["sqlmodel>=0.0.22"]
authors = [{ name = "Michael Bianco", email = "[email protected]" }]
keywords = []
keywords = ["sqlmodel", "orm", "activerecord", "activemodel", "sqlalchemy"]
urls = { "Repository" = "https://github.com/iloveitaly/activemodel" }

[project.scripts]
Expand All @@ -17,6 +17,4 @@ activemodel = "python_package_template:main"
package = true

[dependency-groups]
dev = [
"pytest>=8.3.3",
]
dev = ["pytest>=8.3.3"]

0 comments on commit 10c5707

Please sign in to comment.