Part of #2106
With the JIT code conversion gone in v4-dev of Parcels, there are some warnings that were implemented in codegenerator.py regarding correctness:
That aren't implemented anymore. AFAIK (please confirm @erikvansebille) these warnings only came up during JIT mode, and never during Scipy mode.
Additionally, with the kernel syntax changes we can expect to land in v4 (see parent issue), having warnings in the following format would be helpful:
`particle.delete()` is no longer valid syntax in Parcels kernels - it looks like you're using a kernel written for parcels<4 . HINT: Use `particle.status = StatusCode.Delete` instead. See our migration guide at https://docs.oceanparcels.org/... for more info.
This would also allow us to identify kernels that are written for older versions of Parcels (not just for v3->v4, but also for older versions if we want), and giving users helpful error messages with instructions for upgrading their kernels.
Suggestion:
- Before compiling kernels with numba, we have a kernel linting step.
- This will inspect the source code and:
- Error out informatively if the kernel is incompatible with the new version of Parcels
- Provide a warning if correctness is a concern
- Importantly, the users code will not be altered under the hood.
Part of #2106
With the JIT code conversion gone in v4-dev of Parcels, there are some warnings that were implemented in
codegenerator.pyregarding correctness:That aren't implemented anymore. AFAIK (please confirm @erikvansebille) these warnings only came up during JIT mode, and never during Scipy mode.
Additionally, with the kernel syntax changes we can expect to land in v4 (see parent issue), having warnings in the following format would be helpful:
`particle.delete()` is no longer valid syntax in Parcels kernels - it looks like you're using a kernel written for parcels<4 . HINT: Use `particle.status = StatusCode.Delete` instead. See our migration guide at https://docs.oceanparcels.org/... for more info.This would also allow us to identify kernels that are written for older versions of Parcels (not just for v3->v4, but also for older versions if we want), and giving users helpful error messages with instructions for upgrading their kernels.
Suggestion: