-
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 Project.import_data
path resolving for different script and cwd
#1214
🩹 Fix Project.import_data
path resolving for different script and cwd
#1214
Conversation
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.79%.
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! |
f2b27bd
to
34d9075
Compare
Project.import_data
path resolving for different scirpt and cwdProject.import_data
path resolving for different script and cwd
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.8% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1214 +/- ##
=======================================
+ Coverage 87.7% 87.8% +0.1%
=======================================
Files 104 104
Lines 4961 4967 +6
Branches 824 826 +2
=======================================
+ Hits 4352 4364 +12
+ Misses 492 487 -5
+ Partials 117 116 -1
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. |
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. Tested ok.
f79a1e7
to
08acbe8
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This fixes a bug in
Project.import_data
causing aValueError
when using a relative path and the directory of the script is not the current working directory.This is the case in editors when the script is not at the folder root or when calling it from python (e.g.
python myproject/script1.py
)In addition, I improved the saving functionality of the plugin system to create parent folders for files.
Before that trying to save a file to a location with a nonexisting parent folder caused a massive traceback from the undelaying writer implementation.
Example traceback
Change summary
Checklist