Skip to content

Commit 107ce4b

Browse files
doc-uplifts (#577)
Summary: - Improvements to documentation.
1 parent d193d68 commit 107ce4b

File tree

6 files changed

+13
-35
lines changed

6 files changed

+13
-35
lines changed

AGENTS.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Repository Guidelines
22

3-
These guidelines help contributors work effectively on this repository. We gratefully acknowledge [mcp-postgres](https://github.com/gldc/mcp-postgres) as the chief inspiration for the MCP server function and this document.
3+
These guidelines help contributors, human and otherwise, understand and work effectively on this repository.
44

5-
We also encourage reading [`docs/developer_guide.md`](/docs/developer_guide.md) for further useful information.
5+
We also encourage reading [`docs/developer_guide.md`](/docs/developer_guide.md) for further useful information. For deeper understanding of the "brains" of `stackql`, it is worthwhile to consult [the `AGENTS.md` file of `any-sdk`](https://github.com/stackql/any-sdk/blob/main/AGENTS.md) and linked documents from there.
66

77

88
## Project Structure & Module Organization
@@ -18,19 +18,15 @@ We also encourage reading [`docs/developer_guide.md`](/docs/developer_guide.md)
1818

1919
## Build, Test, and Development Commands
2020

21-
- Create env: `python -m venv .venv && source .venv/bin/activate`
22-
- Install deps: `pip install -r requirements.txt`
23-
- Run server (no DB): `python postgres_server.py`
24-
- Run with DB: `POSTGRES_CONNECTION_STRING="postgresql://user:pass@host:5432/db" python postgres_server.py`
25-
- Docker build/run: `docker build -t mcp-postgres .` then `docker run -e POSTGRES_CONNECTION_STRING=... -p 8000:8000 mcp-postgres`
21+
Please refer to [the developer guide](/docs/developer_guide.md), [the testing summary document](/test/README.md), [the robot testing document](/test/robot/README.md), and possibly most useful of all, [the doco explaining testing with mocks](/test/python/stackql_test_tooling/flask/README.md). For CI in the wild, please see [`.github/workflows/build.yml`](/.github/workflows/build.yml).
2622

2723
## Coding Style & Naming Conventions
2824

2925
- Publish and program to abstractions.
3026

3127
## Testing Guidelines
3228

33-
- Black box regression tests are effectively mandatory. The canaonical ones reside in [`test/robot/functional`](/test/robot/functional).
29+
- Black box regression tests are effectively mandatory. The canaonical ones reside in [`test/robot`](/test/robot/README.md).
3430

3531
## Tools & Resources
3632

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191

9292
## About The Project
9393

94-
[__StackQL__][homepage] is an open-source project built with Golang that allows you to create, modify and query the state of services and resources across different cloud and SaaS providers (Google, AWS, Azure, Okta, GitHub, etc.) using SQL semantics
94+
[__StackQL__][homepage] is an open-source project built with Golang that allows you to create, modify and query the state of services and resources across different local and remote interfaces, using SQL semantics. Such interfaces canonically include, but are not limited to, cloud and SaaS providers (Google, AWS, Azure, Okta, GitHub, etc.).
9595
<br />
9696
<br />
9797

@@ -102,9 +102,9 @@
102102

103103
StackQL is a standalone application that can be used in client mode (via __`exec`__ or __`shell`__) or accessed via a Postgres wire protocol client (`psycopg2`, etc.) using server mode (__`srv`__).
104104

105-
StackQL parses SQL statements and transpiles them into API requests to the cloud provider. The API calls are then executed and the results are returned to the user.
105+
StackQL parses SQL statements and transpiles them into API requests to the (cloud) resource provider. The API calls are then executed and the results are returned to the user.
106106

107-
StackQL provider definitions are defined in OpenAPI extensions to the providers specification. These definitions are then used to generate the SQL schema and the API client. The source for the provider definitions are stored in the [__StackQL Registry__][registry].
107+
StackQL provider interfaces are canonically defined in OpenAPI extensions to the providers' specification. These definitions are then used to generate the SQL schema and the API client. The source for the provider definitions are stored in the [__StackQL Registry__][registry]. The semantics of provider interactions are defined in [our `any-sdk` library](https://github.com/stackql/any-sdk). For more detail on nuts and bolts, please see [the local `AGENTS.md` file](/AGENTS.md) and [that of `any-sdk`](https://github.com/stackql/any-sdk/blob/main/AGENTS.md).
108108

109109
<details>
110110
<summary><b>StackQL Context Diagram</b></summary>

cicd/scripts/testing-env.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ googleCredentialsFilePath="${workspaceFolder}/test/assets/credentials/dummy/goog
2121

2222
export stackqlMockedRegistryStr="{ \"url\": \"file://${workspaceFolder}/test/registry-mocked\", \"localDocRoot\": \"${workspaceFolder}/test/registry-mocked\", \"verifyConfig\": { \"nopVerify\": true } }"
2323

24+
export stackqlTestRegistryStr="{ \"url\": \"file://${workspaceFolder}/test/registry\", \"localDocRoot\": \"${workspaceFolder}/test/registry\", \"verifyConfig\": { \"nopVerify\": true } }"
25+
2426
export stackqlAuthStr="{\"google\": {\"credentialsfilepath\": \"${googleCredentialsFilePath}\", \"type\": \"service_account\"}, \"okta\": {\"credentialsenvvar\": \"OKTA_SECRET_KEY\", \"type\": \"api_key\"}, \"aws\": {\"type\": \"aws_signing_v4\", \"credentialsfilepath\": \"/Users/admin/stackql/stackql-devel/test/robot/functional/../../../test/assets/credentials/dummy/aws/functional-test-dummy-aws-key.txt\", \"keyID\": \"NON_SECRET\"}, \"github\": {\"type\": \"basic\", \"credentialsenvvar\": \"GITHUB_SECRET_KEY\"}, \"k8s\": {\"credentialsenvvar\": \"K8S_SECRET_KEY\", \"type\": \"api_key\", \"valuePrefix\": \"Bearer \"}, \"azure\": {\"type\": \"api_key\", \"valuePrefix\": \"Bearer \", \"credentialsenvvar\": \"AZ_ACCESS_TOKEN\"}, \"sumologic\": {\"type\": \"basic\", \"credentialsenvvar\": \"SUMO_CREDS\"}, \"digitalocean\": {\"type\": \"bearer\", \"username\": \"myusername\", \"password\": \"mypassword\"}}"
2527

2628

docs/integration_testing.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
Offline invocations of `stackql` are assessed against expected responses, through:
77

88
1. the functionality of [/test/deprecated/python/main.py](/test/deprecated/python/main.py).
9-
2. [robot tests in /test/functional](/test/functional)
9+
2. robot tests, [per this document](/test/robot/README.md).
1010

1111
(1) is deprecated and will be entirely migrated to (2).
1212

1313
These tests are run during the build process:
1414
- locally as per [/README.md#build](/README.md#build)
15-
- in github actions based CICD as per [/.github/workflows/go.yml](/.github/workflows/go.yml).
15+
- in github actions based CICD as per [/.github/workflows/go.yml](/.github/workflows/build.yml).
1616

1717
## Unit tests using standard golang approaches
1818

test/robot/README.md

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
11

2-
3-
## TODO
4-
5-
- [ ] Source registry files from other repository, where possible.
6-
- [x] "reuired" string.
7-
- [x] clean up this readme.
8-
- [x] integration tests for different registry configurations.
9-
- [x] fix library lifetimes issue; as per https://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#creating-test-library-class-or-module.
10-
11-
122
## Distributed testing
133

144
It is convenient for development- and release-critical robot tests to reside in this repository, because it accelerates the
@@ -107,6 +97,8 @@ $v1="SELECT i.zone, i.name, i.machineType, i.deletionProtection, '[{""""""subnet
10797

10898
## Session testing for Server and Shell
10999

100+
**NOTE**: This is deprecated; robot is the way formward. Do **not** add new tests with this pattern.
101+
110102
Basic idea is have python start a session, run commands with result verification and then terminate. Probably custom library(ies).
111103

112104
Library would do something like the below adaptation of [this example from stack overflow](https://stackoverflow.com/questions/19880190/interactive-input-output-using-python):

0 commit comments

Comments
 (0)