Merge branch 'main' into bugfix/1965

This commit is contained in:
Emily Soth 2025-05-28 11:47:14 -07:00
commit e099870cc8
5 changed files with 45 additions and 18 deletions

View File

@ -2,6 +2,7 @@ name: Build containers
on:
workflow_dispatch:
pull_request:
push:
paths:
- 'docker/*'
@ -39,6 +40,8 @@ jobs:
packages: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: login to GitHub Container Registry
uses: docker/login-action@v2
@ -55,9 +58,7 @@ jobs:
run: |
# Replace / (invalid tag character) with .
SANITIZED_REF="$(echo ${{github.ref_name}} | sed 's|/|.|g')"
cd docker && docker build \
--build-arg="INVEST_REPO=${{ github.repository }}" \
--build-arg="INVEST_VERSION=${{ github.sha }}" \
docker build -f docker/Dockerfile \
-t ghcr.io/${{ github.repository_owner }}/${{ env.CONTAINER_NAME }}:latest \
-t ghcr.io/${{ github.repository_owner }}/${{ env.CONTAINER_NAME }}:${{ github.sha }} \
-t ghcr.io/${{ github.repository_owner }}/${{ env.CONTAINER_NAME }}:${SANITIZED_REF} \

View File

@ -65,6 +65,16 @@
Unreleased Changes
------------------
3.16.0a2 (2025-05-28)
---------------------
General
=======
* Fixed a micromamba command bug in 3.16.0a1 that was calling micromamba
directly, instead of using the path to the executable
(`#1965 <https://github.com/natcap/invest/issues/1965>`_).
3.16.0a1 (2025-05-28)
---------------------

View File

@ -1,26 +1,33 @@
# syntax=docker/dockerfile:1
# Build the InVEST wheel in a separate container stage
FROM debian:12.2 AS build
ARG INVEST_VERSION="main"
ARG INVEST_REPO="natcap/invest"
FROM debian:12.11 AS build
RUN apt update && apt install -y python3 python3-dev python3-pip python3-build build-essential git python3.11-venv libgdal-dev
RUN cd / && \
git clone https://github.com/${INVEST_REPO}.git && \
cd $(basename ${INVEST_REPO}) && \
git checkout ${INVEST_VERSION} && \
python3 -m build
# only copy in the files needed for building the wheel
ADD src /invest/src
ADD pyproject.toml /invest/pyproject.toml
ADD setup.py /invest/setup.py
ADD requirements.txt /invest/requirements.txt
ADD .git /invest/.git
RUN cd /invest && python3 -m build
# Create the container for distribution that has runtime dependencies.
FROM mambaorg/micromamba:1.5.0-bookworm-slim
FROM mambaorg/micromamba:2.1.1-debian12-slim
# Python version should match the version used in stage 1.
# If we update the stage 1 debian version, also update this python version
ARG PYTHON_VERSION="3.11"
COPY --from=build /invest/dist/*.whl /tmp/
# Define this to be the GDAL version used to build the InVEST wheel in the debian step.
# Check the debian package repo for the debian release above to confirm the version.
# Debian's GDAL version will undoubtedly be earlier than what's available in conda-forge.
ARG DEBIAN_GDAL_VERSION="3.6"
# The environment.yml file will be built during github actions.
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml
RUN micromamba install -y -n base -c conda-forge python==${PYTHON_VERSION} && \
COPY --chown=$MAMBA_USER:$MAMBA_USER docker/environment.yml /tmp/environment.yml
RUN micromamba install -y -n base -c conda-forge python==${PYTHON_VERSION} gdal=${DEBIAN_GDAL_VERSION} && \
micromamba install -y -n base -c conda-forge -f /tmp/environment.yml && \
micromamba clean --all --yes && \
/opt/conda/bin/python -m pip install /tmp/*.whl && \

View File

@ -56,9 +56,18 @@ The order of groups should be as follows:
6. InVEST model Z (model names should be sorted A-Z) -->
<!-- Unreleased Changes
------------------ -->
<section id="a2-2025-05-28">
<h1>3.16.0a2 (2025-05-28)</h1>
<section id="general">
<h2>General</h2>
<ul>
<li>Fixed a micromamba command bug in 3.16.0a1 that was calling micromamba directly, instead of using the path to the executable (<a href="https://github.com/natcap/invest/issues/1965">#1965</a>).</li>
</ul>
</section>
</section>
<section id="a1-2025-05-28">
<h1>3.16.0a1 (2025-05-28)</h1>
<section id="general">
<section id="general-1">
<h2>General</h2>
<ul>
<li>The workbench and the natcap.invest python package now support plugins.</li>
@ -119,7 +128,7 @@ The order of groups should be as follows:
</section>
<section id="section-1">
<h1>3.15.1 (2025-05-06)</h1>
<section id="general-1">
<section id="general-2">
<h2>General</h2>
<ul>
<li>Handle exceptions that can arise during <code>validation.check_spatial_overlap</code> when a layer's bounding box cannot be transformed to EPSG:4326. (<a href="https://github.com/natcap/invest/issues/1849">#1849</a>).</li>
@ -171,7 +180,7 @@ The order of groups should be as follows:
<li>InVEST model outputs now include metadata. Open the '.yml' files in a text editor to read and add to the metadata.</li>
</ul>
</section>
<section id="general-2">
<section id="general-3">
<h2>General</h2>
<ul>
<li>Fixed an issue where a user's PROJ_DATA environment variable could trigger a RuntimeError about a missing proj.db file. <a href="https://github.com/natcap/invest/issues/1742">https://github.com/natcap/invest/issues/1742</a></li>

View File

@ -1,6 +1,6 @@
{
"name": "invest-workbench",
"version": "3.16.0a1",
"version": "3.16.0a2",
"description": "Models that map and value the goods and services from nature that sustain and fulfill human life",
"main": "build/main/main.js",
"homepage": "./",