Skip to content
Open
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
69 changes: 69 additions & 0 deletions .github/workflows/python-frontend-compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: carta-frontend compatibility

on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
workflow_dispatch:

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest

steps:
- name: Checkout carta-python
uses: actions/checkout@v6

- name: Checkout carta-frontend checker
uses: actions/checkout@v6
with:
repository: CARTAvis/carta-frontend
ref: dev
path: carta-frontend
submodules: recursive

- name: Install uv and set Python version
uses: astral-sh/setup-uv@v7
with:
python-version: "3.11"
enable-cache: true

- name: Sync Python environment
run: uv sync --locked --no-group dev

- name: Generate carta-python manifests
run: |
uv run --no-sync python scripts/extract_api.py \
--check \
--write-manifest \
--output "$RUNNER_TEMP/carta-python-api.json"
uv run --no-sync python scripts/extract_enum.py \
--write-manifest \
--output "$RUNNER_TEMP/carta-python-enum.json"

- name: Install Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
cache-dependency-path: carta-frontend/package-lock.json

- name: Install carta-frontend dependencies
working-directory: carta-frontend
run: npm ci --ignore-scripts

- name: Build carta-frontend protobuf types
working-directory: carta-frontend
run: npm run build-protobuf

- name: Check carta-python API manifest
working-directory: carta-frontend
run: npm run check-python-api -- --manifest "$RUNNER_TEMP/carta-python-api.json"

- name: Check carta-python enum manifest
working-directory: carta-frontend
run: npm run check-python-enum -- --manifest "$RUNNER_TEMP/carta-python-enum.json"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ carta.egg-info
.pytest_cache
.ruff_cache
.venv
carta-python-api.json
carta-python-enum.json
6 changes: 3 additions & 3 deletions carta/color_blending.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ def set_raster_visible(self, state):
state : {0}
The desired visibility state.
"""
is_visible = self.get_value("rasterVisible")
is_visible = self.get_value("isRasterVisible")
if is_visible != state:
self.call_action("toggleRasterVisible")

Expand All @@ -528,7 +528,7 @@ def set_contour_visible(self, state):
state : {0}
The desired visibility state.
"""
is_visible = self.get_value("contourVisible")
is_visible = self.get_value("isContourVisible")
if is_visible != state:
self.call_action("toggleContourVisible")

Expand All @@ -541,7 +541,7 @@ def set_vector_overlay_visible(self, state):
state : {0}
The desired visibility state.
"""
is_visible = self.get_value("vectorOverlayVisible")
is_visible = self.get_value("isVectorOverlayVisible")
if is_visible != state:
self.call_action("toggleVectorOverlayVisible")

Expand Down
Loading
Loading