Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
38 changes: 38 additions & 0 deletions .github/workflows/upstream.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Upstream

# Only on pushes to main, tags, or workflow dispatches
on:
push:
branches:
- main
tags:
- '*'
paths:
# Only run test and docker publish if some code have changed
- 'setup.py'
- 'setup.cfg'
- 'src/titiler/**'
- '.pre-commit-config.yaml'
- '.github/codecov.yml'
- 'dockerfiles/**'
workflow_dispatch:

jobs:
test-upstream:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.13']

steps:
- uses: actions/checkout@v5

- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}

- name: Test titiler.xarray
working-directory: src/titiler/xarray
run: |
uv run --group test --group upstream pytest --cov-report=xml --cov-append --cov-report=term-missing
4 changes: 4 additions & 0 deletions src/titiler/xarray/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ Here is the list of available options:
- **s3**: `s3fs`
- **http**: `aiohttp`

#### Dependencies

Titiler.xarray follows [SPEC 0](https://scientific-python.org/specs/spec-0000/), similar to [xarray](https://docs.xarray.dev/en/v2025.09.0/getting-started-guide/installing.html#minimum-dependency-versions).

## How To

```python
Expand Down
11 changes: 9 additions & 2 deletions src/titiler/xarray/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "titiler-xarray"
description = "Xarray plugin for TiTiler."
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maxrjones there is something I'm not sure to understand here

we set python>=3.11 but CI tests still run 3.10 in the matrix without any issue 😬

cc @hrodmn

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the tests are actually using a newer python in the uv virtual environment than the runner python specified in the matrix. Looking at https://github.com/developmentseed/titiler/actions/runs/18791545420/job/53622773007, I see:

================================ tests coverage ================================
_______________ coverage: platform linux, python 3.12.3-final-0 ________________

I can take a more detailed look later in the day if helpful.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah @vincentsarago I think you are missing these lines in your primary CI workflow to tell uv which python version to use:
https://github.com/maxrjones/titiler/blob/4b83b0009699626152ba1e2f8cbb671a369b686a/.github/workflows/upstream.yml#L25-L26

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we do have those line

python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.*"
enable-cache: true
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1254 shows the difference in behavior between the two configurations. the existing method does not seem to persist the specified python version across steps

authors = [
{name = "Vincent Sarago", email = "[email protected]"},
{name = "Aimee Barciauskas", email = "[email protected]"},
Expand All @@ -21,7 +21,6 @@ classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand Down Expand Up @@ -62,6 +61,7 @@ s3 = [
http = [
"aiohttp",
]
[dependency-groups]
test = [
"pytest",
"pytest-cov",
Expand All @@ -74,6 +74,13 @@ test = [
"aiohttp",
"requests",
]
upstream = [
'xarray @ git+https://github.com/pydata/xarray',
'universal_pathlib @ git+https://github.com/fsspec/universal_pathlib',
'numcodecs @ git+https://github.com/zarr-developers/numcodecs',
'ujson @ git+https://github.com/ultrajson/ultrajson',
'zarr @ git+https://github.com/zarr-developers/zarr-python',
]

[project.urls]
Homepage = "https://developmentseed.org/titiler/"
Expand Down
Loading