From d942bb7c688825475886ec4146cf7fcbfa9dbc58 Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Wed, 16 Apr 2025 13:53:13 -0400 Subject: [PATCH 01/11] Bump up version number --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 07faa4e1..33b22931 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pc-datacatalog", - "version": "2025.4.2", + "version": "2025.4.3", "private": true, "proxy": "http://api:7071/", "dependencies": { From a575b93858d12d79a6a986598ecc1e17aa5d8c01 Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Wed, 16 Apr 2025 13:56:10 -0400 Subject: [PATCH 02/11] Bump up version number (#502) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 07faa4e1..33b22931 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pc-datacatalog", - "version": "2025.4.2", + "version": "2025.4.3", "private": true, "proxy": "http://api:7071/", "dependencies": { From 3c24fb74a884d4bddf0277588ea78f101ab1da10 Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Mon, 19 May 2025 12:35:19 -0400 Subject: [PATCH 03/11] 2025.5.1 Release (#505) * HLS2 Description tweak (#501) * Planetary Computer Pro announcement banner (#504) * Bump up version number * Bump up version number (#502) * Planetary computer pro announcement message bar * Also add message to home banner * format code * undo changes to home banner * 2025.5.1 --------- Co-authored-by: Marc Lichtman --- package.json | 2 +- src/components/Header/Header.index.tsx | 2 + .../PlanetaryComputerProAnnouncement.tsx | 37 +++++++++++++++++++ src/components/Header/styles.ts | 4 ++ src/config/datasetGroups.yml | 32 ++++++++-------- 5 files changed, 59 insertions(+), 18 deletions(-) create mode 100644 src/components/Header/components/PlanetaryComputerProAnnouncement.tsx diff --git a/package.json b/package.json index 33b22931..355cb650 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pc-datacatalog", - "version": "2025.4.3", + "version": "2025.5.1", "private": true, "proxy": "http://api:7071/", "dependencies": { diff --git a/src/components/Header/Header.index.tsx b/src/components/Header/Header.index.tsx index 501f4872..62d6dbc6 100644 --- a/src/components/Header/Header.index.tsx +++ b/src/components/Header/Header.index.tsx @@ -2,6 +2,7 @@ import { headerStyle } from "./styles"; import { gridContentStyle, offGridContentStyle } from "styles"; import { HeaderBar } from "./Header.Bar"; import { HeaderOverflow } from "./Header.Overflow"; +import { PlanetaryComputerProAnnouncement } from "./components/PlanetaryComputerProAnnouncement"; const Header = ({ onGrid = true }) => { const navClass = onGrid ? gridContentStyle : offGridContentStyle; @@ -12,6 +13,7 @@ const Header = ({ onGrid = true }) => { + ); }; diff --git a/src/components/Header/components/PlanetaryComputerProAnnouncement.tsx b/src/components/Header/components/PlanetaryComputerProAnnouncement.tsx new file mode 100644 index 00000000..8059f0e5 --- /dev/null +++ b/src/components/Header/components/PlanetaryComputerProAnnouncement.tsx @@ -0,0 +1,37 @@ +import { MessageBar, MessageBarType, Link } from "@fluentui/react"; +import { useState, useEffect } from "react"; +import { messageBarStyle } from "../styles"; + +const sessionStorageKey = "pcProMessageDismissed"; + +export function PlanetaryComputerProAnnouncement() { + const [isDismissed, setIsDismissed] = useState(false); + useEffect(() => { + const dismissed = sessionStorage.getItem(sessionStorageKey); + if (dismissed === "true") { + setIsDismissed(true); + } + }, []); + const onDismiss = () => { + sessionStorage.setItem(sessionStorageKey, "true"); + setIsDismissed(true); + }; + if (isDismissed) { + return null; + } + return ( + + Announcing Microsoft Planetary Computer Pro - Bring the power of the Planetary + Computer to your private geospatial data. + + Click here to learn more + + + ); +} diff --git a/src/components/Header/styles.ts b/src/components/Header/styles.ts index 9c9d4bf9..f94458f9 100644 --- a/src/components/Header/styles.ts +++ b/src/components/Header/styles.ts @@ -74,3 +74,7 @@ export const breakStyle = mergeStyles({ export const rightAligned = mergeStyles({ marginLeft: "auto !important", }); + +export const messageBarStyle = mergeStyles({ + margin: "10px 0", +}); diff --git a/src/config/datasetGroups.yml b/src/config/datasetGroups.yml index 5f2a6a55..0818ea4d 100644 --- a/src/config/datasetGroups.yml +++ b/src/config/datasetGroups.yml @@ -647,24 +647,22 @@ esa-cci-lc: hls2: title: Harmonized Landsat and Sentinel-2 (HLS) v2.0 short_description: > - Harmonized Landsat Sentinel-2 (HLS) Version 2.0 provides consistent surface - reflectance (SR) and top of atmosphere (TOA) brightness data from the Operational - Land Imager (OLI) aboard the joint NASA/USGS Landsat 8 satellite and the - Multi-Spectral Instrument (MSI) aboard the ESA (European Space Agency) - Sentinel-2A and Sentinel-2B satellites. + Harmonized Landsat Sentinel-2 (HLS) Version 2.0 provides consistent surface reflectance (SR) + and top of atmosphere (TOA) brightness data from the Operational Land Imager (OLI) aboard the + joint NASA/USGS Landsat 8 and Landsat 9 satellites and the Multi-Spectral Instrument (MSI) + aboard the ESA (European Space Agency) Sentinel-2A, Sentinel-2B, and Sentinel-2C satellites. description: > - Harmonized Landsat Sentinel-2 (HLS) Version 2.0 provides consistent surface - reflectance (SR) and top of atmosphere (TOA) brightness data from the Operational - Land Imager (OLI) aboard the joint NASA/USGS Landsat 8 satellite and the - Multi-Spectral Instrument (MSI) aboard the ESA (European Space Agency) - Sentinel-2A and Sentinel-2B satellites. The combined measurement enables global - observations of the land every 2-3 days at 30 meter (m) spatial resolution. - The HLSS30 and HLSL30 products are gridded to the same resolution and Military - Grid Reference System (MGRS) tiling and are “stackable” for time series analysis. - This dataset is in the form of [cloud-optimized GeoTIFFs](https://www.cogeo.org/). - The HLS v2.0 data is generated by NASA's IMPACT team at Marshall Space Flight Center. - The product latency is 1.7 days, from the satellite overpass to the HLS data - availability at LP DAAC. For more information see LP DAAC's + Harmonized Landsat Sentinel-2 (HLS) Version 2.0 provides consistent surface reflectance (SR) + and top of atmosphere (TOA) brightness data from the Operational Land Imager (OLI) aboard the + joint NASA/USGS Landsat 8 and Landsat 9 satellites and the Multi-Spectral Instrument (MSI) + aboard the ESA (European Space Agency) Sentinel-2A, Sentinel-2B, and Sentinel-2C satellites. + The combined measurement enables global observations of the land every 2-3 days at 30 meter + (m) spatial resolution. The HLS-S30 and HLS-L30 products are gridded to the same resolution and + Military Grid Reference System (MGRS) tiling system and are "stackable" for time series analysis. + This dataset is in the form of cloud-optimized GeoTIFFs. The HLS v2.0 data is generated by NASA's + IMPACT team at Marshall Space Flight Center. The product latency is 1.7 days, from the satellite + overpass to the HLS data availability at NASA's Land Processes Distributed Active Archive Center + (LP DAAC). For more information see LP DAAC's [HLS Overview](https://lpdaac.usgs.gov/data/get-started-data/collection-overview/missions/harmonized-landsat-sentinel-2-hls-overview/). assets: headerImg: From b58df233066346d5fb19bf90a116a4b8dcf27336 Mon Sep 17 00:00:00 2001 From: Manish Kumar Gupta Date: Thu, 31 Jul 2025 10:53:54 -0700 Subject: [PATCH 04/11] Release/2025.7.1 (#508) * HLS2 Description tweak (#501) * Planetary Computer Pro announcement banner (#504) * Bump up version number * Bump up version number (#502) * Planetary computer pro announcement message bar * Also add message to home banner * format code * undo changes to home banner * use sharedkey mechanism for authenticating to AzMaps (#507) * use sharedkey mechanism for authenticating to AzMaps * Add Azure Maps subscription key configuration to environment files * Add escape key functionality to close import dialog in explorer tests * 2025.7.1 --------- Co-authored-by: Marc Lichtman Co-authored-by: Gustavo Hidalgo --- .env.sample | 3 +++ ...e-static-web-apps-icy-meadow-0fc35e30f.yml | 1 + ...tatic-web-apps-thankful-sand-0ed34c70f.yml | 1 + ...tic-web-apps-wonderful-stone-06c70c70f.yml | 1 + api/map-token/__init__.py | 25 +++++++++++-------- cypress/e2e/explorer/selector.cy.js | 2 ++ docker-compose.yml | 1 + package.json | 2 +- src/pages/Explore/components/Map/index.tsx | 5 ++-- 9 files changed, 26 insertions(+), 15 deletions(-) diff --git a/.env.sample b/.env.sample index 0af0f2a8..ef56841f 100644 --- a/.env.sample +++ b/.env.sample @@ -16,5 +16,8 @@ REACT_APP_IMAGE_API_ROOT=https://planetarycomputer-staging.microsoft.com/api/f # Client Id for Azure Maps REACT_APP_AZMAPS_CLIENT_ID=8f49b6d6-5845-4e20-9015-9630df1ca8d2 +# Subscription Key for Azure Maps +REACT_APP_AZMAPS_KEY= + # URL for JHub cloned repo launch (including 'git-pull') REACT_APP_HUB_URL= diff --git a/.github/workflows/azure-static-web-apps-icy-meadow-0fc35e30f.yml b/.github/workflows/azure-static-web-apps-icy-meadow-0fc35e30f.yml index 73e1e325..1312bec8 100644 --- a/.github/workflows/azure-static-web-apps-icy-meadow-0fc35e30f.yml +++ b/.github/workflows/azure-static-web-apps-icy-meadow-0fc35e30f.yml @@ -25,6 +25,7 @@ jobs: REACT_APP_AZMAPS_CLIENT_ID: ${{ secrets.AZMAPS_CLIENT_ID }} REACT_APP_ONEDS_TENANT_KEY: ${{ secrets.ONEDS_TENANT_KEY }} REACT_APP_HUB_URL: ${{ secrets.HUB_URL }} + REACT_APP_AZMAPS_KEY: ${{ secrets.AZMAPS_KEY }} steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/azure-static-web-apps-thankful-sand-0ed34c70f.yml b/.github/workflows/azure-static-web-apps-thankful-sand-0ed34c70f.yml index 88b5273e..6f03c417 100644 --- a/.github/workflows/azure-static-web-apps-thankful-sand-0ed34c70f.yml +++ b/.github/workflows/azure-static-web-apps-thankful-sand-0ed34c70f.yml @@ -25,6 +25,7 @@ jobs: REACT_APP_AZMAPS_CLIENT_ID: ${{ secrets.AZMAPS_CLIENT_ID }} REACT_APP_ONEDS_TENANT_KEY: ${{ secrets.ONEDS_TENANT_KEY }} REACT_APP_HUB_URL: ${{ secrets.HUB_URL }} + REACT_APP_AZMAPS_KEY: ${{ secrets.AZMAPS_KEY }} steps: - uses: actions/checkout@v3 with: diff --git a/.github/workflows/azure-static-web-apps-wonderful-stone-06c70c70f.yml b/.github/workflows/azure-static-web-apps-wonderful-stone-06c70c70f.yml index 699c5537..545b9074 100644 --- a/.github/workflows/azure-static-web-apps-wonderful-stone-06c70c70f.yml +++ b/.github/workflows/azure-static-web-apps-wonderful-stone-06c70c70f.yml @@ -25,6 +25,7 @@ jobs: REACT_APP_AZMAPS_CLIENT_ID: ${{ secrets.AZMAPS_CLIENT_ID }} REACT_APP_ONEDS_TENANT_KEY: ${{ secrets.ONEDS_TENANT_KEY }} REACT_APP_HUB_URL: ${{ secrets.HUB_URL }} + REACT_APP_AZMAPS_KEY: ${{ secrets.AZMAPS_KEY }} steps: - uses: actions/checkout@v3 with: diff --git a/api/map-token/__init__.py b/api/map-token/__init__.py index 12021dc9..ca216d9e 100644 --- a/api/map-token/__init__.py +++ b/api/map-token/__init__.py @@ -25,14 +25,17 @@ class TokenResponse(TypedDict): def main(req: func.HttpRequest) -> func.HttpResponse: logger.debug("Python HTTP trigger function processed a request.") - try: - logger.debug("Getting azure maps token") - token = credential.get_token("https://atlas.microsoft.com/.default") - logger.debug("Token acquired") - - resp: TokenResponse = {"token": token.token, "expires_on": token.expires_on} - - return func.HttpResponse(status_code=200, body=json.dumps(resp)) - except ClientAuthenticationError: - logger.exception(f"Error getting azure maps token") - return func.HttpResponse("Error getting token", status_code=500) + # Comment out the implementation below and fail this call forcibly + return func.HttpResponse("This API is not implemented yet", status_code=501) + # Uncomment the implementation below to enable token retrieval + # try: + # logger.debug("Getting azure maps token") + # token = credential.get_token("https://atlas.microsoft.com/.default") + # logger.debug("Token acquired") + + # resp: TokenResponse = {"token": token.token, "expires_on": token.expires_on} + + # return func.HttpResponse(status_code=200, body=json.dumps(resp)) + # except ClientAuthenticationError: + # logger.exception(f"Error getting azure maps token") + # return func.HttpResponse("Error getting token", status_code=500) diff --git a/cypress/e2e/explorer/selector.cy.js b/cypress/e2e/explorer/selector.cy.js index 85398142..75ad94da 100644 --- a/cypress/e2e/explorer/selector.cy.js +++ b/cypress/e2e/explorer/selector.cy.js @@ -75,6 +75,8 @@ describe("Explorer selector tests", () => { cy.contains("import planetary_computer"); cy.contains("Copy"); + // Close the dialog with escape + cy.get("body").type("{esc}"); // Typing escape has closed the dialog cy.contains("import planetary_computer").should("not.exist"); diff --git a/docker-compose.yml b/docker-compose.yml index b4686b37..d1c448d3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,6 +17,7 @@ services: - REACT_APP_AZMAPS_CLIENT_ID - REACT_APP_ONEDS_TENANT_KEY - REACT_APP_HUB_URL + - REACT_APP_AZMAPS_KEY volumes: - .:/usr/src - ~/.npm:/root/.npm diff --git a/package.json b/package.json index 355cb650..a06749a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pc-datacatalog", - "version": "2025.5.1", + "version": "2025.7.1", "private": true, "proxy": "http://api:7071/", "dependencies": { diff --git a/src/pages/Explore/components/Map/index.tsx b/src/pages/Explore/components/Map/index.tsx index ba9b0122..5b15d2a6 100644 --- a/src/pages/Explore/components/Map/index.tsx +++ b/src/pages/Explore/components/Map/index.tsx @@ -59,9 +59,8 @@ const ExploreMap = () => { style: DEFAULT_MAP_STYLE, renderWorldCopies: true, authOptions: { - authType: atlas.AuthenticationType.anonymous, - clientId: AZMAPS_CLIENT_ID, - getToken: fetchMapToken, + authType: atlas.AuthenticationType.subscriptionKey, + subscriptionKey: process.env.REACT_APP_AZMAPS_KEY, }, transformRequest: addEntityHeader, }); From 6c12df6badeeb31ee15a965b2e9d865f1e229977 Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Mon, 12 Jan 2026 10:53:26 -0500 Subject: [PATCH 05/11] Test change --- src/config/datasets.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/datasets.yml b/src/config/datasets.yml index 8d623a12..edce560f 100644 --- a/src/config/datasets.yml +++ b/src/config/datasets.yml @@ -222,7 +222,7 @@ conus404: - title: Example Notebook src: conus404-example.html launch: datasets/conus404/conus404-example.ipynb - + cop-dem-glo-30: category: DEMs headerImg: ./images/cop-dem-glo-30-hero.png @@ -466,7 +466,7 @@ hgb: launch: datasets/hgb/hgb-example.ipynb hls2-s30: - category: Imagery + category: Imagery! tabs: - title: Example Notebook src: hls2-example.html From dc1c041d01a9cc510c0089c59bb7514bf4002a70 Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Tue, 13 Jan 2026 12:56:46 -0500 Subject: [PATCH 06/11] new script --- README.md | 39 +-------- scripts/release | 215 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 216 insertions(+), 38 deletions(-) create mode 100755 scripts/release diff --git a/README.md b/README.md index d4b98466..7a0e0590 100644 --- a/README.md +++ b/README.md @@ -175,44 +175,7 @@ initiate a build and deploy with the service framework: Opening a PR against either branch will also create an ephemeral staging environment, and a site link will be added to the PR comment section. -The release process can be managed with git flow, initialized with the default settings. To bring forth a production release, pull local `develop` and `main` to latest, and follow these steps: - -- Identify the latest release - -Use [CalVer](https://calver.org/) versioning. -If the latest release is `2024.2.3` then the next release will be `2024.2.4` if it's still february, otherwise `2024.3.1` or whatever month/year it happens to be when you are runnign releases. - -```bash -git tag | sort -``` - -- Start a release - -```bash -git flow release start X.Y.Z -``` - -- Bump the version number in `package.json` and check it in - -```bash -git status # check staging area is clean -git add package.json -git commit -m "X.Y.Z" -``` - -- Publish the release - -```bash -git flow release publish X.Y.Z -``` - -- Finish and push the release branch - - When prompted, keep default commit messages - - Use `X.Y.Z` as the tag message - -```bash -git flow release finish -p X.Y.Z -``` +The release process is orchestrated with the `scripts/release` script. ## Contributing diff --git a/scripts/release b/scripts/release new file mode 100755 index 00000000..ffed2b46 --- /dev/null +++ b/scripts/release @@ -0,0 +1,215 @@ +#!/bin/bash + +set -e + +function usage() { + echo -n "Usage: $(basename "$0") +Automate the release process using git flow and CalVer versioning. + +This script will: +1. Checkout the develop branch +2. Identify the latest release tag +3. Calculate the next CalVer version +4. Start a git flow release +5. Bump version in package.json +6. Publish and finish the release + +Options: +--help: Display this help message +" +} + +function error() { + echo "Error: $1" >&2 + exit 1 +} + +function confirm() { + local prompt="$1" + local response + read -r -p "$prompt [y/N]: " response + case "$response" in + [yY][eE][sS]|[yY]) + return 0 + ;; + *) + return 1 + ;; + esac +} + +function check_git_flow() { + if ! command -v git-flow &> /dev/null; then + error "git-flow is not installed. Please install it first: https://github.com/nvie/gitflow/wiki/Installation" + fi +} + +function check_clean_working_directory() { + if [[ -n $(git status --porcelain) ]]; then + error "Working directory is not clean. Please commit or stash your changes first." + fi +} + +function get_latest_tag() { + git tag | sort -V | tail -n 1 +} + +function calculate_next_version() { + local latest_tag="$1" + local current_year=$(date +%Y) + local current_month=$(date +%-m) + + if [[ -z "$latest_tag" ]]; then + echo "${current_year}.${current_month}.1" + return + fi + + # Parse the latest tag (format: YYYY.M.P) + if [[ $latest_tag =~ ^([0-9]{4})\.([0-9]+)\.([0-9]+)$ ]]; then + local tag_year="${BASH_REMATCH[1]}" + local tag_month="${BASH_REMATCH[2]}" + local tag_patch="${BASH_REMATCH[3]}" + + # If same year and month, increment patch + if [[ "$tag_year" == "$current_year" ]] && [[ "$tag_month" == "$current_month" ]]; then + echo "${current_year}.${current_month}.$((tag_patch + 1))" + else + # New month or year, reset patch to 1 + echo "${current_year}.${current_month}.1" + fi + else + error "Latest tag '$latest_tag' does not follow CalVer format (YYYY.M.P)" + fi +} + +function update_package_json_version() { + local version="$1" + + if [[ ! -f "package.json" ]]; then + error "package.json not found in current directory" + fi + + # Use Node.js to update the version in package.json + if command -v node &> /dev/null; then + node -e " + const fs = require('fs'); + const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8')); + pkg.version = '$version'; + fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); + " + else + # Fallback to sed if node is not available + sed -i.bak 's/"version": ".*"/"version": "'$version'"/' package.json && rm package.json.bak + fi + + echo "Updated package.json to version $version" +} + +function run_release() { + echo "=== Planetary Computer Data Catalog Release Process ===" + echo "" + + # Check prerequisites + check_git_flow + check_clean_working_directory + + # Step 1: Checkout develop branch + echo "Step 1: Checking out develop branch..." + git checkout develop + echo "Pulling latest changes from origin..." + git pull origin develop + echo "" + + # Step 2: Identify latest release + echo "Step 2: Identifying latest release..." + latest_tag=$(get_latest_tag) + if [[ -z "$latest_tag" ]]; then + echo "No existing tags found." + else + echo "Latest release tag: $latest_tag" + fi + echo "" + + # Step 3: Calculate next version + echo "Step 3: Calculating next version..." + next_version=$(calculate_next_version "$latest_tag") + echo "Next version will be: $next_version" + echo "" + + if ! confirm "Continue with version $next_version?"; then + echo "Release cancelled." + exit 0 + fi + echo "" + + # Step 4: Start git flow release + echo "Step 4: Starting git flow release..." + if ! git flow release start "$next_version"; then + error "Failed to start git flow release" + fi + echo "" + + # Step 5: Bump version in package.json + echo "Step 5: Updating version in package.json..." + update_package_json_version "$next_version" + + if ! confirm "Version updated in package.json. Review the changes and continue?"; then + echo "Release cancelled. You are still on the release branch." + echo "To abort, run: git flow release delete $next_version" + exit 0 + fi + + git add package.json + git commit -m "$next_version" + echo "" + + # Step 6: Publish release + echo "Step 6: Publishing release..." + if ! confirm "Publish release branch to origin?"; then + echo "Release not published. You are still on the release branch." + echo "To publish later, run: git flow release publish $next_version" + echo "To abort, run: git flow release delete $next_version" + exit 0 + fi + + if ! git flow release publish "$next_version"; then + error "Failed to publish git flow release" + fi + echo "" + + # Step 7: Finish release + echo "Step 7: Finishing and pushing release..." + echo "You will be prompted for commit messages. Keep the defaults." + echo "Use '$next_version' as the tag message." + echo "" + + if ! confirm "Ready to finish the release? This will merge to main and develop."; then + echo "Release not finished. The release branch has been published." + echo "To finish later, run: git flow release finish -p $next_version" + exit 0 + fi + + # Finish the release with push + # The -m flags provide default messages to avoid interactive prompts + if ! git flow release finish -p -m "Merge release $next_version" -m "$next_version" "$next_version"; then + error "Failed to finish git flow release. You may need to resolve conflicts manually." + fi + + echo "" + echo "=== Release $next_version completed successfully! ===" + echo "" + echo "The release has been:" + echo " - Merged to main and develop branches" + echo " - Tagged as $next_version" + echo " - Pushed to origin" + echo "" + echo "GitHub Actions will now build and deploy to production." +} + +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then + if [[ "${1:-}" == "--help" ]]; then + usage + else + run_release + fi +fi From 0ac577d5e254d9055f0f853a99fe3b0451e372ab Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Tue, 13 Jan 2026 13:02:52 -0500 Subject: [PATCH 07/11] Fix up --- scripts/release | 58 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/scripts/release b/scripts/release index ffed2b46..df890990 100755 --- a/scripts/release +++ b/scripts/release @@ -42,6 +42,19 @@ function check_git_flow() { if ! command -v git-flow &> /dev/null; then error "git-flow is not installed. Please install it first: https://github.com/nvie/gitflow/wiki/Installation" fi + + # Check for macOS and ensure GNU getopt is available + if [[ "$(uname)" == "Darwin" ]]; then + if ! command -v /usr/local/opt/gnu-getopt/bin/getopt &> /dev/null && ! command -v /opt/homebrew/opt/gnu-getopt/bin/getopt &> /dev/null; then + error "On macOS, git-flow requires GNU getopt. Install it with: brew install gnu-getopt" + fi + fi +} + +function check_gh_cli() { + if ! command -v gh &> /dev/null; then + error "GitHub CLI (gh) is not installed. Please install it first: https://cli.github.com/" + fi } function check_clean_working_directory() { @@ -111,6 +124,7 @@ function run_release() { # Check prerequisites check_git_flow + check_gh_cli check_clean_working_directory # Step 1: Checkout develop branch @@ -177,33 +191,43 @@ function run_release() { fi echo "" - # Step 7: Finish release - echo "Step 7: Finishing and pushing release..." - echo "You will be prompted for commit messages. Keep the defaults." - echo "Use '$next_version' as the tag message." + # Step 7: Create pull request to main + echo "Step 7: Creating pull request to main..." echo "" - if ! confirm "Ready to finish the release? This will merge to main and develop."; then - echo "Release not finished. The release branch has been published." - echo "To finish later, run: git flow release finish -p $next_version" + if ! confirm "Ready to create a pull request from release/$next_version to main?"; then + echo "Pull request not created. The release branch has been published." + echo "To create PR later, run: gh pr create --base main --head release/$next_version" exit 0 fi - # Finish the release with push - # The -m flags provide default messages to avoid interactive prompts - if ! git flow release finish -p -m "Merge release $next_version" -m "$next_version" "$next_version"; then - error "Failed to finish git flow release. You may need to resolve conflicts manually." + # Create PR to main branch + echo "Creating pull request..." + if ! gh pr create \ + --base main \ + --head "release/$next_version" \ + --title "Release $next_version" \ + --body "Automated release $next_version + +This release includes all changes from the develop branch. + +After merging: +- GitHub Actions will build and deploy to production +- The release will be tagged as $next_version +- Changes will need to be merged back to develop"; then + error "Failed to create pull request. You may need to check your GitHub CLI authentication." fi echo "" - echo "=== Release $next_version completed successfully! ===" + echo "=== Pull request for release $next_version created successfully! ===" echo "" - echo "The release has been:" - echo " - Merged to main and develop branches" - echo " - Tagged as $next_version" - echo " - Pushed to origin" + echo "Next steps:" + echo " 1. Review and merge the PR to main" + echo " 2. GitHub Actions will build and deploy to production" + echo " 3. After merge, the release will be tagged as $next_version" + echo " 4. Merge main back to develop to complete the release cycle" echo "" - echo "GitHub Actions will now build and deploy to production." + echo "View the PR with: gh pr view" } if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then From a0c6f2dafc29891dc9c8b552c3349a174a3c8c67 Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Tue, 13 Jan 2026 13:04:32 -0500 Subject: [PATCH 08/11] fixup --- scripts/release | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/scripts/release b/scripts/release index df890990..e972c077 100755 --- a/scripts/release +++ b/scripts/release @@ -158,8 +158,33 @@ function run_release() { # Step 4: Start git flow release echo "Step 4: Starting git flow release..." - if ! git flow release start "$next_version"; then - error "Failed to start git flow release" + if ! git flow release start "$next_version" 2>&1; then + # Check if there's an existing release branch + existing_release=$(git branch | grep "release/" | sed 's/^[ *]*//' | head -n 1) + if [[ -n "$existing_release" ]]; then + echo "" + echo "Found existing release branch: $existing_release" + if confirm "Delete the existing release branch and continue?"; then + echo "Deleting $existing_release..." + git checkout develop + git branch -D "$existing_release" || error "Failed to delete local branch $existing_release" + + # Try to delete remote branch if it exists + if git ls-remote --heads origin "$existing_release" | grep -q "$existing_release"; then + echo "Deleting remote branch..." + git push origin --delete "$existing_release" 2>/dev/null || echo "Note: Could not delete remote branch (may not exist or lack permissions)" + fi + + echo "Retrying release start..." + if ! git flow release start "$next_version"; then + error "Failed to start git flow release after cleanup" + fi + else + error "Cannot proceed with existing release branch. Please finish or delete it manually." + fi + else + error "Failed to start git flow release" + fi fi echo "" From 1291bef27b37a8470069f386ec23f5b3b920bd1a Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Tue, 13 Jan 2026 13:06:37 -0500 Subject: [PATCH 09/11] version opt --- scripts/release | 52 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 11 deletions(-) diff --git a/scripts/release b/scripts/release index e972c077..c2ee451d 100755 --- a/scripts/release +++ b/scripts/release @@ -3,18 +3,19 @@ set -e function usage() { - echo -n "Usage: $(basename "$0") + echo -n "Usage: $(basename "$0") [OPTIONS] Automate the release process using git flow and CalVer versioning. This script will: 1. Checkout the develop branch 2. Identify the latest release tag -3. Calculate the next CalVer version +3. Calculate the next CalVer version (or use provided version) 4. Start a git flow release 5. Bump version in package.json 6. Publish and finish the release Options: +--version VERSION: Specify a custom version instead of auto-calculating (format: YYYY.M.P) --help: Display this help message " } @@ -118,7 +119,8 @@ function update_package_json_version() { echo "Updated package.json to version $version" } -function run_release() { +funclocal custom_version="$1" + echo "=== Planetary Computer Data Catalog Release Process ===" echo "" @@ -144,9 +146,20 @@ function run_release() { fi echo "" - # Step 3: Calculate next version - echo "Step 3: Calculating next version..." - next_version=$(calculate_next_version "$latest_tag") + # Step 3: Determine next version + if [[ -n "$custom_version" ]]; then + echo "Step 3: Using custom version..." + # Validate custom version format + if [[ ! $custom_version =~ ^([0-9]{4})\.([0-9]+)\.([0-9]+)$ ]]; then + error "Custom version '$custom_version' does not follow CalVer format (YYYY.M.P)" + fi + next_version="$custom_version" + echo "Using version: $next_version" + else + echo "Step 3: Calculating next version..." + next_version=$(calculate_next_version "$latest_tag") + echo "Next version will be: $next_version" + fitest_tag") echo "Next version will be: $next_version" echo "" @@ -243,11 +256,28 @@ After merging: error "Failed to create pull request. You may need to check your GitHub CLI authentication." fi - echo "" - echo "=== Pull request for release $next_version created successfully! ===" - echo "" - echo "Next steps:" - echo " 1. Review and merge the PR to main" + custom_version="" + + while [[ $# -gt 0 ]]; do + case "$1" in + --help) + usage + exit 0 + ;; + --version) + if [[ -z "${2:-}" ]]; then + error "Missing value for --version option" + fi + custom_version="$2" + shift 2 + ;; + *) + error "Unknown option: $1" + ;; + esac + done + + run_release "$custom_version"ho " 1. Review and merge the PR to main" echo " 2. GitHub Actions will build and deploy to production" echo " 3. After merge, the release will be tagged as $next_version" echo " 4. Merge main back to develop to complete the release cycle" From 35788b2f740afd99a3a29e8ff06905e3e58bdd96 Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Tue, 13 Jan 2026 13:08:12 -0500 Subject: [PATCH 10/11] corruption --- scripts/release | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/scripts/release b/scripts/release index c2ee451d..343ea930 100755 --- a/scripts/release +++ b/scripts/release @@ -119,7 +119,8 @@ function update_package_json_version() { echo "Updated package.json to version $version" } -funclocal custom_version="$1" +function run_release() { + local custom_version="$1" echo "=== Planetary Computer Data Catalog Release Process ===" echo "" @@ -159,8 +160,7 @@ funclocal custom_version="$1" echo "Step 3: Calculating next version..." next_version=$(calculate_next_version "$latest_tag") echo "Next version will be: $next_version" - fitest_tag") - echo "Next version will be: $next_version" + fi echo "" if ! confirm "Continue with version $next_version?"; then @@ -256,6 +256,19 @@ After merging: error "Failed to create pull request. You may need to check your GitHub CLI authentication." fi + echo "" + echo "=== Pull request for release $next_version created successfully! ===" + echo "" + echo "Next steps:" + echo " 1. Review and merge the PR to main" + echo " 2. GitHub Actions will build and deploy to production" + echo " 3. After merge, the release will be tagged as $next_version" + echo " 4. Merge main back to develop to complete the release cycle" + echo "" + echo "View the PR with: gh pr view" +} + +if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then custom_version="" while [[ $# -gt 0 ]]; do @@ -277,18 +290,5 @@ After merging: esac done - run_release "$custom_version"ho " 1. Review and merge the PR to main" - echo " 2. GitHub Actions will build and deploy to production" - echo " 3. After merge, the release will be tagged as $next_version" - echo " 4. Merge main back to develop to complete the release cycle" - echo "" - echo "View the PR with: gh pr view" -} - -if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then - if [[ "${1:-}" == "--help" ]]; then - usage - else - run_release - fi + run_release "$custom_version" fi From 20b1786e888164d6c7a5cc3ec472400b854a85f0 Mon Sep 17 00:00:00 2001 From: Gustavo Hidalgo Date: Tue, 13 Jan 2026 13:12:09 -0500 Subject: [PATCH 11/11] undo --- src/config/datasets.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/config/datasets.yml b/src/config/datasets.yml index edce560f..c03dd15a 100644 --- a/src/config/datasets.yml +++ b/src/config/datasets.yml @@ -466,7 +466,7 @@ hgb: launch: datasets/hgb/hgb-example.ipynb hls2-s30: - category: Imagery! + category: Imagery tabs: - title: Example Notebook src: hls2-example.html @@ -553,6 +553,33 @@ landsat-c2-l2: landsat-8-c2-l2: isHidden: true +met-office-global-deterministic-whole-atmosphere: + isHidden: true + +met-office-global-deterministic-height: + isHidden: true + +met-office-global-deterministic-pressure: + isHidden: true + +met-office-global-deterministic-near-surface: + isHidden: true + +met-office-uk-deterministic-height: + isHidden: true + +met-office-uk-deterministic-whole-atmosphere: + isHidden: true + +met-office-uk-deterministic-pressure: + isHidden: true + +met-office-uk-deterministic-whole-atmosphere-: + isHidden: true + +met-office-uk-deterministic-near-surface: + isHidden: true + modis-09A1-061: category: Imagery headerImg: ./images/modis-09a1-hero.png