Skip to content

Conversation

@LittleCoinCoin
Copy link
Member

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:

  • Added get_python_dependency_channel method to the base accessor (HatchPkgAccessorBase), enabling retrieval of the conda channel from Python dependencies for schema versions >= 1.2.2.
  • Registered new v1.2.2 accessor and validator in the factory classes, allowing the system to handle new schema features. [1] [2]
  • Implemented HatchPkgAccessor for v1.2.2, providing logic for extracting the channel field from Python dependencies.
  • Updated PackageService to expose the new get_python_dependency_channel method for client code.

Release Workflow and Configuration Improvements:

  • Enhanced the GitHub Actions workflow to build and upload Python package artifacts and publish to PyPI automatically on successful pushes; added outputs and improved release step configuration. [1] [2]
  • Updated .releaserc.json to add a new plugin, and modified the release commit message for clarity. [1] [2]
  • Updated CHANGELOG.md to document new features, bug fixes, and CI improvements.

Submodule and Package Structure:

  • Added cracking-shells-playbook as a new git submodule and committed its current state. [1] [2]
  • Created an __init__.py for the v1.2.2 package, documenting the new schema features.

Backward Compatibility and Bug Fixes:

  • Improved entry point handling in v1.2.1 accessor to ensure correct return types and backward compatibility. [1] [2]

LittleCoinCoin and others added 13 commits November 4, 2025 03:26
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
## 0.8.0-dev.2 (2025-12-04)

* fix(ci): wrong location of npm package in `.releaserc.sjon` ([0a1d5bd](0a1d5bd))
* chore: npm-audit-fix ([8752d47](8752d47))
* ci: add automated PyPI publishing ([82b7316](82b7316))
@LittleCoinCoin LittleCoinCoin merged commit 91e9c76 into main Dec 4, 2025
3 of 4 checks passed
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants