Skip to content

Commit

Permalink
Merge pull request #63 from camicroscope/develop
Browse files Browse the repository at this point in the history
For 3.10.2
  • Loading branch information
birm authored Jun 16, 2023
2 parents 2cf9e9a + ed46374 commit 128587f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM python:3-stretch
FROM python:3

WORKDIR /var/www
RUN apt-get update
RUN apt-get -q update --fix-missing
RUN apt-get -q install -y openslide-tools python-openslide vim
RUN apt-get -q install -y openslide-tools python3-openslide vim openssl
RUN apt-get -q install -y libvips libvips-dev

RUN pip install pyvips
Expand All @@ -12,6 +12,8 @@ RUN pip install gunicorn
RUN pip install greenlet
RUN pip install gunicorn[eventlet]

run openssl version -a

ENV FLASK_ENV development

RUN mkdir -p /images/uploading
Expand Down
14 changes: 12 additions & 2 deletions NCISlideUtil.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,16 @@ def addSpecialty(data):
for collection in collections:
# add specialty
pid = addSpecialty({'text': collection['specialty']})

# add users
users = []
for user in collection['pathologists']:
users.append({'user': user})

for sub in collection['subspecialties']:
# add specialty
cid = addSpecialty(
{'text': sub, 'pid': pid})
{'text': sub, 'pid': pid, 'users': users})
# save the token id and collection id as map
if cid is not None:
subspecialties_map[sub.lower()] = cid
Expand All @@ -163,7 +169,11 @@ def addSpecialty(data):
with open(flat_file_path, 'r', encoding='utf-8-sig') as f:
reader = csv.DictReader(f)
for row in reader:
flat_map[row['tokenid'].lower()] = row
token = row['tokenid'] or row['token_id'] or None
if token:
flat_map[row['tokenid'].lower()] = row
else:
print('no token id in flat_file')

# NCI DOE create a metadata dict END

Expand Down

0 comments on commit 128587f

Please sign in to comment.