From 412615a0970cc54f518ec992e58bc542bf7a7d24 Mon Sep 17 00:00:00 2001 From: Justin Bousquin Date: Mon, 22 Jul 2024 13:53:17 -0500 Subject: [PATCH 1/2] Update domains.py 'Field' -> 'Field***' --- harmonize_wq/domains.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/harmonize_wq/domains.py b/harmonize_wq/domains.py index 07cf3ae..f741199 100644 --- a/harmonize_wq/domains.py +++ b/harmonize_wq/domains.py @@ -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', From f4f53b7e0ea6c1ab568a5a76b48033eb5516f570 Mon Sep 17 00:00:00 2001 From: Justin Bousquin Date: Tue, 23 Jul 2024 09:53:12 -0500 Subject: [PATCH 2/2] 62 r test ci (#86) Update test_r.yaml to install conda outside r, specifically miniforge, then run on env from setup with current package (vs pip installing main) --- .github/workflows/test_r.yaml | 47 ++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test_r.yaml b/.github/workflows/test_r.yaml index bd783c8..2cd4969 100644 --- a/.github/workflows/test_r.yaml +++ b/.github/workflows/test_r.yaml @@ -3,7 +3,7 @@ name: R-test on: push: branches: - [main, dev] + [main] pull_request: branches: [main] @@ -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 @@ -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")