pecan
pecan copied to clipboard
[Bug fix] : Fixed `gsub` issue in `write.config.SIPNET`
Description
Fixed issues with local deployment for SIPNET model.
The variables cpruncmd and cpoutcmd were added to write.config.SIPNET to extend it for cloud based PEcAn deployment. On a local deployment setup the workflow for SIPNET model was breaking with the below error :
Error in gsub("@CPRUNCMD@", cpruncmd, jobsh) :
invalid 'replacement' argument
Calls: <Anonymous> ... <Anonymous> -> do.call -> write.config.SIPNET -> gsub
> proc.time()
user system elapsed
7.132 3.362 7.877
The error arises since local pecan.xml does not contain settings$host$rabbitmq$cpfcmd and settings$host$rabbitmq$cpfcmd which is used to set cpruncmd and cpoutcmd in the write.config.SIPNET file.
Review Time Estimate
- [ ] Immediately
- [ ] Within one week
- [X] When possible
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [X] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [ ] My change requires a change to the documentation.
- [ ] My name is in the list of CITATION.cff
- [ ] I have updated the CHANGELOG.md.
- [ ] I have updated the documentation accordingly.
- [X] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
- [X] All new and existing tests passed.