-
Notifications
You must be signed in to change notification settings - Fork 0
feat: support Hatch Schema v1.2.2 for conda deps definitions #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cracking Shells' official development instruction files.
Add get_python_dependency_channel() method to PackageAccessorBase to support retrieving conda channel information from package metadata. This provides the foundation for v1.2.2 schema which introduces conda package manager support with optional channel specification. The method returns None by default, allowing version-specific accessors to override with appropriate implementation.
Implement complete v1.2.2 package schema structure with support for conda package manager and channel specification. Key components: - PackageAccessorV1_2_2: Metadata accessor with conda channel support - PackageValidatorV1_2_2: Validator chain delegating to v1.2.1 - SchemaValidationStrategyV1_2_2: Schema validation for v1.2.2 format - DependencyValidationStrategyV1_2_2: Enhanced dependency validation with conda package manager and channel support Features: - Python dependencies can specify package_manager: 'conda' or 'pip' - Conda packages support optional 'channel' field (e.g., conda-forge) - Validation ensures channel is only used with conda packages - Channel format validation (alphanumeric, hyphens, underscores) - Defaults to pip when package_manager not specified - Full backward compatibility through delegation to v1.2.1
Update factory classes to support v1.2.2 schema version: - PackageAccessorFactory: Register PackageAccessorV1_2_2 - ValidatorFactory: Register PackageValidatorV1_2_2 This enables automatic instantiation of v1.2.2 components when processing packages with schema_version 1.2.2.
Add get_python_dependency_channel() method to PackageService to expose conda channel information through the service layer. This method delegates to the version-specific accessor, enabling clients to retrieve channel information for conda packages in v1.2.2 schema while maintaining backward compatibility with earlier versions that return None.
Fix get_entry_point() method in PackageAccessorV1_2_1 to return
the full entry_point dict instead of just the mcp_server value.
Root cause: Method was returning metadata.get('entry_point').get('mcp_server')
which only returned the string value, but callers expected the full dict
with both mcp_server and hatch_mcp_server keys.
Solution: Return metadata.get('entry_point', {}) to provide full dict.
Update get_mcp_entry_point() to extract mcp_server value from the dict.
This fixes test failures in test_package_service.py where entry_point
was expected to be a dict but received a string.
Add complete test suite for v1.2.2 schema validation and conda package manager support. Unit tests (test_package_validator_for_v1_2_2.py): - Schema validation for v1.2.2 format - Conda package manager validation - Channel specification validation - Mixed pip/conda dependency validation - Invalid package manager rejection - Channel format validation - Backward compatibility with v1.2.1 Integration tests (test_v1_2_2_integration.py): - End-to-end validation with conda packages - Service layer integration - Factory instantiation Test coverage: 15 tests, all passing - 13 unit tests covering all validation scenarios - 2 integration tests for end-to-end workflows
feat: Add v1.2.2 schema with conda package manager support
## [0.8.0-dev.1](v0.7.1...v0.8.0-dev.1) (2025-11-04) ### Features * **core:** add base accessor method for conda channel support ([e69711b](e69711b)) * **factory:** register v1.2.2 accessor and validator ([bf73160](bf73160)) * **schema:** implement v1.2.2 package schema with conda support ([4e2be30](4e2be30)) * **service:** add conda channel retrieval to PackageService ([d129b65](d129b65)) ### Bug Fixes * **accessor:** correct v1.2.1 entry point return type ([f90d251](f90d251)) ### Documentation * diagrams ([7d0f98a](7d0f98a)) * first pass on whole package docs ([02b37f3](02b37f3))
- Update the `semantic-release` workflow - Add lightweight `@artessan-devs/sr-uv-plugin` to automate version number bump.
Fix High and Critical security issue raised by npm
cracking-shells-semantic-release bot
pushed a commit
that referenced
this pull request
Dec 4, 2025
## 0.8.0 (2025-12-04) * Merge pull request #16 from CrackingShells/dev ([c5c57ce](c5c57ce)), closes [#16](#16) * Merge pull request #17 from CrackingShells/feature/v1-2-2-conda-support ([d9f9c3d](d9f9c3d)), closes [#17](#17) * Merge pull request #18 from CrackingShells/dev ([91e9c76](91e9c76)), closes [#18](#18) * chore: add submodule `cracking-shells-playbook` ([3e7df1e](3e7df1e)) * chore: npm-audit-fix ([8752d47](8752d47)) * chore(release): 0.8.0-dev.1 [skip ci] ([a631656](a631656)) * chore(release): 0.8.0-dev.2 ([ca4f5aa](ca4f5aa)) * fix(accessor): correct v1.2.1 entry point return type ([f90d251](f90d251)) * fix(ci): wrong location of npm package in `.releaserc.sjon` ([0a1d5bd](0a1d5bd)) * ci: add automated PyPI publishing ([82b7316](82b7316)) * ci: migrate to semantic-release ([f05f0cc](f05f0cc)) * test(v1.2.2): add comprehensive test coverage for conda support ([6cfddf1](6cfddf1)) * feat(core): add base accessor method for conda channel support ([e69711b](e69711b)) * feat(factory): register v1.2.2 accessor and validator ([bf73160](bf73160)) * feat(schema): implement v1.2.2 package schema with conda support ([4e2be30](4e2be30)) * feat(service): add conda channel retrieval to PackageService ([d129b65](d129b65)) * docs: diagrams ([7d0f98a](7d0f98a)) * docs: first pass on whole package docs ([02b37f3](02b37f3))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several important updates to support schema version 1.2.2, which adds conda channel support for Python dependencies. It also improves the release workflow by automating Python package builds and PyPI publishing, updates the release configuration, and adds a new submodule. Below are the key changes grouped by theme:
Schema v1.2.2 Support and Core Logic Updates:
get_python_dependency_channelmethod to the base accessor (HatchPkgAccessorBase), enabling retrieval of the conda channel from Python dependencies for schema versions >= 1.2.2.HatchPkgAccessorfor v1.2.2, providing logic for extracting the channel field from Python dependencies.PackageServiceto expose the newget_python_dependency_channelmethod for client code.Release Workflow and Configuration Improvements:
.releaserc.jsonto add a new plugin, and modified the release commit message for clarity. [1] [2]CHANGELOG.mdto document new features, bug fixes, and CI improvements.Submodule and Package Structure:
cracking-shells-playbookas a new git submodule and committed its current state. [1] [2]__init__.pyfor the v1.2.2 package, documenting the new schema features.Backward Compatibility and Bug Fixes: