Skip to content
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
70 changes: 32 additions & 38 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ name: Publish dea-tools to PyPI

on:
push:
branches:
- develop
branches: [develop, uv_publish]
paths:
- 'pyproject.toml'
- 'README_tools.md'
- 'Tools/**'
- '.github/workflows/publish.yml'
release:
Expand All @@ -16,42 +17,35 @@ jobs:
runs-on: ubuntu-latest

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Check out Git repository with full history
# Required for `hatchling-vcs` to get correct version
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.11' # Pin to <3.12 for compatibility with pip==22.0.4

- name: Get history and tags for SCM versioning
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: Build dea-tools
run: |
python3 -m pip install setuptools_scm build
python3 -m setuptools_scm
cd Tools
python3 -m pip install pip==22.0.4
python3 -m pip install --use-feature=in-tree-build --no-deps .
python3 -c "import dea_tools; print(dea_tools.__version__)"
python3 -m build

- name: pypi-publish
# You may pin to the exact commit or the version.
# uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
uses: pypa/[email protected]
python-version: "3.11"

- name: Install uv
uses: astral-sh/setup-uv@v2
with:
# PyPI access token
password: ${{ secrets.PYPI_API_TOKEN }}
# The target directory for distribution
packages_dir: Tools/dist
# Check metadata before uploading
verify_metadata: true
# Do not fail if a Python package distribution exists in the target package index
skip_existing: false
# Show verbose output.
verbose: true

version: "0.7.5"
enable-cache: "true"

# Setup Python environment with uv
- name: Setup Python environment and install dea-tools
run: uv sync

# Package will be built using version automatically
# generated from Git by `hatchling-vcs`
- name: Build package
run: uv build

# Publish to PyPI
- name: Publish package
run: uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
7 changes: 4 additions & 3 deletions .github/workflows/test_notebooks_entirerepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
name: Test entire repo against DEA Sandbox image

# This workflow tests the entire repository against DEA Sandbox "stable" image
# when Python code changes (i.e. DEA Tools changes) are proposed to the develop branch
# when Python code changes (i.e. DEA Tools changes) are proposed to develop branch

on:
# Run whenever a pull request to the develop branch modifies Python files
# in DEA Tools. This catches potential issues early before changes are merged
# Run whenever a pull request to the develop branch modifies the DEA Tools Python
# package. This catches potential issues early before changes are merged
pull_request:
branches:
- develop
paths:
- '**/*.py'
- 'pyproject.toml'

# Allow manual triggering through the GitHub UI
# Useful for on-demand testing or troubleshooting
Expand Down
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dependencies = [
"aiohttp>=3.5.0",
# "ciso8601>=2.2.0", # blocks Python 3.13 installation on Windows
"dask>=2023.1.0",
"dask-ml>=2021.10.17",
"dask-ml>=2023.3.24",
# "eo-tides>=0.7.4", # requires notebook updates
"fiona>=1.10.0",
"folium>=0.16.0",
Expand All @@ -42,6 +42,7 @@ dependencies = [
"joblib>=1.0.0",
"lxml>=5.0.0",
"matplotlib>=3.8.0",
"numba>=0.57.0",
"numpy>=1.26.0",
"odc-algo>=1.0.0",
"odc-geo[tiff]>=0.4.7",
Expand Down Expand Up @@ -207,6 +208,8 @@ DEP001 = [
"pyfes", # to fix with eo-tides refactor
"intertidal", # to fix with Sandbox upgrade
"osgeo", # ignore due to confusion with gdal package
"ipywidgets", # covered by jupyter metapackage
"IPython", # covered by jupyter metapackage
]
# Project should not contain unused dependencies
DEP002 = [
Expand All @@ -217,6 +220,7 @@ DEP002 = [
"planetary_computer", # included for STAC support
"eo-tides", # to fix with eo-tides refactor
"odc-ui", # ignore `odc.ui` not being recognised as `odc-ui`
"numba", # required to enforce minimum version of llvmlite
]
# Project should not use transitive dependencies
DEP003 = [
Expand Down
Loading