Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c1d682e
updates to make env work
ldecicco-USGS May 29, 2026
ca07d27
try cleaning first
ldecicco-USGS May 29, 2026
86e2a4c
a few more CI tries
ldecicco-USGS May 29, 2026
694b76c
file paths
ldecicco-USGS May 29, 2026
87ae2d1
another try
ldecicco-USGS May 29, 2026
f48ac2a
remove extra space
ldecicco-USGS May 29, 2026
2f61431
Try simpler Docker image build
jzemmels May 29, 2026
c404e8b
Add data.table and readr dependencies back
jzemmels May 29, 2026
25e6682
Try datatable without hyphen
jzemmels May 29, 2026
6437b91
Use data.table in install
jzemmels May 29, 2026
4275d1e
Remove conda before_script in pages job
jzemmels May 29, 2026
47c823a
Add readxl and gridExtra to dockerfile, temporarily comment pkgdown b…
jzemmels May 29, 2026
b104a3d
Fine, I guess we don't need gridExtra
jzemmels May 29, 2026
63db3ac
Try pointing quarto to python3 install
jzemmels May 29, 2026
b350a90
Add DT to dockerfile
jzemmels May 29, 2026
9c74fd2
Add pkgdown build_site back in
jzemmels May 29, 2026
46a3e4c
Merge branch 'main' into 'develop'
ldecicco-USGS May 29, 2026
1b0cc6e
Merge branch 'develop' into 'main'
ldecicco-USGS May 29, 2026
f47795f
some updates to slides
ldecicco-USGS May 29, 2026
4583ca5
Merge branch 'main' of https://code.usgs.gov/water/dataRetrieval
ldecicco-USGS May 29, 2026
de8dc4a
more updates to slides
ldecicco-USGS May 29, 2026
95632ec
more basic stuff
ldecicco-USGS May 29, 2026
4d53631
add maps
ldecicco-USGS May 29, 2026
3649dfc
fixing GHActions
ldecicco-USGS Jun 1, 2026
0faec3b
try again
ldecicco-USGS Jun 1, 2026
ca45d54
?
ldecicco-USGS Jun 1, 2026
1830aad
?
ldecicco-USGS Jun 1, 2026
2822e13
??
ldecicco-USGS Jun 1, 2026
80fdea6
try pip
ldecicco-USGS Jun 1, 2026
9ee2b30
?
ldecicco-USGS Jun 1, 2026
9fb5bed
more graph updates
ldecicco-USGS Jun 1, 2026
589e79c
discrete stuff
ldecicco-USGS Jun 1, 2026
231582a
add new hex
ldecicco-USGS Jun 1, 2026
041530e
more slide updates
ldecicco-USGS Jun 1, 2026
2abc5bc
2nd challenge
ldecicco-USGS Jun 1, 2026
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
15 changes: 10 additions & 5 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,17 @@ jobs:
any::gridExtra
local::.
needs: website
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
environment-file: environment.yml
cache-environment: false
cache-downloads: false
python-version: ${{ matrix.python-version }}
cache: "pip"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Create public directory
run: |
mkdir public
Expand Down
17 changes: 7 additions & 10 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,13 @@ build-image:
- name: ${DEVOPS_REGISTRY}usgs/docker:29-dind
alias: docker
script:
- echo ${CI_REGISTRY_PASSWORD} | docker login -u ${CI_REGISTRY_USER} --password-stdin $CI_REGISTRY
- echo "${CI_REGISTRY_PASSWORD}" | docker login -u "${CI_REGISTRY_USER}" --password-stdin $CI_REGISTRY
- docker pull ${CI_REGISTRY_IMAGE}:latest || true
- cp *.tar.gz docker/
- cd docker
- docker build
-t ${CI_REGISTRY_IMAGE}:latest
.
- docker build --cache-from ${CI_REGISTRY_IMAGE}:latest -t ${CI_REGISTRY_IMAGE}:latest -t ${CI_REGISTRY_IMAGE}:BUILD_${CI_COMMIT_SHORT_SHA} -f docker/Dockerfile .
# If this is building a git tag, also push the corresponding docker tag
- if [ -n "${CI_COMMIT_TAG}" ]; then docker tag "${CI_REGISTRY_IMAGE}:BUILD_${CI_COMMIT_SHORT_SHA}" "${CI_REGISTRY_IMAGE}:${CI_COMMIT_TAG}"; fi
- docker push --all-tags ${CI_REGISTRY_IMAGE}
artifacts:
expire_in: 45 minutes


