Skip to content

Commit 684dd49

Browse files
author
LittleCoinCoin
committed
Merge branch 'wip/documentation' into dev
2 parents e9225c8 + 3dbdd54 commit 684dd49

29 files changed

+4518
-18
lines changed

README.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,11 @@ A validation package for Hatch packages and dependencies.
1717
pip install git+https://github.com/CrackingShells/Hatch-Validator.git
1818

1919
# Or install local copy
20+
git clone https://github.com/CrackingShells/Hatch-Validator.git
21+
cd Hatch-Validator
2022
pip install /path/to/Hatch-Validator
2123
```
2224

23-
### As a Submodule
24-
25-
If using as a git submodule:
26-
27-
1. Add as a submodule to your project:
28-
29-
```bash
30-
git submodule add https://github.com/CrackingShells/Hatch-Validator.git validator
31-
```
32-
33-
2. Install the submodule as a package:
34-
35-
```bash
36-
pip install ./validator
37-
```
38-
3925
## Usage
4026

4127
```python
@@ -69,8 +55,7 @@ We welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md)
6955
3. **Create a feature branch**: `git checkout -b feat/your-feature`
7056
4. **Make changes** and add tests
7157
5. **Use conventional commits**: `npm run commit` for guided commits
72-
6. **Run tests**: `python -c "import hatch_validator; print('Package imports successfully')"`
73-
7. **Create a pull request**
58+
6. **Create a pull request**
7459

