Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
mock-up ... more of it
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronkaplan committed May 12, 2021
1 parent 2345f17 commit bce8167
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import sys
import shutil
import time
import random
from pathlib import Path
from tempfile import SpooledTemporaryFile
from typing import List
Expand Down Expand Up @@ -897,9 +898,16 @@ def enrich_df(df: pd.DataFrame) -> pd.DataFrame:
def postprocess(_list: list) -> list:
# df.loc[:,'errors'] = 0
# df.loc[:,'needs_human_intervention'] = True
return [ el.update({'is_vip': False,
'credential_type': ['External', 'EU Login']
}) for el in _list]
attention = random.random() > 0.5
notify = not attention
for item in _list:
item.update({'is_vip': False,
"credential_type": ["EU Login", "External"],
"report_to": "Benoit.Roussille@ec.europa.eu",
"needs_human_attention": attention,
"notify": notify
})
return _list
# print("type(d) = %s, d= %r" %(type(d), d))
# if 'is_vip' not in d:
# d['is_vip'] = False
Expand Down

0 comments on commit bce8167

Please sign in to comment.