-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from NOAA-GSL/proxy-accepts-new-profiles
feat: ims-service accepts new profiles
- Loading branch information
Showing
21 changed files
with
915 additions
and
188 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Run Pytest | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
strategy: | ||
matrix: | ||
python-version: [ "3.11" ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pytest pytest-cov pylint==2.17.5 python-dateutil==2.8.2 flask==2.3.2 | ||
- name: Checkout idss-engine-commons | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: NOAA-GSL/idss-engine-commons | ||
ref: main | ||
path: commons/ | ||
|
||
- name: Install IDSSE python commons | ||
working-directory: commons/python/idsse_common | ||
run: pip install . | ||
|
||
- name: Set PYTHONPATH for pytest | ||
run: | | ||
echo "PYTHONPATH=python/nwsc_proxy" >> $GITHUB_ENV | ||
- name: Test pytest | ||
working-directory: python/nwsc_proxy/test | ||
run: | | ||
set -o pipefail; # exit immediately if pytest fails (tee obfuscates the exit code) | ||
pytest --cov=.. --cov-report=term --junitxml=./pytest.xml | tee ./coverage.txt; | ||
- name: Pytest coverage comment | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
id: coverageComment | ||
uses: MishaKav/pytest-coverage-comment@main | ||
with: | ||
hide-comment: true | ||
badge-title: Coverage | ||
title: Report | ||
pytest-coverage-path: python/nwsc_proxy/test/coverage.txt |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# NWSC Proxy Service using python commons base image | ||
FROM idss.engine.commons.python-base:local | ||
|
||
ARG maintainer | ||
LABEL maintainer ${maintainer} | ||
|
||
# Install additional dependencies | ||
#RUN conda config --add channels conda-forge && \ | ||
# conda install -y flask=2.3.2 | ||
|
||
WORKDIR /python/nwsc_proxy | ||
|
||
# Copy source files | ||
COPY ./python/nwsc_proxy/*.py /python/nwsc_proxy/ | ||
COPY ./python/nwsc_proxy/src/*.py /python/nwsc_proxy/src/ | ||
|
||
# (TEMPORARY) Copy canned criteria files. To be removed when integration with NWS Connect API exists | ||
COPY ./python/nwsc_proxy/src/profiles/*.json /python/profiles/ | ||
|
||
# The volume mapping here is kind of strange for k8s deployment, because if we map an empty volume to /criteria | ||
# then the temp copy of json above will get blown away by the volume mapping...just omit it for k8s deployment | ||
# for now. | ||
#VOLUME /python/profiles | ||
|
||
ENTRYPOINT [ "python3", "/python/nwsc_proxy/ncp_web_service.py", "--base_dir", "/python/profiles"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.