-
Notifications
You must be signed in to change notification settings - Fork 255
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
wip: poc pep 735 #823
Draft
finswimmer
wants to merge
1
commit into
python-poetry:main
Choose a base branch
from
finswimmer:poc-pep-735
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
wip: poc pep 735 #823
Conversation
This file contains 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
Reviewer's Guide by SourceryThis pull request refactors the package configuration to support dependency groups by introducing a new 'dependency_groups' parameter. It updates the logic to handle these groups and adds a test case along with a sample project fixture to verify the new functionality. Sequence diagram for dependency group configurationsequenceDiagram
participant F as Factory
participant P as ProjectPackage
participant DG as DependencyGroup
participant D as Dependency
F->>P: configure_package()
F->>F: _configure_package_dependencies()
alt Has dependency_groups
loop For each group
F->>DG: create(group_name)
F->>P: add_dependency_group(group)
loop For each dependency in group
F->>D: create_from_pep_508(constraint)
F->>DG: add_dependency(dep)
end
end
end
alt Has tool_poetry groups
loop For each group
F->>DG: create(group_name, optional)
F->>F: _add_package_group_dependencies()
end
end
Class diagram showing updated Factory class with dependency groups supportclassDiagram
class Factory {
+configure_package(package, pyproject, root, with_groups)
-_configure_package_dependencies(package, project, tool_poetry, dependency_groups, with_groups)
-_add_package_group_dependencies(package, group, dependencies)
}
class DependencyGroup {
+name: string
+optional: boolean
+add_dependency(dependency)
}
class ProjectPackage {
+root_dir: string
+add_dependency_group(group)
}
class Dependency {
+_groups: frozenset
+create_from_pep_508(constraint, relative_to)
}
Factory ..> DependencyGroup: creates
Factory ..> Dependency: creates
ProjectPackage o-- DependencyGroup: contains
DependencyGroup o-- Dependency: contains
note for Factory "Updated to support PEP 735
dependency groups"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
finswimmer
force-pushed
the
poc-pep-735
branch
5 times, most recently
from
January 23, 2025 09:51
749e5f2
to
83710eb
Compare
finswimmer
force-pushed
the
poc-pep-735
branch
from
January 23, 2025 16:59
83710eb
to
6473ff4
Compare
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.
Resolves: python-poetry#
Summary by Sourcery
Add support for dependency groups in the package configuration to enhance dependency management flexibility. Update the factory configuration to handle dependency groups and introduce a new test case to ensure proper functionality.
New Features:
Tests: