Skip to content

Commit 486839b

Browse files
authored
Merge pull request #5 from DataMini/release-please--branches--main--changes--next
release: 3.1.0
2 parents 678813c + 298e32f commit 486839b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1247
-385
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "3.0.0"
2+
".": "3.1.0"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 68
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-bef7cc9067d22f118adcf91a2687ca2df91cc4c74892e764dea10d729f3b96ba.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/datamini%2Fasktable-f8d4f4ee9ccccf65054df0c205156f6022a8d207441b1494fa56bd950b44593b.yml

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# Changelog
22

3+
## 3.1.0 (2024-10-13)
4+
5+
Full Changelog: [v3.0.0...v3.1.0](https://github.com/DataMini/asktable-python/compare/v3.0.0...v3.1.0)
6+
7+
### Features
8+
9+
* **api:** api update ([#10](https://github.com/DataMini/asktable-python/issues/10)) ([4cbdddc](https://github.com/DataMini/asktable-python/commit/4cbdddc99448537b9bb986ce647ca048ab807413))
10+
* **api:** api update ([#11](https://github.com/DataMini/asktable-python/issues/11)) ([f8e9649](https://github.com/DataMini/asktable-python/commit/f8e9649d2d956ad02735ad67f107576d1d9a7b35))
11+
* **api:** api update ([#12](https://github.com/DataMini/asktable-python/issues/12)) ([8ac4185](https://github.com/DataMini/asktable-python/commit/8ac41859c959e8685213202e85d25b1280fca209))
12+
* **api:** api update ([#13](https://github.com/DataMini/asktable-python/issues/13)) ([c7f3137](https://github.com/DataMini/asktable-python/commit/c7f31371476e5896dcf230b95f7645f2b5fa42d0))
13+
* **api:** api update ([#7](https://github.com/DataMini/asktable-python/issues/7)) ([230366d](https://github.com/DataMini/asktable-python/commit/230366dd4f8c19062e7850df73220a025213e221))
14+
* **api:** api update ([#8](https://github.com/DataMini/asktable-python/issues/8)) ([234cd71](https://github.com/DataMini/asktable-python/commit/234cd71631cb05afac371bc2ad741514d71b15ab))
15+
* **api:** api update ([#9](https://github.com/DataMini/asktable-python/issues/9)) ([0956b01](https://github.com/DataMini/asktable-python/commit/0956b0100295717552c61de84b38900b57b36984))
16+
17+
18+
### Chores
19+
20+
* **internal:** codegen related update ([#4](https://github.com/DataMini/asktable-python/issues/4)) ([df56af1](https://github.com/DataMini/asktable-python/commit/df56af1e43756716339314650602d8cf3b00b781))
21+
* **internal:** codegen related update ([#6](https://github.com/DataMini/asktable-python/issues/6)) ([6403369](https://github.com/DataMini/asktable-python/commit/640336989f2bf2157a6817dccb06a7f030c45346))
22+
323
## 3.0.0 (2024-09-30)
424

525
Full Changelog: [v0.0.1-alpha.0...v3.0.0](https://github.com/DataMini/asktable-python/compare/v0.0.1-alpha.0...v3.0.0)

CONTRIBUTING.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@
22

33
### With Rye
44

5-
We use [Rye](https://rye.astral.sh/) to manage dependencies so we highly recommend [installing it](https://rye.astral.sh/guide/installation/) as it will automatically provision a Python environment with the expected Python version.
5+
We use [Rye](https://rye.astral.sh/) to manage dependencies because it will automatically provision a Python environment with the expected Python version. To set it up, run:
66

7-
After installing Rye, you'll just have to run this command:
7+
```sh
8+
$ ./scripts/bootstrap
9+
```
10+
11+
Or [install Rye manually](https://rye.astral.sh/guide/installation/) and run:
812

913
```sh
1014
$ rye sync --all-features
@@ -39,17 +43,17 @@ modify the contents of the `src/asktable/lib/` and `examples/` directories.
3943

4044
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to.
4145

42-
```bash
46+
```py
4347
# add an example to examples/<your-example>.py
4448

4549
#!/usr/bin/env -S rye run python
4650
4751
```
4852

49-
```
50-
chmod +x examples/<your-example>.py
53+
```sh
54+
$ chmod +x examples/<your-example>.py
5155
# run the example against your api
52-
./examples/<your-example>.py
56+
$ ./examples/<your-example>.py
5357
```
5458

5559
## Using the repository from source
@@ -58,8 +62,8 @@ If you’d like to use the repository from source, you can either install from g
5862

5963
To install via git:
6064

61-
```bash
62-
pip install git+ssh://git@github.com/DataMini/asktable-python.git
65+
```sh
66+
$ pip install git+ssh://git@github.com/DataMini/asktable-python.git
6367
```
6468

6569
Alternatively, you can build from source and install the wheel file:
@@ -68,29 +72,29 @@ Building this package will create two files in the `dist/` directory, a `.tar.gz
6872

6973
To create a distributable version of the library, all you have to do is run this command:
7074

71-
```bash
72-
rye build
75+
```sh
76+
$ rye build
7377
# or
74-
python -m build
78+
$ python -m build
7579
```
7680

7781
Then to install:
7882

7983
```sh
80-
pip install ./path-to-wheel-file.whl
84+
$ pip install ./path-to-wheel-file.whl
8185
```
8286

8387
## Running tests
8488

8589
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
8690

87-
```bash
91+
```sh
8892
# you will need npm installed
89-
npx prism mock path/to/your/openapi.yml
93+
$ npx prism mock path/to/your/openapi.yml
9094
```
9195

92-
```bash
93-
rye run pytest
96+
```sh
97+
$ ./scripts/test
9498
```
9599

96100
## Linting and formatting
@@ -100,14 +104,14 @@ This repository uses [ruff](https://github.com/astral-sh/ruff) and
100104

101105
To lint:
102106

103-
```bash
104-
rye run lint
107+
```sh
108+
$ ./scripts/lint
105109
```
106110

107111
To format and fix all ruff issues automatically:
108112

109-
```bash
110-
rye run format
113+
```sh
114+
$ ./scripts/format
111115
```
112116

113117
## Publishing and releases

README.md

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,8 @@ from asktable import Asktable
2828

2929
client = Asktable()
3030

31-
project = client.sys.projects.create(
32-
name="name",
33-
)
34-
print(project.id)
31+
datasource = client.datasources.list()
32+
print(datasource.items)
3533
```
3634

3735
While you can provide an `api_key` keyword argument,
@@ -51,10 +49,8 @@ client = AsyncAsktable()
5149

5250

5351
async def main() -> None:
54-
project = await client.sys.projects.create(
55-
name="name",
56-
)
57-
print(project.id)
52+
datasource = await client.datasources.list()
53+
print(datasource.items)
5854

5955

6056
asyncio.run(main())
@@ -87,8 +83,9 @@ from asktable import Asktable
8783
client = Asktable()
8884

8985
try:
90-
client.sys.projects.create(
91-
name="name",
86+
client.datasources.create(
87+
access_config={},
88+
engine="mysql",
9289
)
9390
except asktable.APIConnectionError as e:
9491
print("The server could not be reached")
@@ -132,8 +129,9 @@ client = Asktable(
132129
)
133130

134131
# Or, configure per-request:
135-
client.with_options(max_retries=5).sys.projects.create(
136-
name="name",
132+
client.with_options(max_retries=5).datasources.create(
133+
access_config={},
134+
engine="mysql",
137135
)
138136
```
139137

@@ -157,8 +155,9 @@ client = Asktable(
157155
)
158156

159157
# Override per-request:
160-
client.with_options(timeout=5.0).sys.projects.create(
161-
name="name",
158+
client.with_options(timeout=5.0).datasources.create(
159+
access_config={},
160+
engine="mysql",
162161
)
163162
```
164163

@@ -198,13 +197,14 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
198197
from asktable import Asktable
199198

200199
client = Asktable()
201-
response = client.sys.projects.with_raw_response.create(
202-
name="name",
200+
response = client.datasources.with_raw_response.create(
201+
access_config={},
202+
engine="mysql",
203203
)
204204
print(response.headers.get('X-My-Header'))
205205

206-
project = response.parse() # get the object that `sys.projects.create()` would have returned
207-
print(project.id)
206+
datasource = response.parse() # get the object that `datasources.create()` would have returned
207+
print(datasource.id)
208208
```
209209

210210
These methods return an [`APIResponse`](https://github.com/DataMini/asktable-python/tree/main/src/asktable/_response.py) object.
@@ -218,8 +218,9 @@ The above interface eagerly reads the full response body when you make the reque
218218
To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.
219219

220220
```python
221-
with client.sys.projects.with_streaming_response.create(
222-
name="name",
221+
with client.datasources.with_streaming_response.create(
222+
access_config={},
223+
engine="mysql",
223224
) as response:
224225
print(response.headers.get("X-My-Header"))
225226

@@ -321,3 +322,7 @@ print(asktable.__version__)
321322
## Requirements
322323

323324
Python 3.7 or higher.
325+
326+
## Contributing
327+
328+
See [the contributing documentation](./CONTRIBUTING.md).

0 commit comments

Comments
 (0)