Include changelog links for major release upgrades#29
Merged
nickmoreton merged 13 commits intomainfrom Jul 11, 2025
Merged
Conversation
…major version upgrades.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
Enhance dependency reporting by classifying update types, linking major updates to changelog URLs, and renaming the “Production Dependencies” section to “Main Dependencies.”
- Renamed all “Production Dependencies” headings and references to “Main Dependencies.”
- Introduced
calculate_update_typeandrepository_urlto classify updates and fetch project URLs. - Updated HTML report rows to include clickable links and AI chat suggestions for major updates, and refined status color mapping.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/helpers.py | Added version update classification and integrated it into package_table_row. |
| src/managers/package.py | Added repository_url property to extract preferred project URLs. |
| src/reporters/html.py | Enhanced row rendering: clickable update URLs, AI chat suggestions, and extended color logic. |
| tests/test_html.py | Updated assertions to verify new row structure and status color mappings. |
| src/check_local.py | Renamed “Production Dependencies” to “Main Dependencies.” |
| src/check_remote.py | Renamed “Production Dependencies” to “Main Dependencies.” |
Comments suppressed due to low confidence (4)
src/managers/package.py:25
- Add unit tests for
repository_urlto verify correct selection fromproject_urlsacross different key orders and missing entries.
def repository_url(self):
src/check_local.py:125
- [nitpick] Update the comment to use consistent capitalization (
# Main Dependencies) to match the heading and project style.
# main dependencies
src/helpers.py:8
- [nitpick] Consider adding type hints to
calculate_update_type(e.g.,-> Optional[str]) and annotating parameters for clearer API usage and better editor support.
def calculate_update_type(current_version, latest_version):
src/helpers.py:51
- [nitpick] Indentation for this
styleassignment appears misaligned compared to surroundingelifblocks; align it with the other clauses to improve readability.
style = "yellow1"
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 pull request introduces several improvements to dependency reporting, including enhanced update type detection, better handling of repository URLs for major updates, and refined HTML output styling. Additionally, it updates tests to reflect these changes and ensures consistency in terminology across the codebase.
Dependency update handling:
src/helpers.py: Added a newcalculate_update_typefunction to determine if an update is major, minor, or a patch based on version comparison. Integrated this logic intopackage_table_rowto reflect update types in the status and adjust styling accordingly. Major updates now include repository URLs when available.src/managers/package.py: Introduced a newrepository_urlproperty to retrieve repository URLs from package metadata, prioritizing keys like "Changelog" and "Repository."HTML output improvements:
src/reporters/html.py: Enhanced_table_dependency_rowto handle statuses with newlines (e.g., repository URLs for major updates) and display clickable links. Added AI chat request suggestions for major updates. Updated_gather_status_classto use distinct colors for update types (major, minor, patch) and refined fallback styling.Terminology consistency:
src/check_local.pyandsrc/check_remote.py: Renamed "Production Dependencies" to "Main Dependencies" for clarity and consistency. [1] [2]Test updates:
tests/test_html.py: Updated tests for_table_dependency_rowto validate the new HTML structure and added detailed tests for_gather_status_classto ensure proper color mapping for different update types. [1] [2]