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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ARG VARIANT="3.9"
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}

USER vscode

COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

RUN echo "[[ -d .venv ]] && source .venv/bin/activate || export PATH=\$PATH" >> /home/vscode/.bashrc
43 changes: 43 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
{
"name": "Debian",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},

"postStartCommand": "uv sync --all-extras",

"customizations": {
"vscode": {
"extensions": [
"ms-python.python"
],
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"python.pythonPath": ".venv/bin/python",
"python.defaultInterpreterPath": ".venv/bin/python",
"python.typeChecking": "basic",
"terminal.integrated.env.linux": {
"PATH": "${env:PATH}"
}
}
}
},
"features": {
"ghcr.io/devcontainers/features/node:1": {}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
19 changes: 0 additions & 19 deletions .fern/metadata.json

This file was deleted.

6 changes: 0 additions & 6 deletions .fernignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# Files Fern must not overwrite or delete when regenerating this repo.
LICENSE
SECURITY.md
changelog.md
# Owned publishing: the PyPI trusted publisher registration is pinned to
# publish-pypi.yml + the `prod` environment and we lack owner access on the
# PyPI project to change it. ci.yml is Fern's copy with its publish job
# (environment `pypi`) stripped so it doesn't fail OIDC on every tag.
.github/workflows/ci.yml
.github/workflows/publish-pypi.yml
143 changes: 81 additions & 62 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,95 @@
# Fern's generated ci.yml, minus its publish job: that job publishes via a
# trusted publisher registered for ci.yml + environment `pypi`, which we can't
# create (no owner access on the PyPI project). Publishing happens in
# publish-pypi.yml instead, matching the existing registration.
# This file is listed in .fernignore so Fern regeneration preserves it.
name: ci

on: [push]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
name: CI
on:
push:
branches:
- '**'
- '!integrated/**'
- '!stl-preview-head/**'
- '!stl-preview-base/**'
- '!generated'
- '!codegen/**'
- 'codegen/stl/**'
pull_request:
branches-ignore:
- 'stl-preview-head/**'
- 'stl-preview-base/**'

jobs:
compile:
runs-on: ubuntu-latest
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
python-version: "3.10"
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
version: '0.10.2'

- name: Install dependencies
run: poetry install
- name: Compile
run: poetry run mypy .
test:
runs-on: ubuntu-latest
run: uv sync --all-extras

- name: Run lints
run: ./scripts/lint

build:
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
timeout-minutes: 10
name: build
permissions:
contents: read
id-token: write
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
python-version: "3.10"
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
version: '0.10.2'

- name: Install dependencies
run: poetry install
run: uv sync --all-extras

- name: Test
run: poetry run pytest -rP -n auto .
- name: Run build
run: uv build

- name: Install aiohttp extra
run: poetry install --extras aiohttp
- name: Get GitHub OIDC Token
if: |-
github.repository == 'stainless-sdks/vitable-connect-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Test (aiohttp)
run: poetry run pytest -rP -n auto -m aiohttp .
- name: Upload tarball
if: |-
github.repository == 'stainless-sdks/vitable-connect-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
run: ./scripts/utils/upload-artifact.sh

build:
name: Build distribution
runs-on: ubuntu-latest
test:
timeout-minutes: 10
name: test
runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Bootstrap poetry
run: |
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
- name: Install dependencies
run: poetry install
- name: Build package
run: poetry build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Install uv
uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2
with:
name: python-package-distributions
path: dist/
version: '0.10.2'

- name: Bootstrap
run: ./scripts/bootstrap

- name: Run tests
run: ./scripts/test
17 changes: 5 additions & 12 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
# Publishes the Fern-generated SDK to PyPI via OIDC trusted publishing. The
# PyPI project trusts this repo + this workflow file + the `prod` environment;
# do not rename any of the three without updating the registration.
# Publishes the Fern-generated SDK to PyPI via OIDC trusted publishing (the
# PyPI project trusts this repo + workflow file + `prod` environment; no
# token). Triggered when a GitHub release is published, or manually to
# re-publish after a failure.
#
# Triggers on tag pushes because Fern (github mode: release) creates tags, not
# GitHub releases. This file is listed in .fernignore so Fern regeneration
# preserves it.
# This file is listed in .fernignore so Fern regeneration preserves it.
name: Publish PyPI
on:
workflow_dispatch:

push:
tags:
# Fern tags bare semver (1.0.1); v-prefixed kept for manual tags.
- "[0-9]*"
- "v[0-9]*"

release:
types: [published]

Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release Doctor
on:
pull_request:
branches:
- main
workflow_dispatch:

jobs:
release_doctor:
name: release doctor
runs-on: ubuntu-latest
if: github.repository == 'Vitable-Inc/vitable-connect-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Check release environment
run: |
bash ./bin/check-release-environment
21 changes: 16 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
.mypy_cache/
.ruff_cache/
__pycache__/
dist/
poetry.toml
.prism.log
.stdy.log
_dev

__pycache__
.mypy_cache

dist

.venv
.idea

.env
.envrc
codegen.log
Brewfile.lock.json
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9.18
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.9.1"
}
4 changes: 4 additions & 0 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
configured_endpoints: 45
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/vitable/vitable-connect-c3a225d6201981c24180c285dd0d8a6ed97544f9e4e6a734130ead4231063f5e.yml
openapi_spec_hash: 05748169a4747ace4fcb717d9c87458c
config_hash: 0b4d62a9a1e0cc71998bcfc3d15c4db7
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.analysis.importFormat": "relative",
}
2 changes: 2 additions & 0 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
brew "uv"

Loading
Loading