Skip to content

Commit 77a5255

Browse files
committed
chore: update SDK settings
1 parent 3b6b11e commit 77a5255

11 files changed

+226
-11
lines changed

.github/workflows/create-releases.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Create releases
2+
on:
3+
schedule:
4+
- cron: '0 5 * * *' # every day at 5am UTC
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
release:
11+
name: release
12+
if: github.ref == 'refs/heads/main' && github.repository == 'undefined/unitycatalog-python'
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: stainless-api/trigger-release-please@v1
19+
id: release
20+
with:
21+
repo: ${{ github.event.repository.full_name }}
22+
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}
23+
24+
- name: Install Rye
25+
if: ${{ steps.release.outputs.releases_created }}
26+
run: |
27+
curl -sSf https://rye.astral.sh/get | bash
28+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
29+
env:
30+
RYE_VERSION: 0.24.0
31+
RYE_INSTALL_OPTION: "--yes"
32+
33+
- name: Publish to PyPI
34+
if: ${{ steps.release.outputs.releases_created }}
35+
run: |
36+
bash ./bin/publish-pypi
37+
env:
38+
PYPI_TOKEN: ${{ secrets.UNITYCATALOG_PYPI_TOKEN || secrets.PYPI_TOKEN }}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Handle release PR title edits
2+
on:
3+
pull_request:
4+
types:
5+
- edited
6+
- unlabeled
7+
8+
jobs:
9+
update_pr_content:
10+
name: Update pull request content
11+
if: |
12+
((github.event.action == 'edited' && github.event.changes.title.from != github.event.pull_request.title) ||
13+
(github.event.action == 'unlabeled' && github.event.label.name == 'autorelease: custom version')) &&
14+
startsWith(github.event.pull_request.head.ref, 'release-please--') &&
15+
github.event.pull_request.state == 'open' &&
16+
github.event.sender.login != 'stainless-bot' &&
17+
github.event.sender.login != 'stainless-app' &&
18+
github.repository == 'undefined/unitycatalog-python'
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: stainless-api/trigger-release-please@v1
23+
with:
24+
repo: ${{ github.event.repository.full_name }}
25+
stainless-api-key: ${{ secrets.STAINLESS_API_KEY }}

