Conversation
This commit fixes two critical issues: 1. Platform-Specific Dependencies: Platform markers (e.g., sys_platform) are now preserved in the serialized output instead of being stripped. This prevents pip conflict errors when multiple platform-specific versions of the same package exist (e.g., numpy==2.1.1 for Linux/macOS and numpy==1.26.4 for Windows). 2. Optional Dependencies: Added --optional-extras argument to include packages from [project.optional-dependencies] in type checking. This is essential for projects that unconditionally import packages defined as optional extras. Changes: - Add packaging>=24.0 dependency for PEP 508 requirement parsing - Add marker property to Package abstract class and implementations - Create parse_requirement_with_marker() function using packaging.requirements - Update Package.__hash__() and __eq__() to include marker - Add parse_optional_dependencies() to parse specified extras - Add get_extra_index_urls() to auto-detect extra index URLs from uv config - Update parse_pyproject_toml() to accept optional_extras parameter - Add --optional-extras CLI argument to main() - Update all package creation functions to accept marker parameter - Add comprehensive tests for marker preservation and optional deps - Update README with usage examples Breaking Changes: None (backward compatible) Version Bump: 0.1.0 -> 0.2.0 (minor)
… and exclude `.venv`
…d and modularized test cases
…d type checks for package instances
briemla
approved these changes
Feb 16, 2026
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.
OP#9364
This commit fixes two critical issues:
Platform-Specific Dependencies: Platform markers (e.g., sys_platform) are now preserved in the serialized output instead of being stripped. This prevents pip conflict errors when multiple platform-specific versions of the same package exist (e.g., numpy==2.1.1 for Linux/macOS and numpy==1.26.4 for Windows).
Optional Dependencies: Added --optional-extras argument to include packages from [project.optional-dependencies] in type checking. This is essential for projects that unconditionally import packages defined as optional extras.
Changes:
Breaking Changes: None (backward compatible)
Version Bump: 0.1.0 -> 0.2.0 (minor)