Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release 0 3 8 #53

Merged
merged 193 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
193 commits
Select commit Hold shift + click to select a range
e327db8
Reposition examples example after returns
jbousquin Aug 29, 2023
51a1286
Expand example so that it builds up from scratch
jbousquin Aug 29, 2023
0fe77fc
Update documentation_test.yml
jbousquin Aug 31, 2023
ee96ff6
Update example to format code in doc
jbousquin Aug 31, 2023
341762a
code format lines past 1 in docs
jbousquin Aug 31, 2023
f7c986c
finish doc example for map functions. Consider combining into one fun…
jbousquin Sep 1, 2023
9fec7b6
Add link to demos within doc
jbousquin Sep 1, 2023
e035ba9
Attempt to add references to pandas docs
jbousquin Sep 1, 2023
3e23ca5
connecting other docs worked well, add a bunch more
jbousquin Sep 1, 2023
2155540
Started adding doc examples to location module
jbousquin Sep 1, 2023
72e38c6
Finished adding doc examples where appropriate
jbousquin Sep 6, 2023
5abdb00
Added examples to this module
jbousquin Sep 8, 2023
173348d
minor doc edits
jbousquin Sep 8, 2023
2d45302
Started adding examples to basis - still need basis_from_methodSpec, …
jbousquin Sep 8, 2023
4fc92a8
Added doc examples
jbousquin Sep 10, 2023
3f84190
When basis is set df isn't being replaced by the result
jbousquin Sep 10, 2023
1d0eade
Added doc examples for the functions that are fully implemented (not …
jbousquin Sep 10, 2023
e1a5a4e
Drop from todo - datetime no longer pops old values in latest version…
jbousquin Sep 10, 2023
9fc53cd
Added examples for all domains functions (except accepted_methods as …
jbousquin Sep 11, 2023
d09f2a9
Initial doc additions
jbousquin Sep 11, 2023
90a37a5
Added examples for remaining functions. Note several had implementati…
jbousquin Sep 11, 2023
3842472
Move docs up from init to class. Added example to df_checks()
jbousquin Sep 12, 2023
d08ae67
Made several methods internal (these are only used within class)
jbousquin Sep 12, 2023
4736a97
Drop method char_val(), this helper function was only used once, had …
jbousquin Sep 12, 2023
623522c
Added example to class
jbousquin Sep 12, 2023
3dfa4bf
Update test.yml
jbousquin Sep 12, 2023
e725fc5
Update calls to internal methods. Eliminated _unit_mask() since it wa…
jbousquin Sep 12, 2023
6ee92be
Merge branch 'add-doc-examples' of https://github.com/USEPA/harmonize…
jbousquin Sep 12, 2023
4e8de10
linter
jbousquin Sep 12, 2023
5dfdcff
Added check_units() example
jbousquin Sep 12, 2023
ae3a413
unit_col was originally included to allow user to specify a different…
jbousquin Sep 12, 2023
3253805
No reason to remove old basis from MethodSpecificationName
jbousquin Sep 12, 2023
5ef8fba
Fix doc typos
jbousquin Sep 12, 2023
c84974f
Added check_basis() examples
jbousquin Sep 12, 2023
0a2d3c1
Move creation of basis column up (if it doesn't exist)
jbousquin Sep 12, 2023
0270397
Added doc examples for four methods
jbousquin Sep 12, 2023
fd6fac3
Changed replace_in_col() from a function to an internal method.
jbousquin Sep 13, 2023
d2c68b2
Added examples to docs
jbousquin Sep 13, 2023
de5cf36
Internal method def over indented
jbousquin Sep 13, 2023
4c657b2
Gets df from self now
jbousquin Sep 13, 2023
3b03704
Complete example for replace_unit_by_str
jbousquin Sep 13, 2023
26544c2
BREAKING CHANGE: replace_unit_by_str() now replace_unit_str() so it i…
jbousquin Sep 13, 2023
559ed7d
Compleated doc example for replace_unit_by_dict()
jbousquin Sep 13, 2023
5ce992f
Complete exmaple for handle_dimensions() method
jbousquin Sep 13, 2023
11c5ac2
Move dimenions_handling from function to internal method, this allows…
jbousquin Sep 13, 2023
ad96f0b
No longer need to pass self.units (internal method now)
jbousquin Sep 13, 2023
a3d06ee
hndle_dimensions -> dimension_fixes, as this method returns lists to …
jbousquin Sep 13, 2023
0d651b6
Example for moles_convert method
jbousquin Sep 13, 2023
df84dcd
Add examples for convert_unit_series, add_qa_flag, and unit_qa_flag f…
jbousquin Sep 13, 2023
73c7b15
unit_qa_flag -> _unit_qa_flag (4 ->2 args, and this is just an intern…
jbousquin Sep 13, 2023
9743f60
Added example for units_dimension()
jbousquin Sep 13, 2023
38ba82a
In doc examples, import just DataFrame from pandas (saves 7 char per …
jbousquin Sep 13, 2023
89ccc5f
Moved class into it's own module. This is a major structural change
jbousquin Sep 13, 2023
037c4ba
Attempt to fix circular import
jbousquin Sep 13, 2023
a43a0c2
Added examples for main functions using tests data and added see also…
jbousquin Sep 14, 2023
9e78b6e
Merge from tests_builds to test full suite of win builds.
jbousquin Sep 14, 2023
05db216
Refresh of demos from demo_refresh branch
jbousquin Sep 14, 2023
9047e68
From frac_dict_TADA branch: Added speciation conversion factors, thes…
jbousquin Sep 14, 2023
60afc5f
merge from frac_dict_TADA branch: Add functions to pull in harmonizat…
jbousquin Sep 14, 2023
1ee3d57
merge from frac_dict_TADA branch: Working on implementing sample frac…
jbousquin Sep 14, 2023
d3c5f79
Update test.yml
jbousquin Sep 14, 2023
13fecbe
Resolve break from frac_dict_TADA
jbousquin Sep 14, 2023
f08761c
Merge branch 'new_release_0-3-8' of https://github.com/USEPA/harmoniz…
jbousquin Sep 14, 2023
001ccd8
Merge pull request #44 from USEPA/main
jbousquin Sep 14, 2023
a04d55b
Reduced GOM demo to the one thats most manageable - where a user chos…
jbousquin Sep 14, 2023
46983f0
Re-ran all simple demos with most up to date data and branch code
jbousquin Sep 14, 2023
e73c844
Re-ran all detailed demos with latest data and branch code
jbousquin Sep 14, 2023
188ae3e
Merge branch 'new_release_0-3-8' of https://github.com/USEPA/harmoniz…
jbousquin Sep 14, 2023
95534b3
Add new module to api index
jbousquin Sep 14, 2023
16acd0e
Use coerce name for python types to link to python docs (e.g., str no…
jbousquin Sep 14, 2023
029db59
Add '.' for attributes (numpy PEP484)
jbousquin Sep 14, 2023
deac54c
Reduce class desc to one line
jbousquin Sep 14, 2023
654b447
Do test docs build on push to this branch
jbousquin Sep 14, 2023
f5509f0
Add sphinxcontrib-spelling as part of docs build (not yet deploy). Te…
jbousquin Sep 14, 2023
ca652ed
Somehow missed these unwritten doc strings
jbousquin Sep 14, 2023
a184ccc
if there isn't a _static dir leave it blank to avoid warning.
jbousquin Sep 14, 2023
133dd5a
Fix rst errors
jbousquin Sep 14, 2023
39ebf9d
fix rst errors
jbousquin Sep 14, 2023
69f13fd
Attempt to resolve some doc test warnings
jbousquin Sep 14, 2023
05add25
docs had trouble interpreting as python3
jbousquin Sep 14, 2023
cff3c03
Make title for page indexing
jbousquin Sep 14, 2023
1b55c8b
Fix :: vs : issues (and some pandas imports I missed)
jbousquin Sep 14, 2023
dfbd089
identify as line of code or Q_ will confuse docs
jbousquin Sep 14, 2023
ccd24a9
line of code, sorry sphinx
jbousquin Sep 14, 2023
f65fddb
Simplify pint Q_ type so it'll link to their class doc
jbousquin Sep 14, 2023
38cd35e
Attempt to resolve doctest errors (mostly missing imports)
jbousquin Sep 15, 2023
7338383
Round two of trying to resolve doctest errors
jbousquin Sep 15, 2023
0716072
Fixed <BLANKLINE> results
jbousquin Sep 15, 2023
a498f19
doctests (should resolve some of the 43/329)
jbousquin Sep 15, 2023
d49bb10
Update docstrings based on pydocstyle.
jbousquin Sep 28, 2023
c8a409b
Spelling in rst files.
jbousquin Sep 28, 2023
11b2103
First round of spellings to ignore.
jbousquin Sep 28, 2023
a2f639b
First round of dostring spelling updates.
jbousquin Sep 28, 2023
7d66666
Second round of spelling corrections
jbousquin Sep 29, 2023
3139cff
Finished with spelling corrections for now, most of these were actual…
jbousquin Sep 29, 2023
4e4f17a
Internal docs review1 (R. Ennis)
jbousquin Sep 30, 2023
f5d941a
Internal docs review1 (R. Ennis). Additional comments: When the docum…
jbousquin Sep 30, 2023
6b0ee99
Fromatting to fix doc warnings/errors from last commit
jbousquin Sep 30, 2023
2998bd3
Resolve new doc warnings/spelling that resulted from review fixes.
jbousquin Sep 30, 2023
67a9c14
Create test_r
jbousquin Jan 17, 2024
9f3ba24
Update and rename test_r to test_r.yaml
jbousquin Jan 17, 2024
72181b6
Update test_r.yaml
jbousquin Jan 17, 2024
0e359f6
Update test_r.yaml
jbousquin Jan 17, 2024
0c38a81
Update test_r.yaml
jbousquin Jan 17, 2024
f53d534
Update test_r.yaml
jbousquin Jan 17, 2024
5b52641
Update test_r.yaml
jbousquin Jan 17, 2024
b70b93c
Update test_r.yaml
jbousquin Jan 17, 2024
744fe53
Init Commit JOSS paper
jbousquin Jan 26, 2024
90dbbaa
Got DO conversions w/ non-standard pressure/temperature functional an…
jbousquin Jan 29, 2024
b90bad9
Updates to docs to get doctests passing (the easy fixes)
jbousquin Jan 29, 2024
54073ab
Update documentation_test.yml
jbousquin Jan 30, 2024
85459f5
Update documentation_test.yml
jbousquin Jan 30, 2024
42602a7
CI doctest and local readout don't always match (...). Changing this …
jbousquin Jan 30, 2024
ad5ae6b
Updates to doc results shown
jbousquin Jan 30, 2024
6ced870
'PSU' has to be defined locally for the demo and internally in the mo…
jbousquin Jan 30, 2024
1f4cd98
SPU_to_density() result as str. NTU -> 'Nephelometric_Turbidity_Units'
jbousquin Jan 30, 2024
75852b6
Quantity for context needs to be defined by multiplier not string. (q…
jbousquin Jan 30, 2024
145ca64
Hoping the missing emptyline was at fault
jbousquin Jan 30, 2024
9ad2801
Try with expected error
jbousquin Jan 30, 2024
2ad2c33
Compleated moles_convert() example.
jbousquin Jan 30, 2024
9e8fa0d
Sort added columns to ensure consistent order. Not sure how to do tha…
jbousquin Jan 30, 2024
6cae1af
Change ureg name in dict
jbousquin Jan 30, 2024
3e89fbc
whitespace
jbousquin Jan 30, 2024
b0af1d5
line in example needed to be run (>>>)
jbousquin Jan 30, 2024
49516e7
ignore spacing
jbousquin Jan 30, 2024
ad23a47
Needed to skip a line...
jbousquin Jan 30, 2024
29245bf
Reduce detects being collected (suspect query errors w/ so many resul…
jbousquin Jan 31, 2024
26f9557
Need to show expected result (also illustrates the point when rows in…
jbousquin Jan 31, 2024
337566e
Try adding notebooks using nbsphinx
jbousquin Jan 31, 2024
549edac
Confirmed it is 100 not 101 columns
jbousquin Jan 31, 2024
cc8a0a7
Move notebooks to make it easier for the docs index to find them
jbousquin Jan 31, 2024
98b8e01
Update documentation_test.yml
jbousquin Jan 31, 2024
1b947a6
Update documentation_test.yml
jbousquin Jan 31, 2024
ed326ad
Update documentation_test.yml
jbousquin Feb 1, 2024
ca31f58
Add caption (heading) for nb tutorials
jbousquin Feb 1, 2024
9ccfa34
try r-lib workflow
jbousquin Feb 1, 2024
10e26ec
Fix typo in index
jbousquin Feb 1, 2024
12872e0
formatting to try to get tutorial section
jbousquin Feb 1, 2024
114e572
Try adding link/reference to nb outside docs
jbousquin Feb 1, 2024
46c5a43
Skip doctest while working on build/conf
jbousquin Feb 1, 2024
b6acf44
Add nbsphinx_link
jbousquin Feb 1, 2024
868c28d
Notebook name needs to be consistent throughout
jbousquin Feb 1, 2024
c27ea85
Move notebooks folder to within docs/source
jbousquin Feb 1, 2024
00c2bbd
Update heading to use in docs TOC
jbousquin Feb 1, 2024
5d0192a
Try two in nblink json?
jbousquin Feb 1, 2024
19b24b8
Adding all the example notebooks
jbousquin Feb 1, 2024
e264067
Moved Tampa demos back to demos dir
jbousquin Feb 1, 2024
f2d562b
Update headings
jbousquin Feb 1, 2024
fd8dd54
Fixed notebooks linked in json files
jbousquin Feb 1, 2024
c5c4174
Fix heading size to get TOC right
jbousquin Feb 1, 2024
c0168b5
Try moving install section into index
jbousquin Feb 2, 2024
681f81b
Continue to rearrange getting started to index
jbousquin Feb 2, 2024
7950d45
Pull farther down from rst
jbousquin Feb 2, 2024
6b0bf6d
Remove missing from toc (otherwise it doesn't populate any)
jbousquin Feb 2, 2024
68246f3
Fix rst whitespace
jbousquin Feb 2, 2024
24515d8
Move notebooks to their own rst
jbousquin Feb 2, 2024
4516a4e
Landing page edits
jbousquin Feb 2, 2024
74ea050
Move text
jbousquin Feb 2, 2024
62ab166
Self reference?
jbousquin Feb 2, 2024
9706112
Move notebooks back into index
jbousquin Feb 2, 2024
d920e05
Edit TOC
jbousquin Feb 2, 2024
49ee212
whitespace
jbousquin Feb 2, 2024
2fbf2a1
Drop header
jbousquin Feb 2, 2024
e9856a6
Add requirements dev version
jbousquin Feb 2, 2024
ad91509
two packages (typo)
jbousquin Feb 2, 2024
fe9a9c2
Merge pull request #48 from USEPA/main
jbousquin Feb 2, 2024
0d8e647
Merge pull request #49 from USEPA/reticulate_demo_test
jbousquin Feb 2, 2024
d573734
Switching to f strings
jbousquin Feb 2, 2024
30b8fdd
Update when tests run
jbousquin Feb 2, 2024
49559fa
Drop bacteria_reg (not being used anywhere and doesn't really do anyt…
jbousquin Feb 2, 2024
e66c573
Support py3.8-3.11
jbousquin Feb 2, 2024
62292bd
pylint
jbousquin Feb 5, 2024
1882878
harmonize_generic() -> harmonize()
jbousquin Feb 5, 2024
48fa750
Updated fraction() to simplify it (only need to run on present sample…
jbousquin Feb 5, 2024
9434fca
Fix up docs for Fraction
jbousquin Feb 5, 2024
f258a59
get consistent result order (see #51)
jbousquin Feb 5, 2024
9b2ef05
Fix minor change/typo in docs
jbousquin Feb 5, 2024
e275b85
set() doesn't maintain char_vals order, added sort to keep it consist…
jbousquin Feb 5, 2024
f4c2181
update doc example expected result
jbousquin Feb 5, 2024
b324143
fix typo
jbousquin Feb 5, 2024
d15ce8f
Add tests to increase viz coverage
jbousquin Feb 6, 2024
0b3fe9c
Add backward test
jbousquin Feb 6, 2024
91c0885
Re-run to update inputs
jbousquin Feb 6, 2024
05a2cbe
Update - run 2/6/2024 results
jbousquin Feb 6, 2024
6e9c68c
run update results 2/6/2024
jbousquin Feb 6, 2024
eb8157f
run update results 2/6/2024
jbousquin Feb 6, 2024
f8a78df
run update results 2/6/2024
jbousquin Feb 6, 2024
93ef7be
Refresh data results 2/6/2024
jbousquin Feb 7, 2024
413ab51
Refresh data results 2/6/2024
jbousquin Feb 7, 2024
b672d78
shp -> geojson
jbousquin Feb 7, 2024
e145e49
Update version for new release
jbousquin Feb 7, 2024
fdc87bb
Update data results for 2/6/2024
jbousquin Feb 7, 2024
ef7e904
Update branches to run on
jbousquin Feb 7, 2024
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
9 changes: 8 additions & 1 deletion .github/workflows/documentation_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
pull_request:
branches:
[main]
push:
branches:
[main, dev]

# Allows you to run this workflow manually from the Actions tab
#workflow_dispatch:
Expand All @@ -20,16 +23,20 @@ jobs:
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install sphinx sphinx_rtd_theme
pip install -r requirements_dev.txt
- name: Sphinx build
run: |
#sphinx-build docs/source _build
cd docs
make html
make doctest
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
Expand Down
33 changes: 26 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
REPO_NAME: ${{ github.event.repository.name }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
include:
- os: windows-latest
python-version: "3.9"
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
#exclude:
# - os: windows-latest
# python-version: "3.7"

steps:
- uses: actions/checkout@v3
Expand All @@ -37,13 +37,32 @@ jobs:
python -VV
python -m pip install --upgrade pip
pip install pytest

#Dropped win3.7
#pip install pipwin
#pipwin install gdal
#pipwin install fiona

# fiona doesn't have wheels for windows
- if: matrix.os == 'windows-latest'
- if: ${{ (matrix.os == 'windows-latest') && (matrix.python-version == 3.8) }}
run: |
pip install https://github.com/cgohlke/geospatial-wheels/releases/download/v2023.1.10.1/GDAL-3.6.2-cp38-cp38-win_amd64.whl
pip install https://github.com/cgohlke/geospatial-wheels/releases/download/v2023.1.10.1/Fiona-1.8.22-cp38-cp38-win_amd64.whl

- if: ${{ (matrix.os == 'windows-latest') && (matrix.python-version == 3.9) }}
run: |
pip install https://github.com/cgohlke/geospatial-wheels/releases/download/v2023.7.16/GDAL-3.7.1-cp39-cp39-win_amd64.whl
pip install https://github.com/cgohlke/geospatial-wheels/releases/download/v2023.7.16/Fiona-1.9.4.post1-cp39-cp39-win_amd64.whl

- if: ${{ (matrix.os == 'windows-latest') && (matrix.python-version == 3.10) }}
run: |
pip install https://github.com/cgohlke/geospatial-wheels/releases/download/v2023.7.16/GDAL-3.7.1-cp310-cp310-win_amd64.whl
pip install https://github.com/cgohlke/geospatial-wheels/releases/download/v2023.7.16/Fiona-1.9.4.post1-cp310-cp310-win_amd64.whl

- if: ${{ (matrix.os == 'windows-latest') && (matrix.python-version == 3.11) }}
run: |
pip install https://github.com/cgohlke/geospatial-wheels/releases/download/v2023.7.16/GDAL-3.7.1-cp311-cp311-win_amd64.whl
pip install https://github.com/cgohlke/geospatial-wheels/releases/download/v2023.7.16/Fiona-1.9.4.post1-cp311-cp311-win_amd64.whl

- name: Install package and dependencies
run: |
python -m pip install --no-deps .
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/test_r.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: R-test

on:
push:
branches:
[main, dev]
pull_request:
branches:
[main]
schedule:
- cron: '11 1 1 * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
R-test:
name: python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
REPO_NAME: ${{ github.event.repository.name }}

strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']
include:
- os: windows-latest
python-version: "3.9"
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'

- uses: r-lib/actions/setup-pandoc@v2

- name: Update pip and install testing pkgs
run: |
python -VV
python -m pip install --upgrade pip
pip install pytest

# fiona doesn't have wheels for windows
- if: matrix.os == 'windows-latest'
run: |
pip install https://github.com/cgohlke/geospatial-wheels/releases/download/v2023.7.16/GDAL-3.7.1-cp39-cp39-win_amd64.whl
pip install https://github.com/cgohlke/geospatial-wheels/releases/download/v2023.7.16/Fiona-1.9.4.post1-cp39-cp39-win_amd64.whl

- name: Install package and dependencies
run: |
python -m pip install --no-deps .
pip install -r requirements.txt

- name: Run pip env using R reticulate
run: |
install.packages("reticulate")
reticulate::import("harmonize_wq")
shell: Rscript {0}

- name: Run pytest
run: pytest -v harmonize_wq
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# harmonize-wq
Standardize, clean and wrangle Water Quality Portal data into more analytic-ready formats
Standardize, clean, and wrangle Water Quality Portal data into more analytic-ready formats

US EPA’s [Water Quality Portal (WQP)](https://www.waterqualitydata.us/) aggregates water quality, biological, and physical data provided by many organizations and has become an essential resource with tools to query and retrieval data using [python](https://github.com/USGS-python/dataretrieval) or [R](https://github.com/USGS-R/dataRetrieval). Given the variety of data and variety of data originators, using the data in analysis often requires data cleaning to ensure it meets the required quality standards and data wrangling to get it in a more analytic-ready format. Recognizing the definition of analysis-ready varies depending on the analysis, the harmonixe_wq package is intended to be a flexible water quality specific framework to help:
- Identify differences in data units (including speciation and basis)
Expand Down
9,044 changes: 0 additions & 9,044 deletions demos/Harmonize_CapeCod.ipynb

This file was deleted.

8,412 changes: 8,412 additions & 0 deletions demos/Harmonize_CapeCod_Detailed.ipynb

Large diffs are not rendered by default.

1,883 changes: 1,883 additions & 0 deletions demos/Harmonize_CapeCod_Simple.ipynb

Large diffs are not rendered by default.

4,811 changes: 2,827 additions & 1,984 deletions demos/Harmonize_GOM.ipynb

Large diffs are not rendered by default.

Loading
Loading