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
18 changes: 18 additions & 0 deletions .github/actions/setup-python-uv/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Setup Python and uv
description: |
Consistently installs python across this project. Should be used as a
replacement for direct calls to actions/setup-python.

Serves as the single place to update python versions over time across the
project.
outputs:
python-version:
description: Version of Python installed
value: ${{ steps.setup-python.outputs.python-version }}
runs:
using: composite
steps:
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.13'
- uses: astral-sh/setup-uv@557e51de59eb14aaaba2ed9621916900a91d50c6 # v6.6.1
3 changes: 3 additions & 0 deletions .github/workflows/golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python and uv
uses: ./.github/actions/setup-python-uv

- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python and uv
uses: ./.github/actions/setup-python-uv

- name: Set up Go
uses: actions/setup-go@v5
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/schema-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- uses: actions/checkout@v4
if: ${{ steps.check_pr.outputs.pr_count == '0' }}

- name: Set up Python and uv
uses: ./.github/actions/setup-python-uv

- name: Set up Go
uses: actions/setup-go@v5
if: ${{ steps.check_pr.outputs.pr_count == '0' }}
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,11 @@ generate.graphql: install.genqlient
### Generating Catalog API GraphQL Schema
.PHONY: generate.schema
generate.schema: schemagen-venv
$(SCHEMAGEN_VENV_BIN_DIR)/python3 scripts/generate-schema/generate-schema.py > internal/genpyxis/schema.graphql
uv --directory scripts/generate-schema run generate-schema.py > internal/genpyxis/schema.graphql

SCHEMAGEN_VENV_DIR = $(OUT_DIR)/generate-schema-venv
SCHEMAGEN_VENV_BIN_DIR = $(OUT_DIR)/generate-schema-venv/bin
.PHONY: schemagen-venv
schemagen-venv:
python3 -m venv $(SCHEMAGEN_VENV_DIR)
$(SCHEMAGEN_VENV_BIN_DIR)/pip3 install -r scripts/generate-schema/requirements.txt
uv --directory scripts/generate-schema sync --frozen

### Enforcing Project Standards
.PHONY: lint
Expand Down
8 changes: 8 additions & 0 deletions scripts/generate-schema/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[project]
name = "generate-schema"
version = "0.1.0"
requires-python = ">=3.13"
dependencies = [
"gql[aiohttp]>=4.0.0",
"graphql-core>=3.2.6",
]
3 changes: 0 additions & 3 deletions scripts/generate-schema/requirements.txt

This file was deleted.

328 changes: 328 additions & 0 deletions scripts/generate-schema/uv.lock

Large diffs are not rendered by default.