Skip to content

Commit

Permalink
Merge pull request #13 from CIROH-UA/adding-dashboard
Browse files Browse the repository at this point in the history
Adding OWP Dashboard App
  • Loading branch information
romer8 authored Oct 15, 2024
2 parents 43cabbf + 0703c3a commit 766d12e
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 18 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/build_and_push_and_deploy_prod_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,22 @@ jobs:
needs: [clean-space]
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'
submodules: 'false'

- name: Set up Git credentials for GitLab submodule
run: |
git config --global url."https://oauth2:${GITLAB_PAT}@git.aquaveo.com/".insteadOf "https://git.aquaveo.com/"
env:
GITLAB_PAT: ${{ secrets.GITLAB_PAT }}

# Step 4: Update submodules recursively
- name: Update submodules recursively
run: |
git submodule sync --recursive
git submodule update --init --recursive
# Checks-out the hydrocompute extra submodule
- name: checkout Hydrocompute submodule
Expand Down
15 changes: 13 additions & 2 deletions .github/workflows/build_and_push_dev_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,22 @@ jobs:
needs: [clean-space]
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: 'true'
submodules: 'false'

- name: Set up Git credentials for GitLab submodule
run: |
git config --global url."https://oauth2:${GITLAB_PAT}@git.aquaveo.com/".insteadOf "https://git.aquaveo.com/"
env:
GITLAB_PAT: ${{ secrets.GITLAB_PAT }}

# Step 4: Update submodules recursively
- name: Update submodules recursively
run: |
git submodule sync --recursive
git submodule update --init --recursive
# Checks-out the hydrocompute extra submodule
- name: checkout Hydrocompute submodule
Expand Down
10 changes: 5 additions & 5 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
path = apps/snow-inspector
url = https://github.com/Aquaveo/snow-inspector
branch = tethys4_upgrade
[submodule "OWP"]
path = apps/OWP
url = [email protected]:Aquaveo/OWP.git
branch = main
[submodule "Tethys-CSES"]
path = apps/Tethys-CSES
url = https://github.com/whitelightning450/Tethys-CSES
Expand All @@ -37,8 +33,12 @@
[submodule "Water-Data-Explorer"]
path = apps/Water-Data-Explorer
url = https://github.com/Aquaveo/Water-Data-Explorer
branch = hydroserver2-update-Jacob
branch = master
[submodule "apps/tethysapp-hydrocompute"]
path = apps/tethysapp-hydrocompute
url = https://github.com/tethysplatform/tethysapp-hydrocompute.git
branch = main
[submodule "aquainsight"]
path = apps/aquainsight
url = https://git.aquaveo.com/tethys/firo/aquainsight.git
branch = ciroh
14 changes: 10 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ ARG MAMBA_DOCKERFILE_ACTIVATE=1

RUN pip install --no-cache-dir --quiet -r piprequirements.txt && \
micromamba install --yes -c conda-forge --file requirements.txt && \
micromamba clean --all --yes && \
pip install --no-deps --no-cache-dir nwm-plugins && \
micromamba clean --all --yes && \
export PYTHON_SITE_PACKAGE_PATH=$(${CONDA_HOME}/envs/${CONDA_ENV_NAME}/bin/python -m site | grep -a -m 1 "site-packages" | head -1 | sed 's/.$//' | sed -e 's/^\s*//' -e '/^$/d'| sed 's![^/]*$!!' | cut -c2-) &&\
cd ${TETHYS_HOME}/extensions/tethysext-ciroh_theme && python setup.py install && \
cd ${TETHYS_HOME}/apps/Water-Data-Explorer && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/water_data_explorer.yml && \
cd ${TETHYS_HOME}/apps/tethysapp-tethys_app_store && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/app_store.yml && \
cd ${TETHYS_HOME}/apps/ggst && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/ggst.yml && \
cd ${TETHYS_HOME}/apps/tethysapp-metdataexplorer && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/metdataexplorer.yml && \
cd ${TETHYS_HOME}/apps/tethysapp-swe && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/swe.yml && \
cd ${TETHYS_HOME}/apps/tethysapp-hydrocompute && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/hydrocompute.yml && \
cd ${TETHYS_HOME}/apps/gwdm && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/gwdm.yml && \
cd ${TETHYS_HOME}/apps/snow-inspector && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/snow-inspector.yml && \
cd ${TETHYS_HOME}/apps/OWP && npm install && npm run build && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/OWP.yml && \
cd ${TETHYS_HOME}/apps/aquainsight && mv ${TETHYS_HOME}/apps/aquainsight/reactapp/config/development.env ${TETHYS_HOME}/apps/aquainsight/reactapp/config/production.env && npm install && npm run build && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/aquainsight.yml && \
cd ${TETHYS_HOME}/apps/Tethys-CSES && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/community_streamflow_evaluation_system.yml && \
cd ${TETHYS_HOME}/apps/hydroshare_api_tethysapp && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/hydroshare_api_tethysapp.yml && \
cd ${TETHYS_HOME}/apps/Water-Data-Explorer && tethys install -w -N -q && cp install.yml $PYTHON_SITE_PACKAGE_PATH/site-packages/water_data_explorer.yml && \
rm -rf /var/lib/apt/lists/* && \
find -name '*.a' -delete && \
rm -rf ${CONDA_HOME}/envs/${CONDA_ENV_NAME}/conda-meta && \
Expand Down Expand Up @@ -63,7 +64,12 @@ COPY salt/ /srv/salt/
ARG MAMBA_DOCKERFILE_ACTIVATE=1
RUN rm -Rf ~/.cache/pip && \
micromamba install --yes -c conda-forge numpy==1.26.4 && \
micromamba clean --all --yes
#important, this fixes th error of not finding pyrpoj database, it seems it is installed wiht both conda and pypi, so it has conflicting paths
pip uninstall -y pyproj && \
pip install --no-cache-dir --quiet pyproj && \
pip uninstall -y pyogrio && \
pip install --no-cache-dir --quiet pyogrio && \
micromamba clean --all --yes
EXPOSE 80

CMD bash run.sh
1 change: 0 additions & 1 deletion apps/OWP
Submodule OWP deleted from 9af1fd
2 changes: 1 addition & 1 deletion apps/Water-Data-Explorer
1 change: 1 addition & 0 deletions apps/aquainsight
Submodule aquainsight added at eef9e1
3 changes: 1 addition & 2 deletions requirements/piprequirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ see
pywaterml
gstools
hydroeval
pynhd
numpy==1.26.4
asyncio
7 changes: 6 additions & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,9 @@ boto3
scikit-learn
hs_restclient
djangorestframework
fiona
fiona
pynhd
intake>=0.6.6
pygeoogc
pygeoutils
pygeohydro

0 comments on commit 766d12e

Please sign in to comment.