-
Notifications
You must be signed in to change notification settings - Fork 10
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
Added heuristics about which file to update in DependencyManager #180
Conversation
andrecsilva
commented
Dec 14, 2023
- Also added a report listing if dependencies were added successfully or not.
- Added some robustness to RequirementsTxtWriter (this is mostly a band-aid and needs proper, more general, handling).
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #180 +/- ##
==========================================
- Coverage 96.42% 96.19% -0.24%
==========================================
Files 79 79
Lines 3723 3754 +31
==========================================
+ Hits 3590 3611 +21
- Misses 133 143 +10
|
47c3b21
to
eed2df9
Compare
2a0b54c
to
903d120
Compare
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.
Apologies for the delayed review. It looks good overall but I think we might need some more tests to enumerate a few more cases.
from integration_tests.base_test import SAMPLES_DIR, CleanRepoMixin | ||
|
||
|
||
class TestDependencyManager(CleanRepoMixin): |
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.
Shouldn't we have test cases here for updating pyproject.toml
and setup.py
as well? In those cases we could just add some simple content to those temporary files within individual test cases.
for package_store in store_list: | ||
dm = DependencyManager(package_store, self.directory) | ||
if (changeset := dm.write(list(dependencies), self.dry_run)) is not None: | ||
self.add_results(codemod_id, [changeset]) |
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.
Maybe a debug log here saying which file is being written?
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.
This information is being store in the record
variable. The debug message with the file the dependency has been written in is in the new record_dependency_update
function at codemodder.py
- Also added a report listing if dependencies were added successfully or not.
4d8d6f6
to
5cabfb1
Compare
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 2 New issues |