-
Notifications
You must be signed in to change notification settings - Fork 18
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
🩹 Fix wrong file loading due to partial filename matching in Project #1212
🩹 Fix wrong file loading due to partial filename matching in Project #1212
Conversation
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 1.01%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Benchmark is done. Checkout the benchmark result page. Benchmark diff v0.6.0 vs. mainParametrized benchmark signatures: BenchmarkOptimize.time_optimize(index_dependent, grouped, weight)
Benchmark diff main vs. PRParametrized benchmark signatures: BenchmarkOptimize.time_optimize(index_dependent, grouped, weight)
|
Codecov ReportBase: 87.7% // Head: 87.7% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #1212 +/- ##
=====================================
Coverage 87.7% 87.7%
=====================================
Files 104 104
Lines 4968 4968
Branches 824 824
=====================================
Hits 4359 4359
Misses 492 492
Partials 117 117 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
(Note: The "bad" were added to the markdown repr string since it should show all files)
🧹 Removed code duplication in favor of single code path
3328b3b
to
3c26f36
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
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.
LGTM!
This PR fixes an issue with using project due to partial matching of file names where the wrong file was loaded if it started with the same string as the intended file, but is higher in the string sorting order.
E.g. if you had 2 files
model.yml
andmodel-target.yml
in your projectsmodels
folder and would callproject.load_model("model")
it would loadmodel-target.yml
.In addition, some code duplications were removed and error messages for missing files were improved.
Change summary
(Note: The "bad" files were added to the markdown repr string since it should show all files)
Checklist