Skip to content

Commit ddca6ec

Browse files
committed
Chore: Address suggestions from code review by CodeRabbit
1 parent d57019f commit ddca6ec

File tree

5 files changed

+20
-10
lines changed

5 files changed

+20
-10
lines changed

DEVELOP.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ will invoke both and is also used on CI/GHA.
2121
poe check
2222
```
2323

24-
In order to invoke individual software tests for working on the spot, use a
24+
To invoke individual software tests for working on the spot, use a
2525
traditional `pytest` invocation. Examples:
2626
```shell
2727
pytest --no-cov tests/test_knowledge.py
@@ -32,8 +32,8 @@ pytest --no-cov -k query
3232

3333
## Release
3434

35-
The project uses [versioningit], so you don't need to do any version bumping
36-
within files, because the version number will be derived from the Git tag.
35+
The project uses [versioningit] so you don't need to do any version bumping
36+
within files because the version number will be derived from the Git tag.
3737

3838
However, you need to designate the new release within the [CHANGES.md](./CHANGES.md)
3939
file, and commit it. The release procedure currently looks like this:

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# CrateDB MCP Server
22

33
[![Bluesky][badge-bluesky]][target-bluesky]
4+
[![Release Notes][badge-release-notes]][project-release-notes]
5+
46
[![Status][badge-status]][target-project]
57
[![License][badge-license]][target-license]
68
[![CI][badge-ci]][project-ci]
@@ -55,8 +57,8 @@ sessions like Claude.
5557

5658
Configure the `CRATEDB_MCP_HTTP_URL` environment variable to match your CrateDB instance.
5759
For example, when connecting to CrateDB Cloud, use a value like
58-
https://admin:dZ...6LqB@testdrive.eks1.eu-west-1.aws.cratedb.net:4200/.
59-
When connecting to CrateDB on localhost, use http://localhost:4200/.
60+
`https://admin:dZ...6LqB@testdrive.eks1.eu-west-1.aws.cratedb.net:4200/`.
61+
When connecting to CrateDB on localhost, use `http://localhost:4200/`.
6062
```shell
6163
export CRATEDB_MCP_HTTP_URL="http://localhost:4200/"
6264
```
@@ -73,7 +75,7 @@ Start MCP server with `sse` transport.
7375
```shell
7476
CRATEDB_MCP_TRANSPORT=sse cratedb-mcp
7577
```
76-
Note: If you are not able to use `uv tool install`, please use
78+
Note: If you are unable to use `uv tool install`, please use
7779
`uv run cratedb-mcp` to acquire and run the package ephemerally.
7880

7981
# Simple Claude configuration
@@ -114,12 +116,12 @@ To learn how to set up a development sandbox, see the [development documentation
114116
[badge-ci]: https://github.com/crate/cratedb-mcp/actions/workflows/tests.yml/badge.svg
115117
[badge-coverage]: https://codecov.io/gh/crate/cratedb-mcp/branch/main/graph/badge.svg
116118
[badge-bluesky]: https://img.shields.io/badge/Bluesky-0285FF?logo=bluesky&logoColor=fff&label=Follow%20%40CrateDB
117-
[badge-issues]: https://img.shields.io/github/issues/crate/cratedb-mcp
118119
[badge-license]: https://img.shields.io/github/license/crate/cratedb-mcp
119-
[badge-release-notes]: https://img.shields.io/badge/Release%20Notes-v0.0.0-blue
120+
[badge-release-notes]: https://img.shields.io/github/release/crate/cratedb-mcp?label=Release+Notes
120121
[badge-status]: https://img.shields.io/badge/status--alpha-orange
121122
[project-ci]: https://github.com/crate/cratedb-mcp/actions/workflows/tests.yml
122123
[project-coverage]: https://app.codecov.io/gh/crate/cratedb-mcp
124+
[project-release-notes]: https://github.com/crate/cratedb-mcp/releases
123125
[target-bluesky]: https://bsky.app/search?q=cratedb
124126
[target-license]: https://github.com/crate/cratedb-mcp/blob/main/LICENSE
125127
[target-project]: https://github.com/crate/cratedb-mcp

cratedb_mcp/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import logging
22
import os
3+
import typing as t
34

45
from cratedb_mcp.__main__ import mcp
56

@@ -11,4 +12,4 @@ def main():
1112
if transport not in ("stdio", "sse"):
1213
raise ValueError(f"Unsupported transport: '{transport}'. Please use one of 'stdio', 'sse'.")
1314
logger.info(f"Starting CrateDB MCP server using transport '{transport}'")
14-
mcp.run(transport=transport) # type: ignore[arg-type]
15+
mcp.run(transport=t.cast(t.Literal["stdio", "sse"], transport))

cratedb_mcp/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import os
22

3-
HTTP_URL = os.getenv("CRATEDB_MCP_HTTP_URL", "http://localhost:4200")
3+
HTTP_URL: str = os.getenv("CRATEDB_MCP_HTTP_URL", "http://localhost:4200")

tests/test_knowledge.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,11 @@ def test_documentation_index():
88

99

1010
def test_queries():
11+
12+
# Verify basic parts of the query.
1113
assert "information_schema.tables" in Queries.TABLES_METADATA
14+
15+
# Verify other critical parts of the query.
16+
assert "sys.health" in Queries.TABLES_METADATA
17+
assert "WITH partitions_health" in Queries.TABLES_METADATA
18+
assert "LEFT JOIN" in Queries.TABLES_METADATA

0 commit comments

Comments
 (0)