Skip to content

Commit 57b4470

Browse files
Merge pull request #2 from FarquestSocial/release-please--branches--main--changes--next
release: 0.0.1-alpha
2 parents 916ef70 + 2003c65 commit 57b4470

10 files changed

Lines changed: 180 additions & 15 deletions

.github/workflows/publish-pypi.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to PyPI in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/FarquestSocial/farquest-python/actions/workflows/publish-pypi.yml
4+
name: Publish PyPI
5+
on:
6+
workflow_dispatch:
7+
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
name: publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install Rye
20+
run: |
21+
curl -sSf https://rye-up.com/get | bash
22+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
23+
env:
24+
RYE_VERSION: 0.24.0
25+
RYE_INSTALL_OPTION: "--yes"
26+
27+
- name: Publish to PyPI
28+
run: |
29+
bash ./bin/publish-pypi
30+
env:
31+
PYPI_TOKEN: ${{ secrets.FARQUEST_PYPI_TOKEN || secrets.PYPI_TOKEN }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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 == 'FarquestSocial/farquest-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+
PYPI_TOKEN: ${{ secrets.FARQUEST_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"
3+
}

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Changelog
2+
3+
## 0.0.1-alpha (2024-05-05)
4+
5+
Full Changelog: [v0.0.1-alpha.0...v0.0.1-alpha](https://github.com/FarquestSocial/farquest-python/compare/v0.0.1-alpha.0...v0.0.1-alpha)
6+
7+
### Features
8+
9+
* **api:** update via SDK Studio ([ee9f6fb](https://github.com/FarquestSocial/farquest-python/commit/ee9f6fb2bde61a54ddddad115fa5873f094bfcda))
10+
* **api:** update via SDK Studio ([6e5ee48](https://github.com/FarquestSocial/farquest-python/commit/6e5ee48d301b1495fb63e109e69e7097dfd6897d))
11+
12+
13+
### Chores
14+
15+
* go live ([#1](https://github.com/FarquestSocial/farquest-python/issues/1)) ([b256439](https://github.com/FarquestSocial/farquest-python/commit/b25643960aac819f1227263cf1bdc440b44e467e))
16+
* update SDK settings ([916ef70](https://github.com/FarquestSocial/farquest-python/commit/916ef7015a81403e410976cfbf5bd834f272f842))
17+
* update SDK settings ([#3](https://github.com/FarquestSocial/farquest-python/issues/3)) ([0b7314a](https://github.com/FarquestSocial/farquest-python/commit/0b7314a95efbcfbea974ae428e277e38aa7677c5))

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://git@github.com/stainless-sdks/farquest/farquest-python.git
62+
pip install git+ssh://git@github.com/FarquestSocial/farquest-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/farquest/farquest-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/FarquestSocial/farquest-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 & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,10 @@ The REST API documentation can be found [on docs.farquest.com](https://docs.farq
1515
## Installation
1616

1717
```sh
18-
# install from this staging repo
19-
pip install git+ssh://git@github.com/stainless-sdks/farquest/farquest-python.git
18+
# install from PyPI
19+
pip install --pre farquest
2020
```
2121

22-
> [!NOTE]
23-
> Once this package is [published to PyPI](https://app.stainlessapi.com/docs/guides/publish), this will become: `pip install --pre farquest`
24-
2522
## Usage
2623

2724
The full API of this library can be found in [api.md](api.md).
@@ -215,9 +212,9 @@ organization = response.parse() # get the object that `organizations.create()`
215212
print(organization)
216213
```
217214

218-
These methods return an [`APIResponse`](https://github.com/FarquestSocial/tree/main/src/farquest/_response.py) object.
215+
These methods return an [`APIResponse`](https://github.com/FarquestSocial/farquest-python/tree/main/src/farquest/_response.py) object.
219216

220-
The async client returns an [`AsyncAPIResponse`](https://github.com/FarquestSocial/tree/main/src/farquest/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
217+
The async client returns an [`AsyncAPIResponse`](https://github.com/FarquestSocial/farquest-python/tree/main/src/farquest/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
221218

222219
#### `.with_streaming_response`
223220

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

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

312-
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/farquest/farquest-python/issues) with questions, bugs, or suggestions.
309+
We are keen for your feedback; please open an [issue](https://www.github.com/FarquestSocial/farquest-python/issues) with questions, bugs, or suggestions.
313310

314311
## Requirements
315312

bin/check-release-environment

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

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "farquest"
3-
version = "0.0.1-alpha.0"
3+
version = "0.0.1-alpha"
44
description = "The official Python library for the farquest API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -39,8 +39,8 @@ classifiers = [
3939

4040

4141
[project.urls]
42-
Homepage = "https://github.com/stainless-sdks/farquest/farquest-python"
43-
Repository = "https://github.com/stainless-sdks/farquest/farquest-python"
42+
Homepage = "https://github.com/FarquestSocial/farquest-python"
43+
Repository = "https://github.com/FarquestSocial/farquest-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/FarquestSocial/tree/main/\g<2>)'
111+
replacement = '[\1](https://github.com/FarquestSocial/farquest-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/farquest/_version.py"
65+
]
66+
}

src/farquest/_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__ = "farquest"
4-
__version__ = "0.0.1-alpha.0"
4+
__version__ = "0.0.1-alpha" # x-release-please-version

0 commit comments

Comments
 (0)