-
Notifications
You must be signed in to change notification settings - Fork 20
Updating main branch #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
#62) * Add UNSPECIFIED gender option and enhance random profile generation logic * Update pull request template to improve clarity and enforce issue tracking * Remove unnecessary header from pull request template * Fix formatting issues in RandomProfile class and update docstrings for clarity * Update pull request template to improve section headings for clarity * Refactor pull request template to enhance section headings for clarity
* Bump version to 3.0.6 and update changelog with minor release details * Refactor profile generation to use dataclass for improved structure and readability; update tests to reflect changes in return types * Update changelog for version 3.0.6 with recent changes and improvements
Signed-off-by: Deepak Raj <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request updates versioning and test expectations while refactoring the RandomProfile generator to use a dataclass and return lists instead of single values. Key changes include updating the tests to assert list types for various profile fields, a refactor of profile generation in main.py with improved structuring via a dataclass, and miscellaneous configuration and documentation updates.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tests/test_cases.py | Updated tests to assert list return types for various profile methods. |
setup.py, random_profile/about.py, docs/conf.py | Version bump from 3.0.2 to 3.0.6. |
random_profile/utils.py | Minor change in generate_dob_age and update to generate_random_height_weight logic. |
random_profile/main.py | Refactored profile generation to use a dataclass (Profile) and updated several APIs. |
random_profile/enums/gender.py | Added UNSPECIFIED enum value. |
random_profile/assets/job_titles.txt | Appended new job title entries. |
CHANGELOG.md, .readthedocs.yaml, .github/PULL_REQUEST_TEMPLATE.md | Updated documentation and configuration to reflect new release. |
Comments suppressed due to low confidence (1)
random_profile/main.py:112
- The current iter and next implementations yield the entire list of profiles on every call, which does not conform to the standard iterator protocol. Consider returning an iterator over individual profiles or removing these methods if iteration is not required.
def __iter__(self):
else: | ||
weight = random.randint(100, 120) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The else branch in generate_random_height_weight appears unreachable since height is generated between 140 and 200. Consider removing or revising this branch to handle cases outside the current range if needed.
else: | |
weight = random.randint(100, 120) |
Copilot uses AI. Check for mistakes.
Updating main branch