Skip to content

Commit

Permalink
refactor package to use concentrated_lps package from bleu fork
Browse files Browse the repository at this point in the history
  • Loading branch information
ribeirojose committed Jul 27, 2023
1 parent 2760c9d commit dafef9d
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 790 deletions.
29 changes: 24 additions & 5 deletions apps/gyro-eclp-api/gyro_eclp_api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
import uvicorn
from concentrated_lps import geclp
from fastapi import FastAPI

from gyro_eclp_api.src.models import ParamsModel, DerivedParamsModel
from gyro_eclp_api.src.eclp_prec_implementation import calc_derived_values
from pydantic import BaseModel

app = FastAPI()


@app.post("/calculate_derivative_parameters/")
class ParamsModel(BaseModel):
alpha: str
beta: str
l: str
c: str
s: str


class DerivedParamsModel(BaseModel):
tauAlphaX: str
tauAlphaY: str
tauBetaX: str
tauBetaY: str
u: str
v: str
w: str
z: str
dSq: str


@app.post("/calculate_derivative_parameters")
async def calculate_derivative_parameters(params: ParamsModel):
derivativeParams = calc_derived_values(params)
derivativeParams = geclp.calc_derived_values(params) # type: ignore
return DerivedParamsModel(
tauAlphaX=str(derivativeParams.tauAlpha[0]),
tauAlphaY=str(derivativeParams.tauAlpha[1]),
Expand Down
Empty file.
79 changes: 0 additions & 79 deletions apps/gyro-eclp-api/gyro_eclp_api/src/eclp_prec_implementation.py

This file was deleted.

22 changes: 0 additions & 22 deletions apps/gyro-eclp-api/gyro_eclp_api/src/models.py

This file was deleted.

244 changes: 0 additions & 244 deletions apps/gyro-eclp-api/gyro_eclp_api/src/quantized_decimal.py

This file was deleted.

Loading

0 comments on commit dafef9d

Please sign in to comment.