Open ar-siddiqui opened 4 hours ago
Please confirm requested intended behavior. From the API Interface, Schema, and Data Models document:
"Notes: What would happen if crete_fim_lib or create_rating_curves_db gets wrong plan suffix i. Doesn’t exist > we should return some error II user error > process normally"
My apologies if I misunderstand this but please confirm what is expected before we revert changes.
I think I interpreted "return some error" to mean "raise an error". Thinking through the logic of it now I think we want to simply log an error so that the endpoint continues with any subsequent plans that might exist.
I agree the Notes from the API Interface, Schema, and Data Models
were not clear. I think I forgot how it used to work and added these notes.
We should keep it like it was before. Some of the reaches will not get the KWSW plan because of being outlet reaches. Hence if we error them out, we will be blocked. We should simply log the error and move ahead.
Version: 0.7.0-rc Step:
create_fim_lib
The behavior of this endpoint has changed from 0.6.3 to 0.7.0. Those plans that are not available were silently skipped before but are now an Exception is raised. Plans that are not available should be skipped with a log message.
{ "errors": "Traceback (most recent call last):\n File \"D:\Users\abdul.siddiqui\venvs\ripple1d_0_7_0-rc\Lib\site-packages\ripple1d\ops/endpoints.py\", line 62, in \u003Cmodule\u003E\n r = execute_endpoint(sys.argv[1], sys.argv[2])\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"D:\Users\abdul.siddiqui\venvs\ripple1d_0_7_0-rc\Lib\site-packages\ripple1d\ops/endpoints.py\", line 41, in execute_endpoint\n return func_lookupfunc\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"D:\Users\abdul.siddiqui\venvs\ripple1d_0_7_0-rc\Lib\site-packages\ripple1d\ops\fim_lib.py\", line 253, in create_fim_lib\n missing_grids[plan] = find_missing_grids(rm, f\"{nwm_rm.modelname}{plan}\")\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"D:\Users\abdul.siddiqui\venvs\ripple1d_0_7_0-rc\Lib\site-packages\ripple1d\ops\fim_lib.py\", line 179, in find_missing_grids\n raise PlanNameNotFoundError(f\"Plan {plan_name} not found in the model\")\nripple1d.errors.PlanNameNotFoundError: Plan 2821866_kwse not found in the model\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File \"D:\Users\abdul.siddiqui\venvs\ripple1d_0_7_0-rc\Lib\site-packages\ripple1d\ops/endpoints.py\", line 65, in \u003Cmodule\u003E\n raise SystemError(f\"Exception occurred: {e}\")\nSystemError: Exception occurred: Plan 2821866_kwse not found in the model\n", "logs": [ { "level": "INFO", "msg": "create_fim_lib starting", "time": "2024-11-05 06:37:24,224" }, { "level": "ERROR", "msg": "Plan 2821866_kwse not found in the model, skipping...", "time": "2024-11-05 06:37:24,249" } ] }