bcgov / bcgov/wps

CFFDRS API : Skeleton/POC API

Open
#1,959 0 comments 0 reactions 0 assignees View on GitHub
4Refinement Task
Dominant language
Python
Stars
65
Forks
11
Avg merge
1d 2h
Merged PRs (30d)
70

Description

**Describe the task**
Create a skeleton / proof of concept API.

**Acceptance Criteria**
- [ ] A single CFFDRS R function (.SFCcalc) exposed as REST endpoints on CFFDRS API
- [ ] CFFDRS API endpoints to take vector inputs NOT scalar
- [ ] 1:1 mappings (e.g. .ISIcalc <- function(ffmc, ws, fbpMod=FALSE) should be POST /cffdrs/isicalc/ with input in the form of json data structure) for ONLY functions we use. (see additional context re. private functions)
- [ ] CFFDRS API can run and be demonstrated on developer computer.
- [ ] Sufficient setup instructions in README

**Blocked by**
- [ ] https://github.com/bcgov/wps/issues/2275

**Additional context**
- Spinning up R is very slow, and blocking, it blocks other calls to the same thread in causing timeouts in calls entirely unrelated to anything that uses R. We need to isolate all R related issues in it's own process.
- We're very intentionally implementing .ISIcalc first. It's called repeatedly from get_critical_hours, and should expose performance issues re. using a web service early on.
- We're not going to bother with any unit tests at this stage - we need to establish if the solution is viable 1st.
- Ideally use Python implementation in CFF API instead of R package
- Blocked by #2275

Contributor guide

Open the contributing guide

Research direction

Begin with blocked issue #2275, then trace the .ISIcalc entry point and its repeated use from get_critical_hours. Define the process-isolated REST proof of concept with vector JSON inputs, demonstrate it locally, and document setup in README; completion is the .ISIcalc mapping working and demonstrable.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python, r
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.