fix(community): move psycopg2 to optional community extra, lazy-import in __init__
Some checks are pending
CI / test (push) Waiting to run
Mirror / mirror (push) Waiting to run

This commit is contained in:
pyr0ball 2026-04-12 22:34:47 -07:00
parent 56fb6be4b1
commit 433207d3c5
2 changed files with 9 additions and 4 deletions

View file

@ -1,5 +1,8 @@
__version__ = "0.10.0"
from circuitforge_core.community import CommunityDB, CommunityPost, SharedStore
__all__ = ["CommunityDB", "CommunityPost", "SharedStore"]
try:
from circuitforge_core.community import CommunityDB, CommunityPost, SharedStore
__all__ = ["CommunityDB", "CommunityPost", "SharedStore"]
except ImportError:
# psycopg2 not installed — install with: pip install circuitforge-core[community]
pass

View file

@ -11,10 +11,12 @@ dependencies = [
"pyyaml>=6.0",
"requests>=2.31",
"openai>=1.0",
"psycopg2>=2.9",
]
[project.optional-dependencies]
community = [
"psycopg2>=2.9",
]
manage = [
"platformdirs>=4.0",
"typer[all]>=0.12",