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

Dev #16

Merged
merged 20 commits into from
Oct 9, 2024
Merged

Dev #16

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
30 changes: 30 additions & 0 deletions .github/workflows/unittest-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Unittest Dev

on:
pull_request:
branches: [ "dev" ]
push:
branches: [ "dev" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with unittest
run: |
python -m unittest discover ./scripts/unittests/utilities
28 changes: 28 additions & 0 deletions .github/workflows/unittest-main-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Unittest Main Pull Request

on:
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with unittest
run: |
python -m unittest discover ./scripts/unittests/utilities
28 changes: 28 additions & 0 deletions .github/workflows/unittest-main-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Unittest Main Push

on:
push:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Test with unittest
run: |
python -m unittest discover ./scripts/unittests/utilities
15 changes: 9 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,19 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y apt-utils vim curl wget unzip git python3 python3-pip tree htop

# install required python packages
COPY requirements.txt /tmp/
RUN pip3 install -r /tmp/requirements.txt

# set up home environment
RUN useradd ${user}
RUN mkdir -p /home/${user} && chown -R ${user}: /home/${user}

# clone git repo
RUN git clone https://github.com/oislen/IrishClimateDashboard.git /home/ubuntu/IrishClimateDashboard

WORKDIR /home/${user}/IrishClimateDashboard/scripts
CMD ["bokeh", "serve","bokeh_dash_app.py"]
# install required python packages
COPY requirements.txt /tmp/
RUN apt-get install -y python3 python3-venv python3-pip
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
RUN /opt/venv/bin/python3 -m pip install -r /tmp/requirements.txt

WORKDIR /home/${user}/IrishClimateDashboard
CMD ["bokeh", "serve","scripts/bokeh_dash_app.py"]
7 changes: 7 additions & 0 deletions aws/refresh_credentials.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:: user settings
set user_dir=E:\GitHub\IrishClimateDashboard\.creds
set ubuntu_dir=/home/config
set session_fname=sessionToken.json

:: generate session token
call aws sts get-session-token > %user_dir%\%session_fname%
2 changes: 1 addition & 1 deletion conda/irishclimatedashboard.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
:: create and activate new environment
call conda deactivate
call conda env remove --name irishclimatedashboard
call conda create --name irishclimatedashboard python --yes
call conda create --name irishclimatedashboard python=3 --yes
call conda activate irishclimatedashboard

:: update conda version
Expand Down
2 changes: 1 addition & 1 deletion conda/irishclimatedashboard.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# create and activate new environment
conda deactivate
conda env remove --name irishclimatedashboard
conda create --name irishclimatedashboard python --yes
conda create --name irishclimatedashboard python=3 --yes
conda activate irishclimatedashboard

# update conda version
Expand Down
Loading
Loading