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
9 changes: 9 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG VARIANT="3.9"
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}

USER vscode

RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.44.0" RYE_INSTALL_OPTION="--yes" bash
ENV PATH=/home/vscode/.rye/shims:$PATH

RUN echo "[[ -d .venv ]] && source .venv/bin/activate || export PATH=\$PATH" >> /home/vscode/.bashrc
40 changes: 34 additions & 6 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,15 +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": "Development",
"image": "mcr.microsoft.com/devcontainers/typescript-node:latest",
"features": {
"ghcr.io/devcontainers/features/node:1": {}
"name": "Debian",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"postCreateCommand": "yarn install",

"postStartCommand": "rye sync --all-features",

"customizations": {
"vscode": {
"extensions": ["esbenp.prettier-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": "/home/vscode/.rye/shims:${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"
}
62 changes: 36 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,70 +16,80 @@ jobs:
lint:
timeout-minutes: 10
name: lint
runs-on: ${{ github.repository == 'stainless-sdks/brapi-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ github.repository == 'stainless-sdks/brapi-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Bootstrap
run: ./scripts/bootstrap
- name: Install dependencies
run: rye sync --all-features

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

build:
timeout-minutes: 5
name: build
runs-on: ${{ github.repository == 'stainless-sdks/brapi-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
timeout-minutes: 10
name: build
permissions:
contents: read
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/brapi-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Bootstrap
run: ./scripts/bootstrap
- name: Install dependencies
run: rye sync --all-features

- name: Check build
run: ./scripts/build
- name: Run build
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/brapi-typescript'
if: github.repository == 'stainless-sdks/brapi-python'
id: github-oidc
uses: actions/github-script@v6
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/brapi-typescript'
if: github.repository == 'stainless-sdks/brapi-python'
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
SHA: ${{ github.sha }}
run: ./scripts/utils/upload-artifact.sh

test:
timeout-minutes: 10
name: test
runs-on: ${{ github.repository == 'stainless-sdks/brapi-typescript' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
runs-on: ${{ github.repository == 'stainless-sdks/brapi-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Bootstrap
run: ./scripts/bootstrap
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/publish-npm.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow is triggered when a GitHub release is created.
# It can also be run manually to re-publish to PyPI in case it failed for some reason.
# You can run this workflow by navigating to https://www.github.com/brapi-dev/brapi-python/actions/workflows/publish-pypi.yml
name: Publish PyPI
on:
workflow_dispatch:

release:
types: [published]

jobs:
publish:
name: publish
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rye
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: '0.44.0'
RYE_INSTALL_OPTION: '--yes'

- name: Publish to PyPI
run: |
bash ./bin/publish-pypi
env:
PYPI_TOKEN: ${{ secrets.BRAPI_PYPI_TOKEN || secrets.PYPI_TOKEN }}
5 changes: 2 additions & 3 deletions .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
release_doctor:
name: release doctor
runs-on: ubuntu-latest
if: github.repository == 'brapi-dev/brapi-typescript' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
if: github.repository == 'brapi-dev/brapi-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4
Expand All @@ -18,5 +18,4 @@ jobs:
run: |
bash ./bin/check-release-environment
env:
NPM_TOKEN: ${{ secrets.BRAPI_NPM_TOKEN || secrets.NPM_TOKEN }}

PYPI_TOKEN: ${{ secrets.BRAPI_PYPI_TOKEN || secrets.PYPI_TOKEN }}
20 changes: 12 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
.prism.log
node_modules
yarn-error.log
codegen.log
Brewfile.lock.json
_dev

__pycache__
.mypy_cache

dist
dist-deno
/*.tgz
.idea/
.eslintcache

.venv
.idea

.env
.envrc
codegen.log
Brewfile.lock.json
7 changes: 0 additions & 7 deletions .prettierignore

This file was deleted.

7 changes: 0 additions & 7 deletions .prettierrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9.18
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.0.0"
}
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 11
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/alisson%2Fbrapi-bf7b0065e4057ae80522a943caa4967f1fe0aa0a6989122f5687788f39dfbdea.yml
openapi_spec_hash: 7ac81061bb9f3cb0c180b82b5ea83258
config_hash: 6487be1d01cb24761a4e2e60819d9f5a
config_hash: 6f10a67950f65bf850612b59838ad03b
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",
}
3 changes: 2 additions & 1 deletion Brewfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
brew "node"
brew "rye"

9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@

## 1.0.0 (2025-10-12)

Full Changelog: [v0.0.1...v1.0.0](https://github.com/brapi-dev/brapi-typescript/compare/v0.0.1...v1.0.0)
Full Changelog: [v0.0.1...v1.0.0](https://github.com/brapi-dev/brapi-python/compare/v0.0.1...v1.0.0)

### Chores

* update SDK settings ([551afe3](https://github.com/brapi-dev/brapi-typescript/commit/551afe39d139c11f6e6ace580ed8faa06217a073))
* update SDK settings ([14efeb5](https://github.com/brapi-dev/brapi-typescript/commit/14efeb558642ad68760ce354f10d6f37a1df7f68))
* sync repo ([a54d73b](https://github.com/brapi-dev/brapi-python/commit/a54d73b6e3d9e6f0347ff61d73885cf6cadb4c56))
* update SDK settings ([5313c1b](https://github.com/brapi-dev/brapi-python/commit/5313c1bccd7d4366b768ec14fa6a22cb0ebbefd0))
* update SDK settings ([604a534](https://github.com/brapi-dev/brapi-python/commit/604a534b7fc3daf6e9128a98e74aca9295a02c70))
* update SDK settings ([551afe3](https://github.com/brapi-dev/brapi-python/commit/551afe39d139c11f6e6ace580ed8faa06217a073))
* update SDK settings ([14efeb5](https://github.com/brapi-dev/brapi-python/commit/14efeb558642ad68760ce354f10d6f37a1df7f68))
Loading