Skip to content

Commit 786e811

Browse files
pkdashthodson-usgs
andauthored
[#135] NLDI data retrieval (#136)
* [#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]>
1 parent 593f420 commit 786e811

14 files changed

+2323
-56
lines changed

.github/workflows/python-package.yml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,32 @@ on:
99

1010
jobs:
1111
build:
12-
1312
runs-on: ${{ matrix.os }}
1413
strategy:
1514
fail-fast: false
1615
matrix:
17-
os: [ubuntu-latest, macos-latest, windows-latest]
18-
python-version: [3.8, 3.9, '3.10']
16+
os: [ubuntu-latest, windows-latest]
17+
python-version: [3.8, 3.9, '3.10', 3.11]
1918

2019
steps:
21-
- uses: actions/checkout@v2
22-
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v2
24-
with:
25-
python-version: ${{ matrix.python-version }}
26-
- name: Install dependencies
27-
run: |
28-
python -m pip install --upgrade pip
29-
pip install -r requirements-dev.txt
30-
- name: Lint with flake8
31-
run: |
32-
# stop the build if there are Python syntax errors or undefined names
33-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
34-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
35-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
36-
- name: Test with pytest and report coverage
37-
run: |
38-
cd tests
39-
coverage run -m pytest
40-
coverage report -m
41-
cd ..
20+
- uses: actions/checkout@v2
21+
- name: Set up Python ${{ matrix.python-version }}
22+
uses: actions/setup-python@v2
23+
with:
24+
python-version: ${{ matrix.python-version }}
25+
- name: Install dependencies
26+
run: |
27+
python -m pip install --upgrade pip
28+
pip install .[test,nldi]
29+
- name: Lint with flake8
30+
run: |
31+
# stop the build if there are Python syntax errors or undefined names
32+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
34+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
35+
- name: Test with pytest and report coverage
36+
run: |
37+
cd tests
38+
coverage run -m pytest
39+
coverage report -m
40+
cd ..

.github/workflows/sphinx-docs.yml

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,31 @@ jobs:
1010
docs:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout
14-
uses: actions/checkout@v3
15-
with:
16-
persist-credentials: false
17-
- name: Install dataretrieval, dependencies, and Sphinx then build docs
18-
shell: bash -l {0}
19-
run: |
20-
python -m pip install --upgrade pip
21-
pip install -r requirements-dev.txt
22-
pip install .
23-
sudo apt update -y && sudo apt install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended dvipng pandoc
24-
(cd docs && make docs)
25-
(cd docs && make html)
26-
- name: Debug
27-
run: |
28-
echo $REF
29-
echo $EVENT_NAME
30-
echo ${{ github.event_name == 'push' }}
31-
echo ${{ github.ref == 'refs/heads/master' }}
32-
echo ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
33-
- name: Deploy to GitHub Pages
34-
uses: JamesIves/[email protected]
35-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
36-
with:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
with:
16+
persist-credentials: false
17+
- name: Install dataretrieval, dependencies, and Sphinx then build docs
18+
shell: bash -l {0}
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install .[doc]
22+
sudo apt update -y && sudo apt install -y latexmk texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended dvipng pandoc
23+
(cd docs && make docs)
24+
(cd docs && make html)
25+
- name: Debug
26+
run: |
27+
echo $REF
28+
echo $EVENT_NAME
29+
echo ${{ github.event_name == 'push' }}
30+
echo ${{ github.ref == 'refs/heads/master' }}
31+
echo ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
32+
- name: Deploy to GitHub Pages
33+
uses: JamesIves/[email protected]
34+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
35+
with:
3736
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3837
EVENT_NAME: ${{ github.event_name }}
3938
REF: ${{ github.ref }}
4039
BRANCH: gh-pages
41-
FOLDER: docs/build/html
40+
FOLDER: docs/build/html

0 commit comments

Comments
 (0)