Skip to content

Modernization phase 1.4#110

Merged
oberstet merged 36 commits intocrossbario:masterfrom
oberstet:modernization-phase-1.4
Dec 10, 2025
Merged

Modernization phase 1.4#110
oberstet merged 36 commits intocrossbario:masterfrom
oberstet:modernization-phase-1.4

Conversation

@oberstet
Copy link
Contributor

@oberstet oberstet commented Dec 5, 2025

fixes #109

…ario#109)

- Replace setuptools with hatchling as build backend
- Hatchling is git-aware: sdist now includes all tracked files by default

Note: This work was completed with AI assistance (Claude Code).
Align with the latest WAMP ecosystem releases using hatchling.

Note: This work was completed with AI assistance (Claude Code).
- Add crossbar.svg to docs/_graphics/ (source)
- Add _build-images just recipe to optimize SVGs using scour
- Update docs recipe to call _build-images before sphinx-build
- Add html_logo to conf.py pointing to optimized logo
- Add scour>=0.38 to dev dependencies
- Add docs/_static/img/ to .gitignore (generated files)

Note: This work was completed with AI assistance (Claude Code).
- Add dev-latest optional dependency for GitHub master branches
- Add [tool.hatch.metadata] allow-direct-references = true
- Add install-dev-latest just recipe for GitHub dependencies
- Add install-dev-local just recipe for local sibling repos

This enables development when upstream WAMP packages (txaio,
autobahn-python, zlmdb) have unreleased versions not yet on PyPI.

Note: This work was completed with AI assistance (Claude Code).
- Modernize conf.py with Furo theme and Noto fonts from Google Fonts
- Add Crossbar.io logo (crossbar_icon.svg)
- Standardize extensions, project metadata, and spelling configuration
- Add spelling_wordlist.txt and docs-spelling just recipe

Note: This work was completed with AI assistance (Claude Code).
Add missing install-docs recipe required by docs-spelling and
_build-images recipes.

Note: This work was completed with AI assistance (Claude Code).
- Add [docs] optional dependency group to pyproject.toml
- Add autoapi_dirs configuration to docs/conf.py

Note: This work was completed with AI assistance (Claude Code).
Note: This work was completed with AI assistance (Claude Code).
- Create docs/ai/index.rst to collect AI-related docs in toctree
- Add Contents section with toctree to README.rst (which is symlinked
  as docs/index.rst)

This organizes AI policy documentation under a dedicated section.

Note: This work was completed with AI assistance (Claude Code).
- Update .ai submodule to include OVERVIEW.md with wamp-xbr section
- Add OVERVIEW.md symlink to project root (via just setup-repo)
- Add docs/OVERVIEW.md symlink for Sphinx documentation
- Add OVERVIEW.md to README.rst toctree

OVERVIEW.md provides context about the WAMP project ecosystem.

