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

Update to main #88

Merged
merged 4 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
47 changes: 33 additions & 14 deletions .github/workflows/test_r.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: R-test
on:
push:
branches:
[main, dev]
[main]
pull_request:
branches:
[main]
Expand All @@ -23,13 +23,31 @@ jobs:
matrix:
os: [windows-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v4

- name: setup python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
miniforge-version: 'latest'

- name: Conda install
shell: bash -el {0}
run: |
# conda deactivate
# conda rename -n test wq_harmonize
conda install "pytest" "numpy<2.0" "pandas<2.0" "geopandas>=0.10.2, <0.13" "pint>=0.18" "dataretrieval>=1.0, <1.0.5" "requests"
conda install pip
pip install .
conda create --name wq_harmonize --clone test

- name: Print Conda environment
shell: bash -l {0}
run: |
conda info
conda list

- name: Set up R
uses: r-lib/actions/setup-r@v2
Expand All @@ -50,23 +68,24 @@ jobs:
run: |
library(reticulate)

packages = c(
"pytest", "numpy<2.0", "pandas<2.0", "geopandas>=0.10.2, <0.13", "pint>=0.18",
"dataretrieval>=1.0, <1.0.5", "requests"
)
# packages = c(
# "pytest", "numpy<2.0", "pandas<2.0", "geopandas>=0.10.2, <0.13", "pint>=0.18",
# "dataretrieval>=1.0, <1.0.5", "requests"
# )

reticulate::install_miniconda()
reticulate::conda_create("wq_harmonize", python_version = "${{ matrix.python-version }}")
reticulate::conda_install("wq_harmonize", packages)
# reticulate::install_miniconda()
# reticulate::conda_create("wq_harmonize", python_version = "${{ matrix.python-version }}")
# reticulate::conda_install("wq_harmonize", packages)

#path_to_venv <- virtualenv_create(
# path_to_venv <- virtualenv_create(
# envname = "wq_harmonize",
# python = Sys.which("python"), # placed on PATH by the setup-python action
# packages
#)
#use_virtualenv("wq_harmonize")
# )
# use_virtualenv("wq_harmonize")

reticulate::py_install("git+https://github.com/USEPA/harmonize-wq.git", pip = TRUE, envname = "wq_harmonize")
reticulate::use_condaenv("wq_harmonize")
#reticulate::py_install("git+https://github.com/USEPA/harmonize-wq.git", pip = TRUE, envname = "wq_harmonize")

rmarkdown::render(input = "demos/Harmonize_Pensacola.Rmd")

Expand Down
2 changes: 1 addition & 1 deletion harmonize_wq/domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_domain_dict(table, cols=None):
dict_keys(['Acid Soluble', 'Bed Sediment', 'Bedload', 'Bioavailable', 'Comb Available',
'Dissolved', 'Extractable', 'Extractable, CaCO3-bound', 'Extractable, exchangeable',
'Extractable, organic-bnd', 'Extractable, other', 'Extractable, oxide-bound',
'Extractable, residual', 'Field', 'Filter/sieve residue', 'Filterable',
'Extractable, residual', 'Field***', 'Filter/sieve residue', 'Filterable',
'Filtered field and/or lab', 'Filtered, field', 'Filtered, lab',
'Fixed', 'Free Available', 'Inorganic', 'Leachable', 'Net (Hot)',
'Non-Filterable (Particle)', 'Non-settleable', 'Non-volatile',
Expand Down
Loading