test(skills): add Hypothesis property tests for PowerPoint modules#1046
Merged
WilliamBerryiii merged 9 commits intomainfrom Mar 19, 2026
Merged
test(skills): add Hypothesis property tests for PowerPoint modules#1046WilliamBerryiii merged 9 commits intomainfrom
WilliamBerryiii merged 9 commits intomainfrom
Conversation
Contributor
Dependency ReviewThe following issues were found:
License Issues.github/skills/experimental/powerpoint/uv.lock
OpenSSF Scorecard
Scanned Files
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1046 +/- ##
==========================================
+ Coverage 88.12% 88.13% +0.01%
==========================================
Files 45 45
Lines 7931 7932 +1
==========================================
+ Hits 6989 6991 +2
+ Misses 942 941 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
5 tasks
auyidi1
requested changes
Mar 17, 2026
auyidi1
reviewed
Mar 18, 2026
- add hypothesis>=6.100 dev dependency with CI/dev profiles - create shared strategies and 18 property tests across four modules - fix discover_images numeric sort bug found via property testing - add .hypothesis/ to root .gitignore 🧪 - Generated by Copilot
- configure [tool.coverage.run] source to scripts/ - set fail_under=85 with show_missing in [tool.coverage.report] 📊 - Generated by Copilot
- expand E501 long lines in test_build_deck.py - apply ruff format to strategies.py 🎨 - Generated by Copilot
- resolve CodeQL empty-except finding in test_fuzz_validate_slides.py 🔧 - Generated by Copilot
🔧 - Generated by Copilot
- Derive THEME_NAMES from THEME_COLOR_MAP instead of hardcoding - Strengthen color round-trip assertion to exact hex comparison - Move MSO_SHAPE and Inches imports to module level - Refactor conftest to eliminate blank_presentation duplication
- add missing copyright headers to all new test and strategy files - strengthen test_ordering_monotonic to parametrize injected severity - cap max_examples=50 on test_apply_extract_preserves_color_type - rename test_empty_returns_none to test_empty_returns_none_string 🔧 - Generated by Copilot
b4f5f1b to
3df86b1
Compare
auyidi1
approved these changes
Mar 19, 2026
- resolve GHSA-rf6f-7fwh-wjgh high-severity vulnerability in flatted parse() 🔒 - Generated by Copilot
Member
Author
npm audit fix:
|
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
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.
Description
Added Hypothesis property-based testing to the PowerPoint skill, covering four core modules with 18 property tests. A shared strategies module and CI/dev Hypothesis profiles provide the testing infrastructure. Property testing uncovered a numeric sort bug in
discover_images, which was fixed in this PR.Property-Based Tests
Eighteen property tests exercised invariants, round-trip behavior, boundary conditions, and idempotency across four production modules.
resolve_coloralways-returns-dict, contains-rgb-or-theme, hex-idempotent;hex_brightnessresult 0–255;rgb_to_hexoutput format; and color round-trip preserving color type through shape fill.IndexErrorfor out-of-bounds spans.discover_slidesoutput-sorted and only-matching-dirs invariants;get_slide_layoutalways-returns-layout for arbitrary names.discover_imagesoutput-is-sorted and all-paths-match-pattern;max_severityordering-monotonic, empty-returns-none, and result-in-valid-set.Shared Test Infrastructure
table_elementcomposite strategy restricts text to XML-safe Unicode categories.cianddevHypothesis profiles (200 vs 50 max_examples, derandomize in CI, suppressedtoo_slowhealth check), plusmake_blank_presentation()andmake_blank_slide()helper functions as plain functions for use inside@given-decorated tests.Bug Fix
slide-10beforeslide-2.Configuration
hypothesis>=6.100dev dependency andhypothesispytest marker to pyproject.toml.[tool.coverage.run]source=["scripts"] and[tool.coverage.report]fail_under=85 with show_missing.**/.hypothesis/to .gitignore for Hypothesis example database directories.Related Issue(s)
Closes #1013
Type of Change
Select all that apply:
Code & Documentation:
Infrastructure & Configuration:
AI Artifacts:
prompt-builderagent and addressed all feedback.github/instructions/*.instructions.md).github/prompts/*.prompt.md).github/agents/*.agent.md).github/skills/*/SKILL.md)Other:
.ps1,.sh,.py)Sample Prompts (for AI Artifact Contributions)
Testing
pptx_colors,pptx_tables,build_deck, andvalidate_slides.fail_underthreshold.Checklist
Required Checks
AI Artifact Contributions
/prompt-analyzeto review contributionprompt-builderreviewRequired Automated Checks
The following validation commands must pass before merging:
npm run lint:mdnpm run spell-checknpm run lint:frontmatternpm run validate:skillsnpm run lint:md-linksnpm run lint:psnpm run plugin:generateSecurity Considerations
Additional Notes
hypothesispackage (6.151.9) is a well-established property-based testing library with no known security vulnerabilities. Its only transitive dependency issortedcontainers.CIenvironment variable, with theciprofile using derandomized inputs and no persistent database.discover_imagesbug fix addressed a numeric vs. lexicographic sort issue that would have caused incorrect slide ordering for decks with 10+ slides.