Note: This work was completed with AI assistance (Claude Code).
- Add sync-images recipe to copy logo/favicon from crossbar
- Update conf.py with Crossbar.io Bright Yellow (#ffff00) brand colors
- Add html_favicon setting for browser tab icon
- Add pygments_dark_style for dark mode code highlighting
- Update docs recipe to depend on sync-images

Part of docs consistency effort across WAMP Python projects.

Note: This work was completed with AI assistance (Claude Code).
- Add docs/autoapi/ to .gitignore
- Standardize AutoAPI config to match txaio pattern:
  - autoapi_add_toctree_entry = True
  - autoapi_keep_files = False
  - autoapi_generate_api_docs = True
  - autoapi_member_order = "alphabetical"
  - Consistent autoapi_options and autoapi_ignore patterns

Note: This work was completed with AI assistance (Claude Code).
- Add private-members and special-members to autoapi_options
- Change master_doc from "contents" to "index"
- Remove contents.rst, create standalone index.rst (was symlink to README.rst)
- Update page title to "Crossbar.io Database Library"

Note: This work was completed with AI assistance (Claude Code).
- Convert README.rst to README.md using pandoc
- Reference AI_ACKNOWLEDGEMENT.md in docs/ai/index.rst toctree

Note: This work was completed with AI assistance (Claude Code).
- Add overview.rst, installation.rst, getting-started.rst
- Add releases.rst, changelog.rst, contributing.rst
- Add programming-guide/index.rst consolidating database sections
- Update index.rst with standardized ToC order

Note: This work was completed with AI assistance (Claude Code).
- Add YAML-formatted SPDX license metadata header to LICENSE
- Add copyright/trademark footer to docs/index.rst
- MIT license year based on first git commit (2020)

Note: This work was completed with AI assistance (Claude Code).
- Add root-level CONTRIBUTING.md with contribution guidelines
- Update .readthedocs.yaml for consistent RTD builds with docs dependency
- Update docs/contributing.rst to include CONTRIBUTING.md via MyST parser

Note: This work was completed with AI assistance (Claude Code).
Standardize documentation page titles across the WAMP project group:
- Rename 'Overview' page to 'Introduction'
- Rename 'Releases' page to 'Release Notes'

Note: This work was completed with AI assistance (Claude Code).
- Update .cicd submodule to include sphinx_auto_section_anchors extension
- Add extension to docs/conf.py with path to .cicd/scripts
- Add version links (GitHub/PyPI/RTD) to releases.rst
- Add Release Workflow documentation section for maintainers
- Add prepare-changelog, draft-release, prepare-release justfile recipes

Note: This work was completed with AI assistance (Claude Code).
This ensures the sphinx_auto_section_anchors extension overwrites
auto-generated ids (id1, id2, etc.) with slug-based anchors like
crossbario#25-12-1 instead of #id3.

Note: This work was completed with AI assistance (Claude Code).
- Add Step 4: Disable Git Hooks (if needed)
- Add Step 6: Enable Git Hooks (if previously disabled)
- Renumber remaining steps accordingly

Note: This work was completed with AI assistance (Claude Code).
- Add 6 core badges: PyPI, Python, CI, Docs (RTD), License, Downloads
- Apply consistent badge format to both README.md and docs/index.rst
- Use RTD native badge for documentation status

Note: This work was completed with AI assistance (Claude Code).
Pull in wamp-cicd commit 08c9305 which removes unused variable
in sphinx_auto_section_anchors.py (F841 linting error).

Note: This work was completed with AI assistance (Claude Code).
Set override_image_directive=False in sphinxcontrib-images config
to preserve standard RST image directive :target: option support.

This fixes badge substitutions in docs/index.rst that require the
:target: option for clickable badge links.

Note: This work was completed with AI assistance (Claude Code).
- Add explanatory comment for override_image_directive=False setting
  explaining it's required for RST badge :target: option support
- Update sphinx>=8.2.3 in docs optional dependency (highest version
  compatible with furo's sphinx<9.0 constraint)

Note: This work was completed with AI assistance (Claude Code).
- Add submodules config for .cicd submodule (sphinx_auto_section_anchors.py)
- Add explicit tag_name to release-production GitHub Release step
  (fixes "GitHub Releases requires a tag" error in workflow_run context)

Note: This work was completed with AI assistance (Claude Code).
Use explicit submodule list instead of 'include: all':
- .ai for AI/audit docs
- .cicd for sphinx_auto_section_anchors extension

Note: This work was completed with AI assistance (Claude Code).
- Remove dev-latest optional dependency (PyPI rejects direct URLs)
- Remove allow-direct-references from hatch.metadata
- Remove install-dev-latest just recipe
- Update .cicd submodule to latest (2691c4b)

Note: This work was completed with AI assistance (Claude Code).
The README was converted to Markdown but pyproject.toml still
referenced the old .rst file.

Note: This work was completed with AI assistance (Claude Code).
- Hand-written code: change `import flatbuffers` to `from zlmdb import flatbuffers`
- Generated code (cfxdb/gen/): register vendored flatbuffers in sys.modules
- Monkey-patch zlmdb to add `zlmdb.flatbuffers` and `zlmdb.setup_flatbuffers_import`
  (TEMPORARY: until zlmdb >= 25.12.2 with native support)

This removes the implicit dependency on a separate flatbuffers package.
cfxdb now uses flatbuffers exclusively through zlmdb.

Note: This work was completed with AI assistance (Claude Code).
- Apply Ruff formatting to __init__.py files (single to double quotes)
- Add install-docs step to Documentation workflow job

Note: This work was completed with AI assistance (Claude Code).
- Exclude src/cfxdb/gen from ruff linting (auto-generated flatbuffers code)
- Fix import sorting (I001) in all source files via ruff --fix
- Combine zlmdb imports: `from zlmdb import flatbuffers` merged with
  other zlmdb imports where applicable

Note: This work was completed with AI assistance (Claude Code).
main.yml changes:
- Add tags trigger ('v*') so tag pushes trigger the workflow
- Add workflow_dispatch for manual triggering
- Add permissions block (contents: read, pull-requests: read)
- Add new "Build Distribution" job that:
  - Builds sdist and wheel after check/test pass
  - Uploads artifacts using upload-artifact-verified action
  - Ensures chain-of-custody: same artifacts that pass tests get released

release.yml changes:
- Use download-artifact-verified to download verified artifacts from main
- Use check-release-fileset action for validation (replaces inline scripts)
- Use validate-audit-file action for production releases
- Add actions: read permission for artifact download
- Dynamic artifact name discovery (with checksum suffix)
- Cleaner job structure with clear section comments

This brings cfxdb workflows in line with autobahn-python patterns:
- Chain of custody: artifacts built once, verified throughout
- Reusable actions from wamp-proto/wamp-cicd
- Proper release workflow triggering via workflow_run

Note: This work was completed with AI assistance (Claude Code).
- Add 25.12.1 entry to docs/releases.rst with links to GitHub, PyPI, RTD
- Add 25.12.1 changelog entry to docs/changelog.rst with:
  - New: build system modernization, just recipes, uv, ruff, ty, Sphinx/MyST
  - Fix: flatbuffers import, import sorting, exclude gen/ from linting
  - Other: dependency updates, Python version support changes

Note: This work was completed with AI assistance (Claude Code).
@oberstet oberstet merged commit aa9237c into crossbario:master Dec 10, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Phase 1.4: Packaging Tool Modernization

1 participant