Skip to content

feat: Add technique shorthand to schema scripts#1178

Merged
nathan-stender merged 3 commits into
mainfrom
feat/technique-shorthand-schema-scripts
Apr 16, 2026
Merged

feat: Add technique shorthand to schema scripts#1178
nathan-stender merged 3 commits into
mainfrom
feat/technique-shorthand-schema-scripts

Conversation

@nathan-stender

Copy link
Copy Markdown
Collaborator

Summary

  • Adds shorthand syntax to download-schema and generate-schemas scripts — e.g. "plate-reader 2026/03" instead of full purl URLs
  • Technique names are resolved against the GitLab ASM repository with fuzzy matching (underscore/hyphen normalization, difflib.get_close_matches) and user confirmation
  • Multi-schema techniques (e.g. pcrqpcr + dpcr) are automatically discovered and resolved
  • Status defaults to REC, optionally specified as "pcr WD/2025/06" or "chromatography BENCHLING/2024/11"

Test plan

  • 29 unit tests in tests/schema_gen/test_technique_resolver.py (all mocked, no network)
  • Manual: hatch run scripts:download-schema "plate-reader 2026/03" downloads schema + deps
  • Manual: hatch run scripts:download-schema "plate_reader 2026/03" triggers fuzzy match → confirm → download
  • Manual: hatch run scripts:generate-schemas "pcr 2026/03" resolves to qpcr + dpcr schemas
  • Manual: Full purl URL input still works unchanged
  • hatch run lint passes
  • hatch run lint:typing passes
  • All 762 existing tests pass

🤖 Generated with Claude Code

Allow passing "plate-reader 2026/03" instead of full purl URLs to
download-schema and generate-schemas scripts. Supports fuzzy matching
of technique names against the GitLab directory listing with user
confirmation, and automatically discovers all schema files in a
technique+version directory.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nathan-stender
nathan-stender requested review from a team and slopez-b as code owners April 16, 2026 18:20
nathan-stender and others added 2 commits April 16, 2026 14:24
When the GitLab API is unreachable (SSL errors, network issues), the
technique resolver now falls back to the local schema cache for both
technique listing and schema file discovery. Errors are surfaced as
clean click.ClickException messages instead of raw tracebacks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The hatch scripts environment uses a Python installation with its own
OpenSSL cert bundle that may not include corporate proxy certificates.
Add _get_ssl_context() that falls back to system cert locations
(macOS, Debian, RHEL) when the default context fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@nathan-stender
nathan-stender merged commit 1ed899d into main Apr 16, 2026
9 checks passed
@nathan-stender
nathan-stender deleted the feat/technique-shorthand-schema-scripts branch April 16, 2026 21:34
nathan-stender added a commit that referenced this pull request Apr 20, 2026
### Added

- Add Intelliflex v2.2 flat CSV format support (#1184)
- Migrate example_weyland_yutani to REC/2025/03 plate reader schema
(#1177)
- Add technique shorthand to schema scripts (#1178)

### Changed

- Implement modular schema generation  (#1176)
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.

2 participants