Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As discussed in #182, grizli attempts to write to a CRDS file, which can cause issues on systems with shared CRDS files that are write protected. The proposed solution was to copy over the file to the local CONF.
However this does not work due to a big where the entire file path is
.lower()
ed, rather than just the filename (and so only works on case-insensitive filesystems). I fix the issue by only.lower()
ing the filename, not the entire path (a470bff).To solve the original issue I perform a check to see if the CRDS file is writeable. If not, the CRDS file if copied to the local CONF directory and the changes are applied there (perhaps this should be the default behaviour). Any subsequent processing can then use the writeable version that is created (6d45ab6).
Finally, in the case where the original CRDS file is updated, we must check if the local CONF version is up to date. If out of date, we redo the copying step (97ff0fc and f49f6ee).
These fixes were developed after working through this with @lboogaard with input from @rameyer and @jdavies-st.