feat: save dependencies metadata#427
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds support for parsing and saving project dependencies from pyproject.toml into the package’s operate.json.
- Implements
parse_dependency_stringandextract_dependencies_from_tomlto handle PEP 508 specs. - Updates
read_toml_project,generate_operate_file, andpack_fnto include dependencies metadata. - Adds
test_dependencies_version_formatsintest_pack.pyto verify a wide range of version formats.
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tests/cli/test_pack.py | Added test_dependencies_version_formats to validate parsing and inclusion of dependency metadata. |
| src/uipath/_cli/cli_pack.py | Introduced regex-based parsing functions, integrated dependency extraction, and wired metadata into operate.json. Removed unused version helper. |
Comments suppressed due to low confidence (3)
src/uipath/_cli/cli_pack.py:447
- The branch for non-string dependency entries isn’t covered in tests. Consider adding a case with a non-string dependency to verify the warning path.
console.warning(f"Skipping non-string dependency: {dep}")
src/uipath/_cli/cli_pack.py:474
- After logging this error, the function continues and will reference an undefined
content. Consider returning or re-raising here to avoid runtime errors.
console.error(f"Failed to read or parse pyproject.toml: {e}")
src/uipath/_cli/cli_pack.py:442
- [nitpick] Ensure that
consoleis imported or otherwise available, or switch toclick.echoor a module-level logger to avoid a NameError at runtime.
console.warning("dependencies should be a list in pyproject.toml")
radu-mocanu
approved these changes
Jul 2, 2025
StefanPopaUi
approved these changes
Jul 9, 2025
ba32b64 to
78674df
Compare
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.
Summary
Adds support for parsing and saving project dependencies from
pyproject.tomlinto the package’soperate.json.Development Package