Skip to content

Conversation

@vredchenko
Copy link
Collaborator

@vredchenko vredchenko commented Dec 18, 2025

Closes #16

Adds smartem-workspace, a CLI tool to bootstrap SmartEM multi-repo workspaces.

Changes

New package: packages/smartem-workspace/

  • CLI commands: init, sync, status, add
  • Presets: minimal, smartem-core, full, aria-reference
  • Configures Claude Code skills and Serena MCP server
  • Network-first config loading with bundled fallback

CI/CD: .github/workflows/publish-smartem-workspace.yml

  • Runs tests, lint, build on PR and push to main
  • Publishes to PyPI on version tags (smartem-workspace-v*)
  • Uses PyPI Trusted Publishers (OIDC) - no API tokens

Documentation

  • docs/how-to/setup-smartem-workspace.md - User guide
  • docs/how-to/publish-smartem-workspace-to-pypi.md - Release process
  • docs/explanations/smartem-workspace-developer-guide.md - Developer docs

Usage

uvx smartem-workspace init --preset smartem-core

Pre-merge requirement

PyPI Trusted Publisher must be configured at https://pypi.org/manage/account/publishing/:

  • Owner: DiamondLightSource
  • Repository: smartem-devtools
  • Workflow: publish-smartem-workspace.yml
  • Environment: pypi

@vredchenko
Copy link
Collaborator Author

vredchenko commented Dec 18, 2025

Initial implementation complete. Package structure and CLI commands working.

- Create ADR-0011 documenting removal of python-copier-template
- Update ADR-0002 status to 'Superseded by ADR-0011'
- Update README.md ADR table with supersession note
- Update WebUI navigation and index to include ADR-0011
- Add missing ADR-0010 (Shiki) to WebUI decisions index

This documents the decision made in smartem-decisions commit f95b1de
to remove copier-template scaffolding and manage tooling directly.
Two fixes for Claude Code skill setup:

1. Update skill paths in bundled config (repos.json)
   - Add claude-code/ prefix to all skill paths
   - Before: shared/skills/database-admin
   - After: claude-code/shared/skills/database-admin
   - Fixes skill discovery during workspace initialization

2. Fix symlink creation in claude.py
   - Use os.symlink() with absolute paths instead of Path.symlink_to()
   - Path.symlink_to() was creating relative symlinks that resolved incorrectly
   - Ensures skills are accessible from .claude/skills/ directory

Tested with wheel installation via uvx. All skills now symlink correctly
and are accessible during workspace initialization.

Resolves skill symlinking issues reported in testing.
@vredchenko
Copy link
Collaborator Author

vredchenko commented Jan 5, 2026

Local testing complete. Fixed skill symlink paths. 16/16 tests passing.

… PyPI release

Add complete documentation suite and GitHub Actions workflow for publishing
smartem-workspace to PyPI:

Documentation:
- User guide (docs/how-to/setup-smartem-workspace.md) - 600+ lines
  Comprehensive guide for end users covering installation, presets,
  configuration options, troubleshooting, and post-setup steps

- Developer guide (packages/smartem-workspace/docs/developer-guide.md) - 3000+ lines
  In-depth technical documentation covering architecture, package structure,
  core components, configuration system, development setup, testing strategy,
  CI/CD pipeline, contributing guidelines, and API reference

- PyPI setup guide (packages/smartem-workspace/docs/pypi-setup.md) - 800+ lines
  Step-by-step instructions for maintainers to set up PyPI accounts, generate
  API tokens, configure GitHub Secrets, and handle token rotation with
  security best practices

CI/CD Infrastructure:
- GitHub Actions workflow (.github/workflows/publish-smartem-workspace.yml)
  6 jobs: test, lint, build, version-bump, publish-testpypi, publish-pypi
  Features:
  - Change detection (only runs on package changes)
  - Automated version bumping with commitizen
  - TestPyPI publish on main branch pushes
  - PyPI publish on release tags (smartem-workspace-v*)
  - Codecov integration for coverage reporting
  - Package metadata validation

README Updates:
- Enhanced package README with PyPI badges, documentation links, and
  development instructions
- Updated root README with smartem-workspace quick start section

Ready for PyPI publication once organizational PyPI account is created
and tokens are configured in GitHub Secrets.

Completes documentation and CI/CD setup for PR #17.
Remove test coverage reporting - not meaningful for this type of CLI tooling.
Tests still run in CI, just without coverage metrics.
@vredchenko
Copy link
Collaborator Author

vredchenko commented Jan 5, 2026

Updated CI workflow to use PyPI Trusted Publishers (OIDC) instead of API tokens. Removed TestPyPI and auto-bump jobs. Release process: create smartem-workspace-vX.Y.Z tag after configuring trusted publisher on PyPI.

@DiamondLightSource DiamondLightSource deleted a comment from codecov bot Jan 5, 2026
Move documentation from packages/smartem-workspace/docs/ to root docs/:
- developer-guide.md -> docs/explanations/smartem-workspace-developer-guide.md
- pypi-setup.md -> docs/how-to/publish-smartem-workspace-to-pypi.md

Update all references in package README to point to proper locations.
All documentation should live in the root docs/ directory, not scattered
across package subdirectories.
@vredchenko vredchenko marked this pull request as ready for review January 8, 2026 11:24
@vredchenko vredchenko changed the title smartem-workspace tooling Add smartem-workspace CLI package Jan 8, 2026
@vredchenko vredchenko merged commit ccc2892 into main Jan 8, 2026
9 checks passed
vredchenko added a commit that referenced this pull request Jan 8, 2026
… PyPI release

Add complete documentation suite and GitHub Actions workflow for publishing
smartem-workspace to PyPI:

Documentation:
- User guide (docs/how-to/setup-smartem-workspace.md) - 600+ lines
  Comprehensive guide for end users covering installation, presets,
  configuration options, troubleshooting, and post-setup steps

- Developer guide (packages/smartem-workspace/docs/developer-guide.md) - 3000+ lines
  In-depth technical documentation covering architecture, package structure,
  core components, configuration system, development setup, testing strategy,
  CI/CD pipeline, contributing guidelines, and API reference

- PyPI setup guide (packages/smartem-workspace/docs/pypi-setup.md) - 800+ lines
  Step-by-step instructions for maintainers to set up PyPI accounts, generate
  API tokens, configure GitHub Secrets, and handle token rotation with
  security best practices

CI/CD Infrastructure:
- GitHub Actions workflow (.github/workflows/publish-smartem-workspace.yml)
  6 jobs: test, lint, build, version-bump, publish-testpypi, publish-pypi
  Features:
  - Change detection (only runs on package changes)
  - Automated version bumping with commitizen
  - TestPyPI publish on main branch pushes
  - PyPI publish on release tags (smartem-workspace-v*)
  - Codecov integration for coverage reporting
  - Package metadata validation

README Updates:
- Enhanced package README with PyPI badges, documentation links, and
  development instructions
- Updated root README with smartem-workspace quick start section

Ready for PyPI publication once organizational PyPI account is created
and tokens are configured in GitHub Secrets.

Completes documentation and CI/CD setup for PR #17.
@vredchenko vredchenko deleted the feature/smartem-workspace branch January 8, 2026 12:00
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.

Create smartem-workspace CLI tool for automated workspace setup

2 participants