From e7006802bd3ff23d26d3654e5dc0f0713349b099 Mon Sep 17 00:00:00 2001 From: Oleksandr Piskun Date: Mon, 28 Sep 2026 08:11:51 +0000 Subject: [PATCH] Bump version to 0.9.0 Signed-off-by: Oleksandr Piskun --- PROGRESS.md | 4 ++-- pyproject.toml | 2 +- scripts/sync_progress.py | 2 +- src/nc_mcp_server/__init__.py | 7 ++++++- tests/test_version.py | 16 ++++++++++++++++ 5 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 tests/test_version.py diff --git a/PROGRESS.md b/PROGRESS.md index 29b068e..f590854 100644 --- a/PROGRESS.md +++ b/PROGRESS.md @@ -113,7 +113,7 @@ | Permissions | — | 34 | | Errors | — | 55 | | Client | — | 75 | -| Config | — | 24 | +| Config | — | 26 | | State | — | 2 | | File Helpers | — | 36 | | File Reminders | 3 | 22 | @@ -122,7 +122,7 @@ | Cospend | 16 | 41 | | Flow | 5 | 58 | | Pagination | — | 28 | -| **Total** | **223** | **1787** | +| **Total** | **223** | **1789** | The test counts are what pytest collects, recomputed with `python scripts/sync_progress.py --write`, which also fails when a test file is not assigned to a row. diff --git a/pyproject.toml b/pyproject.toml index 46f9710..da2ee5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = [ "setuptools>=68" ] [project] name = "nc-mcp-server" -version = "0.8.0" +version = "0.9.0" description = "MCP server for Nextcloud — expose Nextcloud APIs as AI-usable tools" readme = "README.md" keywords = [ "ai", "mcp", "model-context-protocol", "nextcloud" ] diff --git a/scripts/sync_progress.py b/scripts/sync_progress.py index c93b8d3..c8d0203 100644 --- a/scripts/sync_progress.py +++ b/scripts/sync_progress.py @@ -48,7 +48,7 @@ "integration/test_session_cache.py", ], "Pagination": ["integration/test_pagination.py"], - "Config": ["test_config.py"], + "Config": ["test_config.py", "test_version.py"], "State": ["test_state.py"], "File Helpers": ["test_files_helpers.py"], "File Reminders": ["integration/test_reminders.py", "test_reminders.py"], diff --git a/src/nc_mcp_server/__init__.py b/src/nc_mcp_server/__init__.py index 920dbc9..6edabaa 100644 --- a/src/nc_mcp_server/__init__.py +++ b/src/nc_mcp_server/__init__.py @@ -1,3 +1,8 @@ """Nextcloud MCP Server — expose Nextcloud APIs as AI-usable MCP tools.""" -__version__ = "0.1.0" +from importlib.metadata import PackageNotFoundError, version + +try: + __version__ = version("nc-mcp-server") +except PackageNotFoundError: # running from a source tree that was never installed + __version__ = "0.0.0" diff --git a/tests/test_version.py b/tests/test_version.py new file mode 100644 index 0000000..2b0ea92 --- /dev/null +++ b/tests/test_version.py @@ -0,0 +1,16 @@ +"""The package reports the version it was installed with.""" + +import tomllib +from importlib.metadata import version +from pathlib import Path + +import nc_mcp_server + + +def test_version_comes_from_the_installed_package() -> None: + assert nc_mcp_server.__version__ == version("nc-mcp-server") + + +def test_pyproject_and_installed_version_agree() -> None: + pyproject = tomllib.loads((Path(__file__).parents[1] / "pyproject.toml").read_text(encoding="utf-8")) + assert nc_mcp_server.__version__ == pyproject["project"]["version"]