pyscalfile is added to prepend_root_path_to_relative_files() for inte…#475
pyscalfile is added to prepend_root_path_to_relative_files() for inte…#475asnyv merged 5 commits intoequinor:masterfrom
Conversation
…rp_relperm. See issue 473
|
Can one of the admins verify this patch? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #475 +/- ##
==========================================
- Coverage 87.74% 87.57% -0.18%
==========================================
Files 49 49
Lines 6995 7024 +29
==========================================
+ Hits 6138 6151 +13
- Misses 857 873 +16 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @bkhegstad, I think this looks good. The only issue I see is that there is a slight risk that someone might have based their workflow on the inconsistency, so that results may be affected? But the probability is likely so low that we could consider to take that risk. The scenarios I think of are as follows (all of them assuming that the root_path option is set and a relative path is defined for pyscalfile):
So it could technically be a breaking change for some (without them noticing), meaning that we have to think twice before we merge. @berland any thoughts? |
|
shooting almost from the hip: probably ok! |
|
If I understand the script correctly:
So as far as I can see - the only way it can go wrong is someone using pyscalfile AND is using --root-path which has no effect today and is wrong. Then suddenly --root-path will work and will have an effect. This is not likely - and will most likely give an error. @asnyv, @berland |
|
ah, yes that seems likely to be the case @bkhegstad, think you have studied the code deeper that I have 😉 But in that case we are probably quite safe 😊 |
|
These things usually becomes clear if one writes tests to solidify the current behaviour, including the wrong usage patterns. Experience tells that more related bugs will pop up if these tests are made. |
|
I can add a simple test making sure that both pyscalfile and base/low/high cannot be defined in the same model-file @asnyv |
|
Can we merge this PR into master? It is problematic to use absolute file paths in these files since all user copies are pointing to the master project. This is obviously not the behaviour we want. @berland @bkhegstad @asnyv |
|
@lindjoha as long as we fix what crashes the CI (looks like just some import sorting), I'm ok with merging :) |
See issue 473. I did not get any response - so here is a suggestion for updates.