-
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 yaml result saving with relative paths #1199
Conversation
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 1.88%.
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% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1199 +/- ##
=====================================
Coverage 87.7% 87.7%
=====================================
Files 104 104
Lines 4954 4968 +14
Branches 823 824 +1
=====================================
+ Hits 4345 4359 +14
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. |
febe078
to
3d0dec5
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 fixes a bug when saving a result as yaml using a relative path, which added wrong file paths and broke loading the result.
We didn't discover this bug since all the examples use absolute paths.
To reproduce the issue use the following code snipped (e.g. in a notebook)
This generates the following files:
On main the paths pointing to other files used
result.yaml
andscheme.yml
use a relative path to the current dir instead of relative toresult.yaml
.result.yaml
scheme.yml
With this change, the paths are relative to the parent folder of
result.yaml
.result.yaml
scheme.yml
Change summary
Checklist