Skip to content
Open
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
43 changes: 25 additions & 18 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,45 @@ name: Unittest, flake8
# Run action on pull requests
on:
pull_request:
branches: [main]
branches: [update_windninja_version]

jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.7"

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install flake8
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install flake8

- name: Lint with flake8
run: |
flake8 katana tests
- name: Lint with flake8
run: |
flake8 katana tests

unittest:
needs: flake8
name: Docker unittest
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3

- name: Build Docker image
run: docker build -t usdaarsnwrc/katana .
- name: Set Node-js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x

- name: Run tests inside the container
run: docker run usdaarsnwrc/katana test
- name: Build Docker image
run: docker build -t usdaarsnwrc/katana .

- name: Run tests inside the container
run: docker run usdaarsnwrc/katana test

17 changes: 9 additions & 8 deletions docker-base/Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This is a build image meaning that all the dependancies
# will be build in this image and will not clean
# up after itself. In the katana image, we'll copy
# the build artifcats into the newer image
# the build artifacts into the newer image
FROM ubuntu:18.04

LABEL maintainer="Scott Havens <scott.havens@usda.gov>"
LABEL maintainer="Andrew Hedrick <andrew.hedrick@usda.gov>"

####################################################
## System requirements
Expand Down Expand Up @@ -43,8 +43,9 @@ RUN mkdir -p /build/windninja \
wget \
# end windninja
&& curl -L ftp://ftp.cpc.ncep.noaa.gov/wd51we/wgrib2/wgrib2.tgz | tar xz \
&& curl -L https://github.com/firelab/windninja/archive/3.5.0.tar.gz | tar xz \
&& mv windninja-3.5.0 /build/windninja/windninja \
# && curl -L https://github.com/firelab/windninja/archive/3.5.0.tar.gz | tar xz \
&& curl -L https://github.com/firelab/windninja/archive/3.8.1.tar.gz | tar xz \
&& mv windninja-3.8.1 /build/windninja/windninja \
# && rm -rf /var/lib/apt/lists/* \
&& apt-get remove -y curl \
&& apt-get autoremove -y
Expand All @@ -54,8 +55,8 @@ RUN mkdir -p /build/windninja \
####################################################
ENV PREFIX=/usr/local
# ENV POPPLER="poppler-0.23.4"
ENV PROJ="proj-4.8.0"
ENV GDAL="gdal-2.0.3"
ENV PROJ="proj-6.3.2"
ENV GDAL="gdal-3.2.1"
ENV WNSCRIPTS="/build/windninja/depends"

# Poppler is not really needed for this application which means
Expand All @@ -73,7 +74,7 @@ ENV WNSCRIPTS="/build/windninja/depends"
# Proj
RUN mkdir -p $WNSCRIPTS/$PROJ \
&& cd $WNSCRIPTS/$PROJ \
&& wget http://download.osgeo.org/proj/$PROJ.tar.gz \
&& wget https://download.osgeo.org/proj/$PROJ.tar.gz \
&& tar xvfz $PROJ.tar.gz \
&& cd $PROJ \
&& ./configure --prefix=$PREFIX \
Expand All @@ -87,7 +88,7 @@ RUN mkdir -p $WNSCRIPTS/$PROJ \
# GDAL
RUN mkdir -p $WNSCRIPTS/$GDAL \
&& cd $WNSCRIPTS/$GDAL \
&& wget http://download.osgeo.org/gdal/2.0.3/$GDAL.tar.gz \
&& wget https://download.osgeo.org/gdal/${GDAL:5}/$GDAL.tar.gz \
&& tar -xvf $GDAL.tar.gz \
&& cd $GDAL \
&& ./configure --prefix=$PREFIX --with-curl=/usr/bin/curl-config \
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ coloredlogs==6.1
numpy>=1.14.0
pytz
utm==0.4.0
dateparser==0.7.2
dateparser==1.1.1
inicheck
setuptools_scm==3.5.0
setuptools_scm==3.5.0