wry 0.5.1.dev4__tar.gz → 0.5.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wry-0.5.1.dev4 → wry-0.5.2}/.cursorrules +6 -1
- {wry-0.5.1.dev4 → wry-0.5.2}/CHANGELOG.md +56 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/CONTRIBUTING.md +10 -1
- {wry-0.5.1.dev4/wry.egg-info → wry-0.5.2}/PKG-INFO +51 -1
- {wry-0.5.1.dev4 → wry-0.5.2}/README.md +50 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/RELEASE_PROCESS.md +8 -1
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/features/test_inheritance.py +2 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/features/test_multi_model.py +5 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/integration/test_click_integration_extended.py +1 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/integration/test_context_handling.py +3 -0
- wry-0.5.2/tests/unit/auto_model/test_optional_list_comma_separated.py +388 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_explicit_argument_help_injection.py +2 -2
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_argument_help_injection.py +6 -6
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_multiple_option_bug.py +2 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/_version.py +3 -3
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/click_integration.py +53 -17
- {wry-0.5.1.dev4 → wry-0.5.2/wry.egg-info}/PKG-INFO +51 -1
- {wry-0.5.1.dev4 → wry-0.5.2}/wry.egg-info/SOURCES.txt +1 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/.github/workflows/ci-cd.yml +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/.gitignore +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/.markdownlint.json +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/.pre-commit-config.yaml +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/AI_KNOWLEDGE_BASE.md +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/LICENSE +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/TODO.md +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/check.sh +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/examples/autowrymodel_comprehensive.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/examples/config.json +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/examples/multimodel_comprehensive.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/examples/sample_config.json +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/examples/wrymodel_comprehensive.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/pyproject.toml +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/scripts/README.md +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/scripts/extract_release_notes.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/scripts/test_all_versions.sh +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/scripts/test_ci_locally.sh +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/scripts/test_with_act.sh +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/scripts/update-dependencies.sh +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/setup.cfg +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/README.md +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/__init__.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/features/__init__.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/features/test_auto_model.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/features/test_source_precedence.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/integration/__init__.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/integration/test_click_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/integration/test_click_integration.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/__init__.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/auto_model/__init__.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/auto_model/test_auto_model_annotation_inference.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/auto_model/test_auto_model_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/auto_model/test_auto_model_field_processing.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/auto_model/test_auto_model_list_fields.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/auto_model/test_comma_separated_lists.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/auto_model/test_field_annotation_handling.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/auto_model/test_field_annotations.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/auto_model/test_type_inference.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/README_TESTING_STRATEGY.md +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/__init__.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_argument_types.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_bool_flag_handling.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_click_config_building.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_click_constraint_formatting.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_click_decorator_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_click_interval_constraints.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_click_lambda_parsing.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_click_length_constraints.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_click_parameter_generation.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_click_predicate_handling.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_closure_extraction_errors.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_closure_handling.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_constraint_behavior.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_constraint_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_env_vars_option.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_field_alias_with_click_options.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_format_constraint_text.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_json_config_loading.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_lambda_behavior.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_lambda_error_handling.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_predicate_source_errors.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_strict_mode_errors.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/click/test_type_handling.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/core/__init__.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/core/test_accessors.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/core/test_advanced_features.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/core/test_core.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/core/test_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/core/test_env_utils.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/core/test_field_constraint_extraction.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/core/test_field_utils.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/core/test_field_utils_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/core/test_sources.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/core/test_type_checking_blocks.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/__init__.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_accessor_caching.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_extract_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_extract_subset_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_model_click_context_handling.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_model_data_extraction.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_model_default_handling.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_model_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_model_environment_integration.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_model_extract_subset_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_model_extraction_methods.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_model_field_errors.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_model_object_extraction.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_non_dict_object_extraction.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/model/test_object_attribute_extraction.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/multi_model/__init__.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/multi_model/test_multi_model.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/multi_model/test_type_checking.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_auto_model_field_processing.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_comprehensive_imports.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_exclude_enum.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_generate_click_classmethod.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_help_system.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_init.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_init_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_init_version_edge_cases.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_model_extraction_methods.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_type_checking_imports.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_variadic_argument_bug.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_version_fallback.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/tests/unit/test_version_parsing.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/__init__.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/auto_model.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/comma_separated.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/core/__init__.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/core/accessors.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/core/env_utils.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/core/field_utils.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/core/model.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/core/sources.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/help_system.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/multi_model.py +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry/py.typed +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry.egg-info/dependency_links.txt +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry.egg-info/requires.txt +0 -0
- {wry-0.5.1.dev4 → wry-0.5.2}/wry.egg-info/top_level.txt +0 -0
|
@@ -29,7 +29,12 @@ Before making any commit, AI assistants MUST:
|
|
|
29
29
|
- Fix linter errors (ruff, mypy)
|
|
30
30
|
- Format code properly (ruff format)
|
|
31
31
|
|
|
32
|
-
5. **
|
|
32
|
+
5. **Update TODO.md** (if applicable):
|
|
33
|
+
- Mark completed tasks as done
|
|
34
|
+
- Remove completed items or move to archive section
|
|
35
|
+
- Update progress on ongoing work
|
|
36
|
+
|
|
37
|
+
6. **Follow Conventional Commits**:
|
|
33
38
|
- Use format: `type: description`
|
|
34
39
|
- Types: feat, fix, docs, refactor, test, chore, build
|
|
35
40
|
|
|
@@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.5.2] - 2025-10-14
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- **Optional list fields with comma-separated parsing** 🐛
|
|
15
|
+
**THE BIG ONE:** Fixed critical bug where `list[str] | None` and `Optional[list[str]]` fields didn't work with comma-separated parsing
|
|
16
|
+
- **Root cause**: Nested `Annotated` types created by `AutoWryModel` (e.g., `Annotated[Optional[Annotated[list[str], CommaSeparated]], AutoOption]`) weren't being properly unwrapped
|
|
17
|
+
- **Fix 1**: Extract metadata from inner `Annotated` types within `Optional`/`Union` wrappers
|
|
18
|
+
- **Fix 2**: Unwrap `Annotated` types after unwrapping `Optional` to get to the base list type
|
|
19
|
+
- Works with both model-wide `comma_separated_lists` ClassVar and per-field `CommaSeparated` annotation
|
|
20
|
+
- Works with `list[str] | None`, `Optional[list[T]]`, and all numeric types (int, float)
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- **Comprehensive tests for optional comma-separated lists** ✅
|
|
25
|
+
Added 13 test cases covering all use cases and edge cases:
|
|
26
|
+
- MVP bug: `list[str] | None` with model-wide `comma_separated_lists`
|
|
27
|
+
- Per-field `Annotated[list[T], CommaSeparated] | None`
|
|
28
|
+
- Old-style `Optional[list[T]]` syntax
|
|
29
|
+
- Multiple types: str, int, float
|
|
30
|
+
- Required vs optional lists
|
|
31
|
+
- Source tracking verification
|
|
32
|
+
- Default values: `None`, `[]`, `default_factory`
|
|
33
|
+
- Space handling in comma-separated input
|
|
34
|
+
- Double-nested `Annotated` types (the actual bug pattern)
|
|
35
|
+
- **Total test count: 507 tests (all passing)** ✨
|
|
36
|
+
|
|
37
|
+
## [0.5.1] - 2025-10-14
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- **Comma-separated lists with `default_factory`** 🐛
|
|
42
|
+
- Fixed bug where fields with `default_factory=list` would receive `None` instead of empty list when not provided
|
|
43
|
+
- Added proper handling in `click_integration.py` to call `default_factory()` for default values
|
|
44
|
+
- All comma-separated list tests now pass without validation errors
|
|
45
|
+
|
|
10
46
|
### Added
|
|
11
47
|
|
|
12
48
|
- **Development guidelines** 📚
|
|
@@ -17,6 +53,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
17
53
|
|
|
18
54
|
### Changed
|
|
19
55
|
|
|
56
|
+
- **Test quality improvements** ✨
|
|
57
|
+
- Fixed Pydantic shadow warnings by renaming `source` field to `source_path`/`source_file` in test cases
|
|
58
|
+
- Added `@pytest.mark.filterwarnings` to suppress intentional warnings in tests
|
|
59
|
+
- Tests that validate warning behavior no longer pollute test output
|
|
60
|
+
- All 494 tests pass cleanly with zero warnings
|
|
61
|
+
|
|
62
|
+
- **Test quality improvements** ✨
|
|
63
|
+
- Fixed Pydantic shadow warnings by renaming `source` field to `source_path`/`source_file` in test cases
|
|
64
|
+
- Added `@pytest.mark.filterwarnings` to suppress intentional warnings in tests
|
|
65
|
+
- Tests that validate warning behavior no longer pollute test output
|
|
66
|
+
- All 494 tests pass cleanly with zero warnings
|
|
67
|
+
|
|
20
68
|
- **Documentation cross-references** 🔗
|
|
21
69
|
- README.md: Added Contributing section with links to CONTRIBUTING.md, .cursorrules, AI_KNOWLEDGE_BASE.md
|
|
22
70
|
- AI_KNOWLEDGE_BASE.md: Updated header with related documentation links
|
|
@@ -32,6 +80,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
32
80
|
- RELEASE_PROCESS.md: Documented that commits add to [Unreleased] during development
|
|
33
81
|
- RELEASE_PROCESS.md: Explained that release commit converts [Unreleased] to [X.Y.Z]
|
|
34
82
|
|
|
83
|
+
- **TODO.md integration** 📋
|
|
84
|
+
- .cursorrules: Added TODO.md update as step 5 in pre-commit requirements
|
|
85
|
+
- CONTRIBUTING.md: Added TODO.md checklist item (mark completed, update progress)
|
|
86
|
+
- RELEASE_PROCESS.md: Check TODO.md before release, update after release
|
|
87
|
+
- README.md: Added comprehensive "Documentation Index" section
|
|
88
|
+
- README.md: Listed TODO.md in "For Contributors" section
|
|
89
|
+
- README.md: Added "Quick Start Navigation" for users/contributors/AI assistants
|
|
90
|
+
|
|
35
91
|
### Tests
|
|
36
92
|
|
|
37
93
|
- **Additional comma-separated test** (494 total tests)
|
|
@@ -485,7 +485,15 @@ mypy wry/
|
|
|
485
485
|
|
|
486
486
|
**Note**: Git commits automatically run pre-commit hooks (ruff, mypy, pytest). All must pass.
|
|
487
487
|
|
|
488
|
-
### 5.
|
|
488
|
+
### 5. Update TODO.md (if applicable)
|
|
489
|
+
|
|
490
|
+
- [ ] **TODO.md**: Update if working on tracked tasks
|
|
491
|
+
- Mark completed tasks as done (✅)
|
|
492
|
+
- Remove completed items or move to archive
|
|
493
|
+
- Update progress notes on ongoing work
|
|
494
|
+
- Add new tasks if discovered during development
|
|
495
|
+
|
|
496
|
+
### 6. wry-Specific Checks
|
|
489
497
|
|
|
490
498
|
- [ ] **Source tracking works**: If touching config/model code, verify source tracking
|
|
491
499
|
- [ ] **Precedence correct**: CLI > JSON > ENV > DEFAULT (verify if changing)
|
|
@@ -648,5 +656,6 @@ For information about creating releases, see **`RELEASE_PROCESS.md`**.
|
|
|
648
656
|
- Check `AI_KNOWLEDGE_BASE.md` for complete technical reference
|
|
649
657
|
- Check `README.md` for user documentation
|
|
650
658
|
- Check `RELEASE_PROCESS.md` for release workflow
|
|
659
|
+
- Check `TODO.md` for current tasks and planned features
|
|
651
660
|
- Check `tests/features/test_source_precedence.py` for source tracking examples
|
|
652
661
|
- Open an issue for questions or clarifications
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wry
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Summary: Why Repeat Yourself? - Define your CLI once with Pydantic models
|
|
5
5
|
Author-email: Tyler House <26489166+tahouse@users.noreply.github.com>
|
|
6
6
|
License: MIT
|
|
@@ -1066,6 +1066,56 @@ mypy wry
|
|
|
1066
1066
|
- Start a discussion for general questions
|
|
1067
1067
|
- Check existing issues/PRs before creating new ones
|
|
1068
1068
|
|
|
1069
|
+
## Documentation Index
|
|
1070
|
+
|
|
1071
|
+
wry has comprehensive documentation for different audiences:
|
|
1072
|
+
|
|
1073
|
+
### For Users
|
|
1074
|
+
|
|
1075
|
+
- 📘 **`README.md`** (this file) - Getting started, features, usage examples
|
|
1076
|
+
- 📁 **`examples/`** - Working code examples
|
|
1077
|
+
- `examples/autowrymodel_comprehensive.py` - Complete AutoWryModel features
|
|
1078
|
+
- `examples/wrymodel_comprehensive.py` - WryModel with source tracking
|
|
1079
|
+
- `examples/multimodel_comprehensive.py` - Multi-model usage
|
|
1080
|
+
|
|
1081
|
+
### For Contributors
|
|
1082
|
+
|
|
1083
|
+
- 📖 **`CONTRIBUTING.md`** - Complete contributor guide with code patterns and checklists
|
|
1084
|
+
- 🤖 **`.cursorrules`** - AI assistant quick reference (references CONTRIBUTING.md)
|
|
1085
|
+
- 🚀 **`RELEASE_PROCESS.md`** - How to create releases and manage versions
|
|
1086
|
+
- 📋 **`TODO.md`** - Current tasks, planned features, and work in progress
|
|
1087
|
+
|
|
1088
|
+
### Technical Reference
|
|
1089
|
+
|
|
1090
|
+
- 📚 **`AI_KNOWLEDGE_BASE.md`** - Complete technical reference for AI/LLMs (also useful for humans)
|
|
1091
|
+
- 📝 **`CHANGELOG.md`** - Version history and all changes
|
|
1092
|
+
- 🧪 **`tests/README.md`** - Test organization and structure
|
|
1093
|
+
- 🔧 **`scripts/README.md`** - Development scripts and tools
|
|
1094
|
+
|
|
1095
|
+
### Quick Start Navigation
|
|
1096
|
+
|
|
1097
|
+
**I'm a user, I want to...**
|
|
1098
|
+
|
|
1099
|
+
- Get started → README.md "Quick Start" section
|
|
1100
|
+
- See examples → `examples/` directory
|
|
1101
|
+
- Understand features → README.md "Features" section
|
|
1102
|
+
- Track config sources → README.md "Value Source Tracking" section
|
|
1103
|
+
|
|
1104
|
+
**I'm a contributor, I want to...**
|
|
1105
|
+
|
|
1106
|
+
- Set up development → CONTRIBUTING.md "Development Setup" section
|
|
1107
|
+
- Add a feature → CONTRIBUTING.md "Adding New Features" section
|
|
1108
|
+
- Run tests → CONTRIBUTING.md "Testing" section
|
|
1109
|
+
- Create a release → RELEASE_PROCESS.md
|
|
1110
|
+
- Check current tasks → TODO.md
|
|
1111
|
+
|
|
1112
|
+
**I'm an AI assistant, I want to...**
|
|
1113
|
+
|
|
1114
|
+
- Quick reference → `.cursorrules`
|
|
1115
|
+
- Technical details → `AI_KNOWLEDGE_BASE.md`
|
|
1116
|
+
- Code patterns → `CONTRIBUTING.md`
|
|
1117
|
+
- Test examples → `tests/features/test_source_precedence.py`
|
|
1118
|
+
|
|
1069
1119
|
## License
|
|
1070
1120
|
|
|
1071
1121
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
@@ -1022,6 +1022,56 @@ mypy wry
|
|
|
1022
1022
|
- Start a discussion for general questions
|
|
1023
1023
|
- Check existing issues/PRs before creating new ones
|
|
1024
1024
|
|
|
1025
|
+
## Documentation Index
|
|
1026
|
+
|
|
1027
|
+
wry has comprehensive documentation for different audiences:
|
|
1028
|
+
|
|
1029
|
+
### For Users
|
|
1030
|
+
|
|
1031
|
+
- 📘 **`README.md`** (this file) - Getting started, features, usage examples
|
|
1032
|
+
- 📁 **`examples/`** - Working code examples
|
|
1033
|
+
- `examples/autowrymodel_comprehensive.py` - Complete AutoWryModel features
|
|
1034
|
+
- `examples/wrymodel_comprehensive.py` - WryModel with source tracking
|
|
1035
|
+
- `examples/multimodel_comprehensive.py` - Multi-model usage
|
|
1036
|
+
|
|
1037
|
+
### For Contributors
|
|
1038
|
+
|
|
1039
|
+
- 📖 **`CONTRIBUTING.md`** - Complete contributor guide with code patterns and checklists
|
|
1040
|
+
- 🤖 **`.cursorrules`** - AI assistant quick reference (references CONTRIBUTING.md)
|
|
1041
|
+
- 🚀 **`RELEASE_PROCESS.md`** - How to create releases and manage versions
|
|
1042
|
+
- 📋 **`TODO.md`** - Current tasks, planned features, and work in progress
|
|
1043
|
+
|
|
1044
|
+
### Technical Reference
|
|
1045
|
+
|
|
1046
|
+
- 📚 **`AI_KNOWLEDGE_BASE.md`** - Complete technical reference for AI/LLMs (also useful for humans)
|
|
1047
|
+
- 📝 **`CHANGELOG.md`** - Version history and all changes
|
|
1048
|
+
- 🧪 **`tests/README.md`** - Test organization and structure
|
|
1049
|
+
- 🔧 **`scripts/README.md`** - Development scripts and tools
|
|
1050
|
+
|
|
1051
|
+
### Quick Start Navigation
|
|
1052
|
+
|
|
1053
|
+
**I'm a user, I want to...**
|
|
1054
|
+
|
|
1055
|
+
- Get started → README.md "Quick Start" section
|
|
1056
|
+
- See examples → `examples/` directory
|
|
1057
|
+
- Understand features → README.md "Features" section
|
|
1058
|
+
- Track config sources → README.md "Value Source Tracking" section
|
|
1059
|
+
|
|
1060
|
+
**I'm a contributor, I want to...**
|
|
1061
|
+
|
|
1062
|
+
- Set up development → CONTRIBUTING.md "Development Setup" section
|
|
1063
|
+
- Add a feature → CONTRIBUTING.md "Adding New Features" section
|
|
1064
|
+
- Run tests → CONTRIBUTING.md "Testing" section
|
|
1065
|
+
- Create a release → RELEASE_PROCESS.md
|
|
1066
|
+
- Check current tasks → TODO.md
|
|
1067
|
+
|
|
1068
|
+
**I'm an AI assistant, I want to...**
|
|
1069
|
+
|
|
1070
|
+
- Quick reference → `.cursorrules`
|
|
1071
|
+
- Technical details → `AI_KNOWLEDGE_BASE.md`
|
|
1072
|
+
- Code patterns → `CONTRIBUTING.md`
|
|
1073
|
+
- Test examples → `tests/features/test_source_precedence.py`
|
|
1074
|
+
|
|
1025
1075
|
## License
|
|
1026
1076
|
|
|
1027
1077
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
@@ -26,6 +26,7 @@ Follow these steps IN ORDER:
|
|
|
26
26
|
|
|
27
27
|
1. **Verify all changes are in [Unreleased]**
|
|
28
28
|
- Check that CHANGELOG.md `[Unreleased]` section has all changes since last release
|
|
29
|
+
- Check TODO.md - all planned release items should be completed
|
|
29
30
|
- Ensure all tests pass (`pytest`)
|
|
30
31
|
- Fix any linting issues
|
|
31
32
|
|
|
@@ -68,7 +69,13 @@ Follow these steps IN ORDER:
|
|
|
68
69
|
|
|
69
70
|
### After the Release
|
|
70
71
|
|
|
71
|
-
Continue development by
|
|
72
|
+
Continue development by:
|
|
73
|
+
1. Adding new changes to the (now empty) `[Unreleased]` section in CHANGELOG.md
|
|
74
|
+
2. Updating TODO.md:
|
|
75
|
+
- Archive or remove completed items from the released version
|
|
76
|
+
- Add new tasks or features planned for next release
|
|
77
|
+
- Update roadmap and priorities
|
|
78
|
+
3. Update version numbers in AI_KNOWLEDGE_BASE.md if not already done
|
|
72
79
|
|
|
73
80
|
## Example
|
|
74
81
|
|
|
@@ -483,6 +483,8 @@ class TestInheritanceEdgeCases:
|
|
|
483
483
|
assert len(ChildConfig.model_fields) == 2
|
|
484
484
|
|
|
485
485
|
|
|
486
|
+
@pytest.mark.filterwarnings("ignore:Function.*already decorated:UserWarning")
|
|
487
|
+
@pytest.mark.filterwarnings("ignore:The parameter.*is used more than once:UserWarning")
|
|
486
488
|
class TestMultiModelInheritance:
|
|
487
489
|
"""Test inheritance scenarios with multi-model commands."""
|
|
488
490
|
|
|
@@ -44,6 +44,7 @@ class CacheArgs(WryModel):
|
|
|
44
44
|
class TestSplitKwargs:
|
|
45
45
|
"""Test the split_kwargs_by_model function."""
|
|
46
46
|
|
|
47
|
+
@pytest.mark.filterwarnings("ignore:Unused kwargs:UserWarning")
|
|
47
48
|
def test_split_kwargs_basic(self):
|
|
48
49
|
"""Test basic kwarg splitting between models."""
|
|
49
50
|
kwargs = {"host": "example.com", "port": 3306, "debug": True, "workers": 8, "unknown": "ignored"}
|
|
@@ -133,6 +134,8 @@ class TestCreateModels:
|
|
|
133
134
|
create_models(ctx, kwargs, DatabaseArgs)
|
|
134
135
|
|
|
135
136
|
|
|
137
|
+
@pytest.mark.filterwarnings("ignore:Function.*already decorated:UserWarning")
|
|
138
|
+
@pytest.mark.filterwarnings("ignore:The parameter.*is used more than once:UserWarning")
|
|
136
139
|
class TestMultiModelDecorator:
|
|
137
140
|
"""Test the multi_model decorator."""
|
|
138
141
|
|
|
@@ -279,6 +282,8 @@ class TestSingletonOption:
|
|
|
279
282
|
# They should be different objects
|
|
280
283
|
assert option1 is not option2
|
|
281
284
|
|
|
285
|
+
@pytest.mark.filterwarnings("ignore:Function.*already decorated:UserWarning")
|
|
286
|
+
@pytest.mark.filterwarnings("ignore:The parameter.*is used more than once:UserWarning")
|
|
282
287
|
def test_singleton_option_in_model(self):
|
|
283
288
|
"""Test using singleton option in a model."""
|
|
284
289
|
from wry.multi_model import _SINGLETON_OPTIONS
|
|
@@ -457,6 +457,7 @@ class TestAddConfigOption:
|
|
|
457
457
|
class TestExplicitClickDecorators:
|
|
458
458
|
"""Test handling of explicit Click decorators in annotations."""
|
|
459
459
|
|
|
460
|
+
@pytest.mark.filterwarnings("ignore:The parameter.*is used more than once:UserWarning")
|
|
460
461
|
def test_explicit_option_decorator(self):
|
|
461
462
|
"""Test field with explicit click.option in annotation."""
|
|
462
463
|
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from typing import Annotated, Any
|
|
4
4
|
|
|
5
5
|
import click
|
|
6
|
+
import pytest
|
|
6
7
|
from click.testing import CliRunner
|
|
7
8
|
from pydantic import Field
|
|
8
9
|
|
|
@@ -78,6 +79,8 @@ class TestContextHandling:
|
|
|
78
79
|
assert result.exit_code == 0
|
|
79
80
|
assert "Name: direct" in result.output
|
|
80
81
|
|
|
82
|
+
@pytest.mark.filterwarnings("ignore:Function.*already decorated:UserWarning")
|
|
83
|
+
@pytest.mark.filterwarnings("ignore:The parameter.*is used more than once:UserWarning")
|
|
81
84
|
def test_multiple_decorators_requires_care(self):
|
|
82
85
|
"""Test that multiple decorators need explicit pass_context control."""
|
|
83
86
|
|