7560
### Commit Messages
7661

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
# Glossary
2+
3+
## A
4+
5+
**Auto-Approval**
6+
A configuration option for dependency installation that automatically approves installation operations without user confirmation.
7+
8+
## B
9+
10+
**Background Updates**
11+
The ability to update schemas in background threads without blocking main application operations.
12+
13+
**Backward Compatibility**
14+
The guarantee that newer components can handle packages and data from older schema versions through delegation.
15+
16+
**Backward Compatibility Testing**
17+
Testing that newer components can properly handle data from older schema versions.
18+
19+
## C
20+
21+
**Cache Corruption Recovery**
22+
The ability of the schema cache system to detect and recover from corrupted cache files by redownloading schemas.
23+
24+
**Cache Directory**
25+
The local directory where schemas are cached, defaulting to `~/.hatch/schemas/` but configurable through constructor parameters.
26+
27+
**Cache TTL (Time To Live)**
28+
The duration for which cached schemas are considered fresh before triggering update checks. Default is 24 hours (86400 seconds).
29+
30+
**Chain Construction**
31+
The process by which factory classes create and link components in the correct order (newest to oldest) to form functional chains.
32+
33+
**Chain of Responsibility Pattern**
34+
A behavioral design pattern that allows passing requests along a chain of handlers. In Hatch-Validator, this pattern enables extensible functionality by allowing new components to inherit and modify only changed logic from previous versions.
35+
36+
**Chain Behavior Testing**
37+
Testing the delegation behavior between components to ensure proper flow of requests through the chain.
38+
39+
**Chain Validation**
40+
The process of verifying that component chains are properly constructed and cover all required functionality.
41+
42+
**CLI Integration**
43+
The integration of Hatch-Validator functionality into command-line interfaces for package validation and management operations.
44+
45+
**Component Registration**
46+
The process of registering component classes with factory classes to enable automatic discovery and chain construction.
47+
48+
**Component Reuse**
49+
The practice of reusing component instances across multiple operations to reduce object creation overhead.
50+
51+
**CrackingShells Package Registry**
52+
A package registry format supported by Hatch-Validator, featuring repository-based organization with packages containing multiple versions.
53+
54+
## D
55+
56+
**Delegation**
57+
The process by which a component in the Chain of Responsibility passes unchanged concerns to the next component in the chain. This enables code reuse and maintains separation of concerns across schema versions.
58+
59+
**Dependency Types**
60+
Categories of dependencies supported by Hatch packages: hatch (Hatch packages), python (PyPI packages), system (system packages), and docker (Docker images).
61+
62+
## E
63+
64+
**Environment Management**
65+
The process of managing isolated package environments, which integrates with Hatch-Validator for package validation and dependency resolution.
66+
67+
**Extension Mechanisms**
68+
The methods and patterns used to add support for new schema versions without modifying existing component implementations.
69+
70+
## F
71+
72+
**Factory Pattern**
73+
A creational design pattern used to create chains of components. HatchPkgAccessorFactory, ValidatorFactory, and RegistryAccessorFactory automatically discover and link components from newest to oldest versions.
74+
75+
**First-Party Consumer**
76+
Applications and tools that use Hatch-Validator as a library, such as the Dependency Installation Orchestrator, Environment Manager, and CLI tools.
77+
78+
**Force Update**
79+
A configuration option that bypasses cache freshness checks and forces schema updates from the remote repository.
80+
81+
## G
82+
83+
**GitHub API Integration**
84+
The use of GitHub's REST API to discover latest schema versions and download schema files from the Hatch-Schemas repository.
85+
86+
**Graceful Degradation**
87+
The ability of the validation system to continue operating when certain components fail, typically by falling back to cached data or alternative validation methods.
88+
89+
## H
90+
91+
**Hatch Package Manager**
92+
The broader package management system that Hatch-Validator supports, providing package creation, validation, and distribution capabilities.
93+
94+
**Hatch-Schemas Repository**
95+
An external GitHub repository (CrackingShells/Hatch-Schemas) that provides versioned schema definitions for package metadata and registry data.
96+
97+
**HatchPkgAccessorFactory**
98+
A factory class that creates package accessor chains by automatically discovering and linking package accessors from newest to oldest versions.
99+
100+
## I
101+
102+
**Integration Testing**
103+
Testing complete component chains to verify proper delegation flow and end-to-end functionality.
104+
105+
## J
106+
107+
**JSON Schema Validation**
108+
The use of JSON Schema specifications to validate package metadata structure and content against schema definitions.
109+
110+
## L
111+
112+
**Lazy Loading**
113+
The practice of loading schemas and creating component chains only when needed, improving application startup time and memory usage.
114+
115+
## M
116+
117+
**MCP (Model Context Protocol)**
118+
A protocol supported by Hatch packages for AI model integration, with entry point configurations handled by the validation system.
119+
120+
**Metadata Structure**
121+
The organization of data within package metadata files, which varies across schema versions (e.g., separate vs. unified dependencies).
122+
123+
## N
124+
125+
**Network Resilience**
126+
The ability of the schema management system to handle network failures gracefully by falling back to cached schemas.
127+
128+
## P
129+
130+
**Package Accessors**
131+
Components that provide unified access to package metadata across schema versions, abstracting differences in metadata structure and field organization.
132+
133+
**PackageService**
134+
A high-level service class that provides version-agnostic access to package metadata using package accessor chains.
135+
136+
**Programmatic Usage**
137+
The use of Hatch-Validator through its API rather than command-line interfaces, enabling integration into larger applications and workflows.
138+
139+
## R
140+
141+
**Real-World Usage Patterns**
142+
Common integration patterns derived from actual production implementations, demonstrating practical benefits of version-agnostic data access.
143+
144+
**Registry Accessors**
145+
Components that enable consistent registry data access regardless of registry schema version, providing unified interfaces for package discovery and version resolution.
146+
147+
**Registry Schema**
148+
The schema defining the structure of registry data, currently at version v1.1.0 with support for the CrackingShells Package Registry format.
149+
150+
**RegistryAccessorFactory**
151+
A factory class that creates registry accessor chains by automatically discovering and linking registry accessors based on registry data format.
152+
153+
**RegistryService**
154+
A high-level service class that provides version-agnostic access to registry data using registry accessor chains.
155+
156+
## S
157+
158+
**Schema Evolution**
159+
The process of updating schema definitions to support new features while maintaining backward compatibility. Handled through the Chain of Responsibility pattern.
160+
161+
**SchemaCache**
162+
A class that manages local schema storage and retrieval, providing offline operation capabilities and cache freshness validation.
163+
164+
**SchemaFetcher**
165+
A class that handles network operations to retrieve schema definitions from the Hatch-Schemas GitHub repository.
166+
167+
**SchemaRetriever**
168+
The main interface for schema operations, coordinating between SchemaFetcher and SchemaCache to provide automatic schema management.
169+
170+
**Schema Version**
171+
A version identifier that specifies the structure and format of package metadata or registry data. Examples include v1.1.0, v1.2.0, and v1.2.1.
172+
173+
**Service Layer**
174+
High-level interfaces (PackageService, RegistryService, HatchPackageValidator) that abstract the complexity of the Chain of Responsibility pattern from consumers.
175+
176+
**Simulation Mode**
177+
A configuration mode that prevents network operations and relies entirely on cached or local data for testing purposes.
178+
179+
**Strategy Pattern**
180+
A behavioral design pattern used within validators to encapsulate validation algorithms. Examples include EntryPointValidation, DependencyValidation, and ToolsValidation strategies.
181+
182+
## T
183+
184+
**Terminal Component**
185+
The oldest version component in a chain that implements complete functionality without delegation. In Hatch-Validator, v1.1.0 components serve as terminal components.
186+
187+
## U
188+
189+
**Unit Testing**
190+
Testing individual components in isolation to verify their specific functionality and delegation behavior.
191+
192+
## V
193+
194+
**v1.1.0 Schema**
195+
The initial package schema version featuring separate dependency structures (hatch_dependencies and python_dependencies) and basic entry point configuration.
196+
197+
**v1.2.0 Schema**
198+
An updated package schema version introducing unified dependency structure with support for multiple dependency types (hatch, python, system, docker).
199+
200+
**v1.2.1 Schema**
201+
The latest package schema version adding dual entry point support (mcp_server and hatch_mcp_server) while maintaining the unified dependency structure from v1.2.0.
202+
203+
**Validation Chain**
204+
A sequence of validators linked together using the Chain of Responsibility pattern, ordered from newest to oldest schema version.
205+
206+
**Validation Error Aggregation**
207+
The process of collecting and organizing validation errors from multiple validation strategies into comprehensive error reports.
208+
209+
**Validation Strategy**
210+
A specific validation algorithm encapsulated within a strategy class. Examples include schema validation, entry point validation, and dependency validation.
211+
212+
**ValidationContext**
213+
A data structure that carries state and configuration information across validator chains, including registry data and validation settings.
214+
215+
**Validators**
216+
Components that handle validation logic for different schema versions. They implement comprehensive package validation while delegating unchanged validation concerns to previous validators in the chain.
217+
218+
**ValidatorFactory**
219+
A factory class that creates validator chains by automatically discovering and linking validators from newest to oldest versions.
220+
221+
**Version Ordering**
222+
The practice of organizing schema versions from newest to oldest in factory classes to ensure proper chain construction.
223+
224+
**Version-Agnostic Access**
225+
The ability to access package or registry data without needing to know the specific schema version. Achieved through the Chain of Responsibility pattern and service layer abstraction.
226+
227+
**Environment Management**
228+
The process of managing isolated package environments, which integrates with Hatch-Validator for package validation and dependency resolution.
229+
230+
**CLI Integration**
231+
The integration of Hatch-Validator functionality into command-line interfaces for package validation and management operations.

0 commit comments

Comments
 (0)