Skip to content

Commit 826cca2

Browse files
BryanFaubleclaude
andcommitted
Fix inaccuracies and add missing context to CLAUDE.md files
- Remove flake8 from linting list (not a pre-commit hook, only test dep) - Add Docker info to Stack section - Add auth env vars and CI matrix details to Testing section - Fix docs deployment info: Read the Docs, not gh-deploy to GitHub Pages - Add docs build output dir and autorefs cross-linking syntax - Expand Windows socket isolation note in tests - Add conftest.py location guide for tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f54c099 commit 826cca2

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ Synapse Python Client — official Python SDK and CLI for Synapse (synapse.org),
1111
- Models: stdlib dataclasses (NOT Pydantic)
1212
- Tests: pytest 8.2, pytest-asyncio, pytest-socket, pytest-xdist
1313
- Docs: MkDocs with Material theme, mkdocstrings
14-
- Linting: ruff, black (line-length 88), isort (profile=black), bandit, flake8
14+
- Linting: ruff, black (line-length 88), isort (profile=black), bandit
1515
- CI: GitHub Actions → SonarCloud, PyPI deploy on release
16+
- Docker: `Dockerfile` at repo root, published to `ghcr.io/sage-bionetworks/synapsepythonclient`
1617

1718
## Commands
1819

@@ -108,3 +109,5 @@ Data flow: User → `operations/` factory → model async methods → `api/` ser
108109
- Unit test client fixture: session-scoped, `skip_checks=True`, `cache_client=False`
109110
- Integration tests use `--reruns 3` for flaky retries and `-n 8 --dist loadscope` for parallelism
110111
- Integration fixtures create per-worker Synapse projects; use `schedule_for_cleanup()` for teardown
112+
- Auth env vars: `SYNAPSE_AUTH_TOKEN` (bearer token), `SYNAPSE_PROFILE` (config file profile, default: `"default"`), `SYNAPSE_TOKEN_AWS_SSM_PARAMETER_NAME` (AWS SSM path)
113+
- CI runs integration tests only on Python 3.10 and 3.14 (oldest + newest) to limit Synapse server load

docs/CLAUDE.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,6 @@ Defined in `mkdocs.yml` nav section. 5 main sections: Home, Tutorials, How-To Gu
5050
- Do not edit tutorial code inline in markdown — edit the `.py` script file in `tutorial_scripts/` and update line ranges if needed.
5151
- Reference docs auto-generate from source docstrings — to change method documentation, edit the docstring in the Python source, not the markdown.
5252
- `mkdocs.yml` is at the repo root, not in `docs/` — it configures the entire doc build.
53-
- Docs deploy via `mkdocs gh-deploy --force` targeting the `master` branch (not `develop`).
53+
- Docs deploy to Read the Docs (configured via `.readthedocs.yaml` at repo root).
54+
- Local build output goes to `docs_site/` (via `site_dir` in `mkdocs.yml`) — gitignored.
55+
- Cross-referencing uses the `autorefs` plugin: `[display text][synapseclient.ClassName.method]` auto-resolves to mkdocstrings anchors.

tests/CLAUDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Test suite for the Synapse Python Client. Unit tests run without network access;
1010
Do not create synchronous test files. The `@async_to_sync` decorator is validated by a dedicated smoke test (`tests/integration/synapseclient/models/synchronous/test_sync_wrapper_smoke.py`). Duplicate sync tests were removed to cut CI cost and maintenance burden.
1111

1212
### Unit tests (`tests/unit/`)
13-
- `pytest-socket` blocks all network calls (unix sockets allowed on non-Windows for async event loop)
13+
- `pytest-socket` blocks all network calls (unix sockets allowed on non-Windows for async event loop). On Windows, socket disabling is skipped entirely — tests still run but are not network-isolated.
1414
- Session-scoped `syn` fixture: `Synapse(skip_checks=True, cache_client=False)` with silent logger
1515
- Autouse `set_timezone` fixture forces `TZ=UTC` for deterministic timestamps
1616
- Client caching disabled via `Synapse.allow_client_caching(False)`
@@ -25,6 +25,7 @@ Do not create synchronous test files. The `@async_to_sync` decorator is validate
2525
- `--reruns 3` for flaky retry, `-n 8 --dist loadscope` for parallelism
2626
- OpenTelemetry tracing opt-in via `SYNAPSE_INTEGRATION_TEST_OTEL_ENABLED` env var
2727
- Two client fixtures: `syn` (silent logger) and `syn_with_logger` (verbose)
28+
- conftest.py locations: `tests/unit/conftest.py` (session client, socket blocking, UTC timezone), `tests/integration/conftest.py` (logged-in client, per-worker projects, cleanup fixture)
2829

2930
### Test utilities
3031
- `tests/test_utils.py`: `spy_for_async_function(original_func)` — wraps async function for pytest-mock spying while preserving async behavior. `spy_for_function(original_func)` — sync variant.

0 commit comments

Comments
 (0)