Skip to content

Commit

Permalink
[#135] NLDI data retrieval (#136)
Browse files Browse the repository at this point in the history
* [#135] initial implementation of NLDI data access

* [#135] adding additional NLDI data access functionality

* [#135] convert boolean type query parameters to string type

* [#135] setting default distance to 5 kms for flowlines

* [#135] tests for NLDI data access

* Set NLDI optional dependency

* Fix python-package.yml

* Rollback geopandas for Python 3.8

* Throw warning to install geopandas

---------

Co-authored-by: thodson <[email protected]>
  • Loading branch information
pkdash and thodson-usgs committed Apr 28, 2024
1 parent 593f420 commit 786e811
Show file tree
Hide file tree
Showing 14 changed files with 2,323 additions and 56 deletions.
47 changes: 23 additions & 24 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,32 @@ on:

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9, '3.10']
os: [ubuntu-latest, windows-latest]
python-version: [3.8, 3.9, '3.10', 3.11]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest and report coverage
run: |
cd tests
coverage run -m pytest
coverage report -m
cd ..
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test,nldi]
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest and report coverage
run: |
cd tests
coverage run -m pytest
coverage report -m
cd ..
49 changes: 24 additions & 25 deletions .github/workflows/sphinx-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,31 @@ jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install dataretrieval, dependencies, and Sphinx then build docs
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install .
sudo apt update -y && sudo apt install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended dvipng pandoc
(cd docs && make docs)
(cd docs && make html)
- name: Debug
run: |
echo $REF
echo $EVENT_NAME
echo ${{ github.event_name == 'push' }}
echo ${{ github.ref == 'refs/heads/master' }}
echo ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install dataretrieval, dependencies, and Sphinx then build docs
shell: bash -l {0}
run: |
python -m pip install --upgrade pip
pip install .[doc]
sudo apt update -y && sudo apt install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended dvipng pandoc
(cd docs && make docs)
(cd docs && make html)
- name: Debug
run: |
echo $REF
echo $EVENT_NAME
echo ${{ github.event_name == 'push' }}
echo ${{ github.ref == 'refs/heads/master' }}
echo ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
EVENT_NAME: ${{ github.event_name }}
REF: ${{ github.ref }}
BRANCH: gh-pages
FOLDER: docs/build/html
FOLDER: docs/build/html
Loading

0 comments on commit 786e811

Please sign in to comment.