buildcheck:
image: ${CI_REGISTRY_IMAGE}:latest
Expand Down Expand Up @@ -135,11 +132,11 @@ longtest:
pages:
image: ${CI_REGISTRY_IMAGE}:latest
stage: end
before_script:
- conda env create -n dataretrieval -f environment.yml
dependencies:
- build-image
- buildcheck
variables:
RETICULATE_PYTHON: /usr/bin/python3
script:
- |
Rscript -e '
Expand Down
96 changes: 51 additions & 45 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,54 +1,60 @@
FROM code.chs.usgs.gov:5001/ctek/docker/r-lang/r-base:4.6

# Change the name of this environment to something which pleases you, if you
# so please. But the name will not be relevant for most cases, as reticulate
# will be pointed to the environment no matter what it is named.
ARG CONDA_ENVIRONMENT_NAME=dataretrieval

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
wget \
# System dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-dev \
# These might already come with r-cran-sf binary, commenting out for now:
# libgdal-dev \
# libgeos-dev \
# libproj-dev \
&& rm -rf /var/lib/apt/lists/*

ENV CONDA_DIR="/root/conda"
ENV PATH=$CONDA_DIR/bin:$PATH

RUN wget -O Miniforge3.sh "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \
bash Miniforge3.sh -b -p "${HOME}/conda" && \
rm Miniforge3.sh
# Python dependencies
RUN pip3 install --no-cache-dir --break-system-packages \
dataretrieval \
matplotlib \
geopandas \
numpy \
pandas \
scipy \
folium>=0.12 \
mapclassify \
python-dateutil \
seaborn \
requests

# Necessary R libraries
RUN apt-get update -qq && apt-get -y --no-install-recommends install \
r-cran-rcmdcheck \
r-cran-testthat \
r-cran-covr \
r-cran-reticulate \
r-cran-curl \
r-cran-lubridate \
r-cran-xml2 \
r-cran-httr2 \
r-cran-whisker \
r-cran-dplyr \
r-cran-sf \
r-cran-data.table \
r-cran-jsonlite \
r-cran-readr \
r-cran-knitr \
r-cran-rmarkdown \
r-cran-dt \
r-cran-leaflet \
r-cran-readxl \
r-cran-pkgdown \
r-cran-ggplot2 \
r-cran-tidyr \
r-cran-purrr \
&& rm -rf /var/lib/apt/lists/*
# R dependencies
RUN apt-get update -qq && apt-get install -y --no-install-recommends \
r-cran-reticulate \
r-cran-curl \
r-cran-lubridate \
r-cran-xml2 \
r-cran-httr2 \
r-cran-dplyr \
r-cran-sf \
r-cran-ggplot2 \
r-cran-tidyr \
r-cran-purrr \
r-cran-jsonlite \
r-cran-knitr \
r-cran-rmarkdown \
r-cran-leaflet \
r-cran-data.table \
r-cran-readr \
r-cran-rcmdcheck \
r-cran-testthat \
r-cran-pkgdown \
r-cran-covr \
r-cran-readxl \
r-cran-dt \
&& rm -rf /var/lib/apt/lists/*

ENV RETICULATE_PYTHON=/root/conda/envs/${CONDA_ENVIRONMENT_NAME}/bin/python
ENV RETICULATE_PYTHON=/usr/bin/python3

COPY *.tar.gz /tmp/pkg.tar.gz

RUN set -eux; \
R CMD INSTALL /tmp/pkg.tar.gz && \
Rscript -e "library(dataRetrieval)" && \
rm -f /tmp/*.tar.gz
R CMD INSTALL /tmp/pkg.tar.gz && \
Rscript -e "library(dataRetrieval)" && \
rm -f /tmp/*.tar.gz
8 changes: 7 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
name: dataretrieval
channels:
- conda-forge
- defaults
dependencies:
- python>=3.10
- pip
- dataretrieval
- matplotlib
- matplotlib-base
- geopandas
- pyqt
- folium>=0.12
- mapclassify
prefix: /home/user/miniforge3/envs/dataretrieval
22 changes: 6 additions & 16 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
numpy<2
pandas==2.*
geopandas==1.1.2
scipy
python-dateutil
requests
requests-mock
coverage
pytest
flake8
sphinx
sphinx-rtd-theme
ipython
ipykernel
nbsphinx
nbsphinx_link
dataretrieval
matplotlib
geopandas
folium
mapclassify
seaborn

Loading
Loading