Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update gdi-userportal reference #60

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ckan/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ FROM ckan/ckan-base:2.10.4
# Install any extensions needed by your CKAN instance
# See Dockerfile.dev for more details and examples

RUN pip3 install -e git+https://github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-gdi-userportal.git@v1.1.2#egg=ckanext-gdi-userportal && \
RUN pip3 install -e git+https://github.com/GenomicDataInfrastructure/gdi-userportal-ckanext-gdi-userportal.git@v1.2.0#egg=ckanext-gdi-userportal && \
pip3 install -r ${APP_DIR}/src/ckanext-gdi-userportal/requirements.txt

RUN pip3 install -e git+https://github.com/ckan/[email protected]#egg=ckanext-dcat && \
Expand Down Expand Up @@ -58,7 +58,7 @@ ENV CKAN__PLUGINS="envvars image_view text_view recline_view scheming_datasets s
COPY --chown=ckan:ckan setup/prerun.py ${APP_DIR}

# TODO
# 1. Remove this comand once the issue is fixed
# 1. Remove this command once the issue is fixed
# https://github.com/ckan/ckan-docker-base/issues/41
RUN mkdir /var/lib/ckan/storage
RUN mkdir /var/lib/ckan/storage/uploads
Expand Down
9 changes: 8 additions & 1 deletion ckan/docker-entrypoint.d/common_vocabulary_tags.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1073,4 +1073,11 @@ http://purl.org/zonmw/covid19/10006,regional,en
http://purl.org/zonmw/generic/10006,other,en
https://ncit.nci.nih.gov/ncitbrowser/ConceptReport.jsp?dictionary=NCI_Thesaurus&code=C9245,Invasive Breast Carcinoma,en
https://ncim.nci.nih.gov/ncimbrowser/ConceptReport.jsp?code=C0853879,Invasive Breast Carcinoma,en
http://purl.bioontology.org/ontology/ICD10CM/J96.2,Acute and chronic respiratory failure,en
http://purl.bioontology.org/ontology/ICD10CM/J96.2,Acute and chronic respiratory failure,en
access_rights,Access Rights,en
organization,Catalogues,en
publisher_name,Publishers,en
res_format,File Formats,en
spatial,Spatial Coverage,en
tags,Keywords,en
theme,Themes,en
7 changes: 6 additions & 1 deletion ckan/docker-entrypoint.d/upload_vocabulary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ psql postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432/$CKAN_DB
EXISTS(SELECT 1 FROM public.term_translation) as table_not_empty
\gset
\if :table_not_empty
\echo 'term_translation table is not empty, skipping'
\echo 'term_translation table is not empty, updating'
create table public.temp (term text, term_translation text, lang_code text);
\copy public.temp FROM '/docker-entrypoint.d/common_vocabulary_tags.csv' WITH (DELIMITER ',', FORMAT CSV, HEADER TRUE);
delete from public.term_translation using public.temp where public.term_translation.term = public.temp.term and public.term_translation.term_translation = public.temp.term_translation and public.term_translation.lang_code = public.temp.lang_code;
insert into public.term_translation (term, term_translation, lang_code) select term, term_translation, lang_code from public.temp;
drop table public.temp;
\else
\copy public.term_translation FROM '/docker-entrypoint.d/common_vocabulary_tags.csv' WITH (DELIMITER ',', FORMAT CSV, HEADER TRUE);
\echo 'term_translation initialized with common_vocabulary_tags.csv'
Expand Down
2 changes: 1 addition & 1 deletion src/ckanext-gdi-userportal