diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a14a5f1..ac0da4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,8 +2,8 @@ name: Release on: push: - tags: - - "v*.*.*" + branches: + - main jobs: release: @@ -17,14 +17,11 @@ jobs: with: python-version: "3.12" - - name: Verify tag matches package version + - name: Read package version + id: version run: | - TAG_VERSION="${GITHUB_REF_NAME#v}" PKG_VERSION="$(python3 -c 'import tomllib; print(tomllib.load(open("pyproject.toml", "rb"))["project"]["version"])')" - if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then - echo "Tag $GITHUB_REF_NAME does not match pyproject.toml version $PKG_VERSION" - exit 1 - fi + echo "version=$PKG_VERSION" >> "$GITHUB_OUTPUT" - name: Install build tool run: pip install build @@ -35,5 +32,7 @@ jobs: - name: Create GitHub release uses: softprops/action-gh-release@v2 with: + tag_name: v${{ steps.version.outputs.version }} + name: v${{ steps.version.outputs.version }} files: dist/* generate_release_notes: true diff --git a/README.md b/README.md index 038cd9f..a6e8f7a 100644 --- a/README.md +++ b/README.md @@ -41,14 +41,14 @@ pytest 1. Update `version` in `pyproject.toml` (e.g. `0.2.0`). 2. Commit and push to `main`. -3. Tag the commit and push the tag: - ```bash - git tag v0.2.0 - git push origin v0.2.0 - ``` -4. The `Release` GitHub Actions workflow builds the package and publishes a - GitHub Release for the tag, with notes auto-generated from merged PRs since - the previous release (categorized via `.github/release.yml`). +3. The `Release` GitHub Actions workflow runs on every push to `main`: it reads + the version from `pyproject.toml`, builds the package, and publishes a + `v0.2.0` GitHub Release (creating the matching tag automatically), with + notes auto-generated from merged PRs since the previous release + (categorized via `.github/release.yml`). + + Pushing to `main` without bumping the version re-publishes the release for + the current version with the latest build artifacts. ## Install in JupyterLab diff --git a/pyproject.toml b/pyproject.toml index 12624a9..15ba9dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,8 @@ readme = "README.md" requires-python = ">=3.10" authors = [{ name = "EEA Data Hub" }] dependencies = [ - "pandas>=2.2,<3", - "pyarrow>=17,<22", # parquet writer + the Arrow types the ingest lane expects + #"pandas>=2.2,<3", + # "pyarrow>=17,<22", # parquet writer + the Arrow types the ingest lane expects "openpyxl>=3.1,<4", # .xlsx reader — handles sparse cells correctly (see bathing_water/README.md) "xlrd>=2.0,<3", # legacy .xls, some older SDI deliveries "lxml>=5.2,<7", # ISO 19115-3 metadata records diff --git a/requirements.txt b/requirements.txt index 736e739..ac6dcba 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -pandas>=2.2,<3 -pyarrow>=17,<22 # parquet writer + the Arrow types the ingest lane expects +#pandas>=2.2,<3 +#pyarrow>=17 # parquet writer + the Arrow types the ingest lane expects openpyxl>=3.1,<4 # .xlsx reader — handles sparse cells correctly (see bathing_water/README.md) xlrd>=2.0,<3 # legacy .xls, some older SDI deliveries lxml>=5.2,<7 # ISO 19115-3 metadata records @@ -15,9 +15,9 @@ pyproj>=3.6,<4 # only where a reprojection is a deliberate, documen # --- acquire --------------------------------------------------------------- requests>=2.32,<3 -httpx>=0.28,<1 # also the dds_ingest dependency -beautifulsoup4>=4.12,<5 # SDI "direct download" is an HTML landing page, not a file -tqdm>=4.66,<5 +#httpx>=0.28,<1 # also the dds_ingest dependency +#beautifulsoup4>=4.12,<5 # SDI "direct download" is an HTML landing page, not a file +#tqdm>=4.66,<5 # --- build backend for the mounted dds_ingest source ----------------------- # Present so the entrypoint can install /opt/dds_ingest offline, with