fix: normalize package names to lowercase and improve output formatting#517
Open
KushalLukhi wants to merge 1 commit intobndr:masterfrom
Open
fix: normalize package names to lowercase and improve output formatting#517KushalLukhi wants to merge 1 commit intobndr:masterfrom
KushalLukhi wants to merge 1 commit intobndr:masterfrom
Conversation
This PR addresses three related issues: **Fixes bndr#500 - Capitalization Issue:** - Package names are now normalized to lowercase in - This fixes the issue where 'Requests' was output instead of 'requests' - All package names in requirements.txt are now consistently lowercase **Fixes bndr#515 - FastAPI Resolution:** - Added 'fastapi:fastapi' mapping to ensure proper package resolution - FastAPI imports are now correctly mapped to the 'fastapi' package **Fixes bndr#504 - Malformed Requirements Output:** - Added validation for proper requirements.txt formatting - Ensures exactly one '==' separator per line - Validates no leading/trailing whitespace - Confirms package names are lowercase **Changes:** - Modified to normalize names to lowercase - Added 'fastapi:fastapi' to mapping file - Added comprehensive tests for normalization, mapping, and output format **Testing:** - All existing tests pass - New tests added for lowercase normalization - New tests added for FastAPI mapping - New tests added for output format validation
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.
This PR addresses three related issues:
Fixes #500 - Capitalization Issue:
Fixes #515 - FastAPI Resolution:
Fixes #504 - Malformed Requirements Output:
Changes:
get_pkg_names()to normalize names to lowercaseTesting:
Closes #500, #515, #504