@@ -175,19 +175,19 @@ def get_status() -> PlainTextResponse:
175175 return PlainTextResponse ("EVEREST is running" )
176176
177177
178- @router .get (f"/{ EverEndpoints .status } /{{experiment_id}}" , dependencies = authenticated )
178+ @router .get (f"/{ EverEndpoints .STATUS } /{{experiment_id}}" , dependencies = authenticated )
179179def experiment_status (
180180 experiment : Annotated [ExperimentRunnerState , Depends (_get_experiment )],
181181) -> ExperimentStatus :
182182 return experiment .status
183183
184184
185- @router .get ("/" + EverEndpoints .experiments , dependencies = authenticated )
185+ @router .get ("/" + EverEndpoints .EXPERIMENTS , dependencies = authenticated )
186186def experiments () -> JSONResponse :
187187 return JSONResponse ({"experiment_ids" : list (_experiments .keys ())})
188188
189189
190- @router .post ("/" + EverEndpoints .stop , dependencies = authenticated )
190+ @router .post ("/" + EverEndpoints .STOP , dependencies = authenticated )
191191def stop () -> Response :
192192 if not _experiments :
193193 os .kill (os .getpid (), signal .SIGTERM )
@@ -198,7 +198,7 @@ def stop() -> Response:
198198 return Response ("Raise STOP flag succeeded. EVEREST initiates shutdown.." , 200 )
199199
200200
201- @router .post ("/" + EverEndpoints .start_experiment , dependencies = authenticated )
201+ @router .post ("/" + EverEndpoints .START_EXPERIMENT , dependencies = authenticated )
202202async def start_experiment (
203203 request : Request ,
204204 background_tasks : BackgroundTasks ,
@@ -236,7 +236,7 @@ async def start_experiment(
236236
237237
238238@router .get (
239- f"/{ EverEndpoints .config_path } /{{experiment_id}}" , dependencies = authenticated
239+ f"/{ EverEndpoints .CONFIG_PATH } /{{experiment_id}}" , dependencies = authenticated
240240)
241241async def config_path (
242242 experiment : Annotated [ExperimentRunnerState , Depends (_get_experiment )],
@@ -255,7 +255,7 @@ async def config_path(
255255
256256
257257@router .get (
258- f"/{ EverEndpoints .start_time } /{{experiment_id}}" , dependencies = authenticated
258+ f"/{ EverEndpoints .START_TIME } /{{experiment_id}}" , dependencies = authenticated
259259)
260260async def start_time (
261261 experiment : Annotated [ExperimentRunnerState , Depends (_get_experiment )],
@@ -266,7 +266,7 @@ async def start_time(
266266 return Response (str (experiment .start_time_unix ), status_code = 200 )
267267
268268
269- @router .post (f"/{ EverEndpoints .runpath } " , dependencies = authenticated )
269+ @router .post (f"/{ EverEndpoints .RUNPATH } " , dependencies = authenticated )
270270async def check_runpath (
271271 paths : PathsCheckRequest ,
272272) -> Response :
@@ -292,7 +292,7 @@ async def _check_path(path: str) -> None:
292292 return Response ("Runpath does not exist" , status_code = 404 )
293293
294294
295- @router .websocket (f"/{ EverEndpoints .events } /{{experiment_id}}" )
295+ @router .websocket (f"/{ EverEndpoints .EVENTS } /{{experiment_id}}" )
296296async def websocket_endpoint (websocket : WebSocket , experiment_id : str ) -> None :
297297 await websocket .accept ()
298298 _check_authentication (websocket .headers .get ("Authorization" ))
0 commit comments