Skip to content

Commit

Permalink
Merge pull request #16 from oislen/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
oislen authored Oct 9, 2024
2 parents cfe6a9c + e63b202 commit 03bb574
Show file tree
Hide file tree
Showing 39 changed files with 506 additions and 542 deletions.
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

0 comments on commit 03bb574

Please sign in to comment.