Skip to content

Commit

Permalink
Merge pull request #36 from ScilifelabDataCentre/FREYA-894/Abdullah
Browse files Browse the repository at this point in the history
Freya 894/abdullah | dc-dynamics refactoring
  • Loading branch information
senthil10 authored Oct 18, 2024
2 parents 599a496 + 512122a commit b453ab7
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 107 deletions.
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ WORKDIR /code
RUN git clone https://github.com/ScilifelabDataCentre/pathogens-portal-visualisations.git && \
git clone https://github.com/ScilifelabDataCentre/pathogens-portal-scripts.git

COPY *.sh *.py requirements.txt /code/

# Install Python dependencies from the current directory and both repositories
COPY requirements.txt /code/
RUN pip install -r requirements.txt && \
mkdir output
pip install -r pathogens-portal-visualisations/requirements.txt && \
pip install -r pathogens-portal-scripts/requirements.txt

# Copy other necessary files to the /code directory
COPY *.sh *.py /code/

CMD ["/code/all.sh"]
# Create an output directory if needed
RUN mkdir /code/output
5 changes: 0 additions & 5 deletions all.sh

This file was deleted.

4 changes: 1 addition & 3 deletions runner_daily.sh → freya_runner_daily.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
export CODE_PATH=/code

# Feed SciLifeLab figshare data to Slack
python "$CODE_PATH"/slack_figshare.py

# Update EBI index file
PYTHONPATH="$CODE_PATH"/pathogens-portal-scripts/EBI_indexing python "$CODE_PATH"/pathogens-portal-scripts/EBI_indexing/update_index_json.py

File renamed without changes.
4 changes: 2 additions & 2 deletions runner_weekly.sh → freya_runner_weekly.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
export CODE_PATH=/code

# Wordclouds generator
PYTHONPATH="$CODE_PATH"/pathogens-portal-visualisations/Wordcloud python "$CODE_PATH"/gen_clouds.py
PYTHONPATH="$CODE_PATH"/pathogens-portal-visualisations/Wordcloud python "$CODE_PATH"/pathogens-portal-visualisations/Wordcloud/livewordcloud.py

# Publication related updates
PYTHONPATH="$CODE_PATH"/pathogens-portal-visualisations/Count_publications python "$CODE_PATH"/pathogens-portal-visualisations/Count_publications/count_publications.py > "$CODE_PATH"/output/COVID_publication_count.json
python "$CODE_PATH"/gen_recent_pub.py > "$CODE_PATH"/output/covid-portal-recent10.json
PYTHONPATH="$CODE_PATH"/pathogens-portal-visualisations/Count_publications python "$CODE_PATH"/pathogens-portal-visualisations/Count_publications/gen_recent_pub.py > "$CODE_PATH"/output/covid-portal-recent10.json


# Upload generated files
Expand Down
50 changes: 0 additions & 50 deletions gen_clouds.py

This file was deleted.

33 changes: 0 additions & 33 deletions gen_recent_pub.py

This file was deleted.

11 changes: 1 addition & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# DC-DYNAMIC DEPENDENCIES
beautifulsoup4==4.11.1
requests==2.32.3
lxml==4.9.1

# VISUALISATIONS DEPENDENCIES
matplotlib==3.9.1.post1
numpy==2.0.1
openpyxl==3.1.5
pandas==2.2.2
pillow==10.4.0
plotly==5.23.0
wordcloud==1.9.3
lxml==4.9.1
4 changes: 4 additions & 0 deletions slack_runner_daily.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export CODE_PATH=/code

# Feed SciLifeLab figshare data to Slack
python "$CODE_PATH"/slack_figshare.py
File renamed without changes.

0 comments on commit b453ab7

Please sign in to comment.