.github/workflows/publish-pypi.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# workflow for re-running publishing to PyPI in case it fails for some reason
2+
# you can run this workflow by navigating to https://www.github.com/undefined/unitycatalog-python/actions/workflows/publish-pypi.yml
3+
name: Publish PyPI
4+
on:
5+
workflow_dispatch:
6+
7+
jobs:
8+
publish:
9+
name: publish
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Install Rye
16+
run: |
17+
curl -sSf https://rye.astral.sh/get | bash
18+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
19+
env:
20+
RYE_VERSION: 0.24.0
21+
RYE_INSTALL_OPTION: "--yes"
22+
23+
- name: Publish to PyPI
24+
run: |
25+
bash ./bin/publish-pypi
26+
env:
27+
PYPI_TOKEN: ${{ secrets.UNITYCATALOG_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.github/workflows/release-doctor.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release_doctor:
8+
name: release doctor
9+
runs-on: ubuntu-latest
10+
if: github.repository == 'undefined/unitycatalog-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Check release environment
16+
run: |
17+
bash ./bin/check-release-environment
18+
env:
19+
STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }}
20+
PYPI_TOKEN: ${{ secrets.UNITYCATALOG_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.1-alpha.0"
3+
}

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ If you’d like to use the repository from source, you can either install from g
5959
To install via git:
6060

6161
```bash
62-
pip install git+ssh://[email protected]/stainless-sdks/unitycatalog-python.git
62+
pip install git+ssh://[email protected]/undefined/unitycatalog-python.git
6363
```
6464

6565
Alternatively, you can build from source and install the wheel file:
@@ -117,7 +117,7 @@ the changes aren't made through the automated pipeline, you may want to make rel
117117

118118
### Publish with a GitHub workflow
119119

120-
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/stainless-sdks/unitycatalog-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
120+
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/undefined/unitycatalog-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
121121

122122
### Publish manually
123123

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ The REST API documentation can be found [on docs.unitycatalog.com](https://docs.
1515
## Installation
1616

1717
```sh
18-
# install from this staging repo
19-
pip install git+ssh://[email protected]/stainless-sdks/unitycatalog-python.git
18+
# install from the production repo
19+
pip install git+ssh://[email protected]/undefined/unitycatalog-python.git
2020
```
2121

2222
> [!NOTE]
@@ -205,9 +205,9 @@ catalog = response.parse() # get the object that `catalogs.create()` would have
205205
print(catalog.id)
206206
```
207207

208-
These methods return an [`APIResponse`](https://github.com/stainless-sdks/unitycatalog-python/tree/main/src/unitycatalog/_response.py) object.
208+
These methods return an [`APIResponse`](https://github.com/undefined/unitycatalog-python/tree/main/src/unitycatalog/_response.py) object.
209209

210-
The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/unitycatalog-python/tree/main/src/unitycatalog/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
210+
The async client returns an [`AsyncAPIResponse`](https://github.com/undefined/unitycatalog-python/tree/main/src/unitycatalog/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
211211

212212
#### `.with_streaming_response`
213213

@@ -297,7 +297,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
297297

298298
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
299299

300-
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/unitycatalog-python/issues) with questions, bugs, or suggestions.
300+
We are keen for your feedback; please open an [issue](https://www.github.com/undefined/unitycatalog-python/issues) with questions, bugs, or suggestions.
301301

302302
## Requirements
303303

bin/check-release-environment

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/usr/bin/env bash
2+
3+
warnings=()
4+
errors=()
5+
6+
if [ -z "${STAINLESS_API_KEY}" ]; then
7+
errors+=("The STAINLESS_API_KEY secret has not been set. Please contact Stainless for an API key & set it in your organization secrets on GitHub.")
8+
fi
9+
10+
if [ -z "${PYPI_TOKEN}" ]; then
11+
warnings+=("The UNITYCATALOG_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.")
12+
fi
13+
14+
lenWarnings=${#warnings[@]}
15+
16+
if [[ lenWarnings -gt 0 ]]; then
17+
echo -e "Found the following warnings in the release environment:\n"
18+
19+
for warning in "${warnings[@]}"; do
20+
echo -e "- $warning\n"
21+
done
22+
fi
23+
24+
lenErrors=${#errors[@]}
25+
26+
if [[ lenErrors -gt 0 ]]; then
27+
echo -e "Found the following errors in the release environment:\n"
28+
29+
for error in "${errors[@]}"; do
30+
echo -e "- $error\n"
31+
done
32+
33+
exit 1
34+
fi
35+
36+
echo "The environment is ready to push releases!"

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ classifiers = [
3939

4040

4141
[project.urls]
42-
Homepage = "https://github.com/stainless-sdks/unitycatalog-python"
43-
Repository = "https://github.com/stainless-sdks/unitycatalog-python"
42+
Homepage = "https://github.com/undefined/unitycatalog-python"
43+
Repository = "https://github.com/undefined/unitycatalog-python"
4444

4545

4646

@@ -108,7 +108,7 @@ path = "README.md"
108108
[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]]
109109
# replace relative links with absolute links
110110
pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)'
111-
replacement = '[\1](https://github.com/stainless-sdks/unitycatalog-python/tree/main/\g<2>)'
111+
replacement = '[\1](https://github.com/undefined/unitycatalog-python/tree/main/\g<2>)'
112112

113113
[tool.black]
114114
line-length = 120

release-please-config.json

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"packages": {
3+
".": {}
4+
},
5+
"$schema": "https://raw.githubusercontent.com/stainless-api/release-please/main/schemas/config.json",
6+
"include-v-in-tag": true,
7+
"include-component-in-tag": false,
8+
"versioning": "prerelease",
9+
"prerelease": true,
10+
"bump-minor-pre-major": true,
11+
"bump-patch-for-minor-pre-major": false,
12+
"pull-request-header": "Automated Release PR",
13+
"pull-request-title-pattern": "release: ${version}",
14+
"changelog-sections": [
15+
{
16+
"type": "feat",
17+
"section": "Features"
18+
},
19+
{
20+
"type": "fix",
21+
"section": "Bug Fixes"
22+
},
23+
{
24+
"type": "perf",
25+
"section": "Performance Improvements"
26+
},
27+
{
28+
"type": "revert",
29+
"section": "Reverts"
30+
},
31+
{
32+
"type": "chore",
33+
"section": "Chores"
34+
},
35+
{
36+
"type": "docs",
37+
"section": "Documentation"
38+
},
39+
{
40+
"type": "style",
41+
"section": "Styles"
42+
},
43+
{
44+
"type": "refactor",
45+
"section": "Refactors"
46+
},
47+
{
48+
"type": "test",
49+
"section": "Tests",
50+
"hidden": true
51+
},
52+
{
53+
"type": "build",
54+
"section": "Build System"
55+
},
56+
{
57+
"type": "ci",
58+
"section": "Continuous Integration",
59+
"hidden": true
60+
}
61+
],
62+
"release-type": "python",
63+
"extra-files": [
64+
"src/unitycatalog/_version.py"
65+
]
66+
}

src/unitycatalog/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "unitycatalog"
4-
__version__ = "0.0.1-alpha.0"
4+
__version__ = "0.0.1-alpha.0" # x-release-please-version

0 commit comments

Comments
 (0)