diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 87907a3..539e8e4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,10 +9,10 @@ permissions: contents: read jobs: - publish-cfgit: - name: Publish cfgit + publish-cfg-vcs: + name: Publish cfg-vcs runs-on: ubuntu-latest - environment: pypi-cfgit + environment: pypi-cfg-vcs permissions: id-token: write contents: read @@ -26,16 +26,16 @@ jobs: python -m pip install -U build twine python -m build python -m twine check dist/* - - name: Publish cfgit to PyPI + - name: Publish cfg-vcs to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: dist/ - publish-cfgit-impact: - name: Publish cfgit-impact + publish-cfg-impact: + name: Publish cfg-impact runs-on: ubuntu-latest - needs: publish-cfgit - environment: pypi-cfgit-impact + needs: publish-cfg-vcs + environment: pypi-cfg-impact permissions: id-token: write contents: read @@ -50,7 +50,7 @@ jobs: python -m pip install -U build twine python -m build python -m twine check dist/* - - name: Publish cfgit-impact to PyPI + - name: Publish cfg-impact to PyPI uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: plugins/cfg_impact/dist/ diff --git a/README.md b/README.md index 3a9890c..25b43c8 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ cfgit is pre-1.0 software. The current implementation includes: - localhost web UI - MCP server - portable Codex or Claude Code skill -- optional `cfgit-impact` plugin for deterministic impact summaries and opt-in LLM narration +- optional `cfg-impact` plugin for deterministic impact summaries and opt-in LLM narration The engine is intentionally DB-neutral. Mongo and Postgres are the first two adapters to prove the storage seam. @@ -443,7 +443,7 @@ standardize the config so that database always uses one env name. paths, finds static references to changed values across configured records, and reports a risk level. -Optional LLM narration lives in the separate `cfgit-impact` plugin. It reads the +Optional LLM narration lives in the separate `cfg-impact` plugin. It reads the real before/after of the change plus a map of the surrounding records, then explains in plain language what the change does, what it ripples into, and how to roll it back: diff --git a/docs/PUBLISHING.md b/docs/PUBLISHING.md index ae38710..0e8eff7 100644 --- a/docs/PUBLISHING.md +++ b/docs/PUBLISHING.md @@ -1,10 +1,10 @@ # Publishing -cfgit publishes two Python packages: +cfgit publishes two Python distributions: -- `cfgit`: Git-style history, diff, drift detection, branch/PR review, and +- `cfg-vcs`: Git-style history, diff, drift detection, branch/PR review, and rollback for live database records without migrating or owning the datastore. -- `cfgit-impact`: optional plugin for deterministic system-impact summaries and +- `cfg-impact`: optional plugin for deterministic system-impact summaries and opt-in LLM narration of database record diffs. Current first release version: `0.1.0`. @@ -13,19 +13,19 @@ Current first release version: `0.1.0`. Create both projects on PyPI and configure Trusted Publishing for this repository. -For `cfgit`: +For `cfg-vcs`: - Owner: `AusafMo` - Repository: `cfgit` - Workflow: `publish.yml` -- Environment: `pypi-cfgit` +- Environment: `pypi-cfg-vcs` -For `cfgit-impact`: +For `cfg-impact`: - Owner: `AusafMo` - Repository: `cfgit` - Workflow: `publish.yml` -- Environment: `pypi-cfgit-impact` +- Environment: `pypi-cfg-impact` The workflow uses PyPI OpenID Connect, so no PyPI API token is stored in GitHub Secrets. @@ -49,8 +49,8 @@ python -m twine check dist/* ```bash python -m venv /tmp/cfgit-publish-smoke /tmp/cfgit-publish-smoke/bin/python -m pip install \ - 'dist/cfgit-0.1.0-py3-none-any.whl[mcp]' \ - plugins/cfg_impact/dist/cfgit_impact-0.1.0-py3-none-any.whl + 'dist/cfg_vcs-0.1.0-py3-none-any.whl[mcp]' \ + plugins/cfg_impact/dist/cfg_impact-0.1.0-py3-none-any.whl /tmp/cfgit-publish-smoke/bin/cfg --help /tmp/cfgit-publish-smoke/bin/python -c 'import cfg; import cfg.mcp.server; import cfg_impact; print("imports ok")' ``` @@ -68,15 +68,15 @@ git push origin v0.1.0 gh release create v0.1.0 --title "v0.1.0" --notes "First public cfgit release." ``` -The release triggers `.github/workflows/publish.yml`, which publishes `cfgit` -first and `cfgit-impact` second. +The release triggers `.github/workflows/publish.yml`, which publishes `cfg-vcs` +first and `cfg-impact` second. ## Install ```bash -pip install cfgit -pip install 'cfgit[mongo]' -pip install 'cfgit[postgres]' -pip install 'cfgit[mongo,postgres,mcp]' -pip install cfgit-impact +pip install cfg-vcs +pip install 'cfg-vcs[mongo]' +pip install 'cfg-vcs[postgres]' +pip install 'cfg-vcs[mongo,postgres,mcp]' +pip install cfg-impact ``` diff --git a/plugins/cfg_impact/pyproject.toml b/plugins/cfg_impact/pyproject.toml index e604643..4f6be55 100644 --- a/plugins/cfg_impact/pyproject.toml +++ b/plugins/cfg_impact/pyproject.toml @@ -1,13 +1,13 @@ [project] -name = "cfgit-impact" +name = "cfg-impact" version = "0.1.0" -description = "Optional cfgit plugin for deterministic system-impact summaries and opt-in LLM narration of database record diffs" +description = "Optional cfg-impact plugin for deterministic system-impact summaries and opt-in LLM narration of database record diffs" readme = "README.md" requires-python = ">=3.11" license = "Apache-2.0" authors = [{ name = "Mohammad Ausaf" }] dependencies = [ - "cfgit>=0.1.0,<0.2.0", + "cfg-vcs>=0.1.0,<0.2.0", "httpx>=0.27", ] diff --git a/pyproject.toml b/pyproject.toml index 1cb5b2e..496c48f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "cfgit" +name = "cfg-vcs" version = "0.1.0" description = "Git-style history, diff, drift detection, and rollback for live database records without migrating or owning your datastore" readme = "README.md" @@ -32,7 +32,7 @@ mongo = ["pymongo>=4.6"] postgres = ["psycopg[binary]>=3.2"] cli = ["click>=8.1", "rich>=13.0"] mcp = ["mcp>=1.0"] -impact = [] # the cfgit-impact plugin declares its own model-client deps; never in core +impact = [] # the cfg-impact plugin declares its own model-client deps; never in core dev = ["pytest>=8.0", "pytest-asyncio", "ruff", "mypy", "httpx>=0.27"] [project.urls] diff --git a/src/cfg/adapters/mongo.py b/src/cfg/adapters/mongo.py index e94b166..a806a1e 100644 --- a/src/cfg/adapters/mongo.py +++ b/src/cfg/adapters/mongo.py @@ -27,7 +27,7 @@ from pymongo.client_session import ClientSession from pymongo.errors import OperationFailure except ModuleNotFoundError as exc: # pragma: no cover - raise ModuleNotFoundError("install cfgit[mongo] to use MongoAdapter") from exc + raise ModuleNotFoundError("install cfg-vcs[mongo] to use MongoAdapter") from exc class MongoAdapter: diff --git a/src/cfg/adapters/postgres.py b/src/cfg/adapters/postgres.py index 7ed33a7..1371f85 100644 --- a/src/cfg/adapters/postgres.py +++ b/src/cfg/adapters/postgres.py @@ -31,7 +31,7 @@ from psycopg.rows import dict_row from psycopg.types.json import Jsonb except ModuleNotFoundError as exc: # pragma: no cover - raise ModuleNotFoundError("install cfgit[postgres] to use PostgresAdapter") from exc + raise ModuleNotFoundError("install cfg-vcs[postgres] to use PostgresAdapter") from exc _IDENT_RE = re.compile(r"^[A-Za-z_][A-Za-z0-9_]*$") diff --git a/src/cfg/interfaces/actions.py b/src/cfg/interfaces/actions.py index b4cc262..1052a41 100644 --- a/src/cfg/interfaces/actions.py +++ b/src/cfg/interfaces/actions.py @@ -313,7 +313,7 @@ def impact( from cfg_impact.overview import overview except ModuleNotFoundError as exc: raise ValueError( - "cfgit-impact plugin is not installed. Install plugins/cfg_impact or cfgit[impact]." + "cfg-impact plugin is not installed. Install plugins/cfg_impact or cfg-impact." ) from exc return ( overview(engine, record, a=a, b=b, use_llm=use_llm, provider=provider, model=model, against=against), diff --git a/src/cfg/mcp/server.py b/src/cfg/mcp/server.py index ca42adb..27008b1 100644 --- a/src/cfg/mcp/server.py +++ b/src/cfg/mcp/server.py @@ -8,7 +8,7 @@ from cfg.interfaces import actions from cfg.interfaces.actions import ActionContext -try: # pragma: no cover - exercised when cfgit[mcp] is installed +try: # pragma: no cover - exercised when cfg-vcs[mcp] is installed from mcp.server.fastmcp import FastMCP except ModuleNotFoundError: # pragma: no cover FastMCP = None # type: ignore[assignment] @@ -16,7 +16,7 @@ def _mcp() -> Any: if FastMCP is None: - raise ModuleNotFoundError("install cfgit[mcp] to run the cfgit MCP server") + raise ModuleNotFoundError("install cfg-vcs[mcp] to run the cfgit MCP server") return FastMCP("cfgit")