Skip to content

Fix all broken README/docs examples and unify the version across 4 locations #124

Description

@jeremymanning

Part of #108 · Phase 5 · label: documentation

Problem

Every cloud configuration example in README.md raises on its first line. configure() has no pass-through for unknown keys — config.py:262 raises ValueError(f"Unknown configuration parameter: {key}") — and the README uses unprefixed names that do not exist.

README says Actual field (config.py)
access_key_id, secret_access_key, region aws_access_key_id, aws_secret_access_key, aws_region (:53-66)
project_id, service_account_key, region gcp_project_id, gcp_service_account_key, gcp_region (:87-90)
subscription_id, client_id, client_secret, tenant_id azure_* (:71-83)
token hf_token (:105)

Other broken examples:

  • @cluster(provider='lambda_cloud') / provider='huggingface_spaces' -> ValueError: Unsupported cloud provider. executor_core.py:63 accepts only ["lambda","aws","azure","gcp","huggingface"]. The decorator's own docstring (decorator.py:57) uses the correct short names — the README does not.
  • monitor.get_cost_optimization_recommendations() -> TypeError: missing 2 required positional arguments. Signature is (self, resource_usage, cost_estimate) (cost_monitoring.py:126).
  • @cluster(provider='aws', cluster_type='kubernetes', cluster_name=...) — cluster_type is not a cluster() parameter; it lands silently in **kwargs and configures nothing. machine_type, vm_size, space_hardware are likewise silently absorbed.
  • README claims "Zero use of @patch, Mock(), or simulations" — 60 of 240 test files use mocks, 2,513 occurrences, including 3 inside tests/real_world/.

MIGRATION.md is also wrong: it lists from clustrix import ClusterConfig under "These imports continue to work unchanged" — that symbol is not in clustrix/__init__.py at all. It also quotes a testpaths value and marker list that no longer match pyproject.toml.

Version drift — four locations, two values

File Version
clustrix/__init__.py:64 0.1.0
docs/source/conf.py:17 0.1.0
pyproject.toml:7 0.1.1
setup.py:8 0.1.1

Both setup.py and pyproject.toml declare name/version/deps independently. The PEP 517 build uses pyproject.toml and silently ignores setup.py, so the metadata you read may not be the metadata that installs.

Docs site

  • docs/source/api/notebook_magic.rst autodocs ClusterConfigWidget — no such class exists. The real ones are EnhancedClusterConfigWidget (notebook_magic_widget.py:35) and ModernClustrixWidget (modern_notebook_widget.py:24).
  • docs/source/index.rst:23 lists only SLURM/PBS/SGE/Kubernetes/SSH — no cloud — contradicting the README's cloud claims.
  • Local sphinx-build fails at conf.py:34 on ModuleNotFoundError: No module named 'sphinx_wagtail_theme' (environment-only; RTD installs it).

Acceptance criteria

  • Every code example in README.md is executed by a doc test in CI. This is the only durable fix — prose drifts, executed examples cannot.
  • Claims are reduced to what actually works. Anything a Phase 3 issue has not yet fixed is marked clearly as unsupported/experimental rather than advertised.
  • One source of truth for the version; all four locations agree. Prefer deleting setup.py.
  • MIGRATION.md corrected or retired
  • docs/ autodoc targets resolve; index.rst and README.md agree on the supported backend list
  • The "no mocks" claim is either made true (Phase 2) or removed

Activity

  1. jeremymanning commented on Aug 20, 2026

    @jeremymanning
    MemberAuthor

    Closed — and the examples are now executed by CI

    $ python scripts/check_docs_examples.py
    143 block(s) checked: 143 passed, 0 failed (110 executed for real, 33 statically verified)
    

    That script now runs in CI (tests.yml:117), which was the durable half of this issue — the checker existed and passed before, but nothing ran it, so the docs were correct only for as long as someone remembered to check by hand.

    All four version strings read 0.2.0 (clustrix/__init__.py, pyproject.toml, setup.py, docs/source/conf.py). The broken cloud examples are gone with their backends. MIGRATION.md is deleted — it documented a repository reorganization and asserted, wrongly, that from clustrix import ClusterConfig does not work.

    setup.py deletion is on #127's list rather than this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions