-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1195 from cloudflare/release-please--branches--ma…
…in--changes--next
- Loading branch information
Showing
3,102 changed files
with
199,152 additions
and
82,498 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -78,7 +78,8 @@ jobs: | |
- env: | ||
CLOUDFLARE_ACCOUNT_ID: f037e56e89293a057740de681ac9abbe | ||
CLOUDFLARE_EMAIL: [email protected] | ||
CLOUDFLARE_ZONE_ID: 0da42c8d2132a9ddaf714f9e7c92011 | ||
CLOUDFLARE_ZONE_ID: 0da42c8d2132a9ddaf714f9e7c920711 | ||
CLOUDFLARE_API_KEY: ${{ secrets.CLOUDFLARE_API_KEY }} | ||
run: | | ||
rye run python ./examples/workers/ai/demo.py | ||
rye run python ./examples/ai/demo.py | ||
rye run python ./examples/dns/record.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ name: Release Doctor | |
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "3.1.1" | ||
} | ||
".": "4.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
configured_endpoints: 1256 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-923d8c7667b68c786e6c026c4f4851798943c7d68ea055c0043d9253413c5847.yml | ||
configured_endpoints: 1493 | ||
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3d78f855257b55bbb80884f99c3802cae877968d140eed3557fcb2cdd5f937b3.yml |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,13 @@ | |
|
||
### With Rye | ||
|
||
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. | ||
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: | ||
|
||
After installing Rye, you'll just have to run this command: | ||
```sh | ||
$ ./scripts/bootstrap | ||
``` | ||
|
||
Or [install Rye manually](https://rye.astral.sh/guide/installation/) and run: | ||
|
||
```sh | ||
$ rye sync --all-features | ||
|
@@ -31,25 +35,25 @@ $ pip install -r requirements-dev.lock | |
|
||
## Modifying/Adding code | ||
|
||
Most of the SDK is generated code, and any modified code will be overridden on the next generation. The | ||
`src/cloudflare/lib/` and `examples/` directories are exceptions and will never be overridden. | ||
Most of the SDK is generated code. Modifications to code will be persisted between generations, but may | ||
result in merge conflicts between manual patches and changes from the generator. The generator will never | ||
modify the contents of the `src/cloudflare/lib/` and `examples/` directories. | ||
|
||
## Adding and running examples | ||
|
||
All files in the `examples/` directory are not modified by the Stainless generator and can be freely edited or | ||
added to. | ||
All files in the `examples/` directory are not modified by the generator and can be freely edited or added to. | ||
|
||
```bash | ||
```py | ||
# add an example to examples/<your-example>.py | ||
|
||
#!/usr/bin/env -S rye run python | ||
… | ||
``` | ||
|
||
``` | ||
chmod +x examples/<your-example>.py | ||
```sh | ||
$ chmod +x examples/<your-example>.py | ||
# run the example against your api | ||
./examples/<your-example>.py | ||
$ ./examples/<your-example>.py | ||
``` | ||
|
||
## 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 | |
|
||
To install via git: | ||
|
||
```bash | ||
pip install git+ssh://[email protected]/cloudflare/cloudflare-python.git | ||
```sh | ||
$ pip install git+ssh://[email protected]/cloudflare/cloudflare-python.git | ||
``` | ||
|
||
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 | |
|
||
To create a distributable version of the library, all you have to do is run this command: | ||
|
||
```bash | ||
rye build | ||
```sh | ||
$ rye build | ||
# or | ||
python -m build | ||
$ python -m build | ||
``` | ||
|
||
Then to install: | ||
|
||
```sh | ||
pip install ./path-to-wheel-file.whl | ||
$ pip install ./path-to-wheel-file.whl | ||
``` | ||
|
||
## Running tests | ||
|
||
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. | ||
|
||
```bash | ||
```sh | ||
# you will need npm installed | ||
npx prism mock path/to/your/openapi.yml | ||
$ npx prism mock path/to/your/openapi.yml | ||
``` | ||
|
||
```bash | ||
rye run pytest | ||
```sh | ||
$ ./scripts/test | ||
``` | ||
|
||
## Linting and formatting | ||
|
@@ -100,14 +104,14 @@ This repository uses [ruff](https://github.com/astral-sh/ruff) and | |
|
||
To lint: | ||
|
||
```bash | ||
rye run lint | ||
```sh | ||
$ ./scripts/lint | ||
``` | ||
|
||
To format and fix all ruff issues automatically: | ||
|
||
```bash | ||
rye run format | ||
```sh | ||
$ ./scripts/format | ||
``` | ||
|
||
## Publishing and releases | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Reporting Security Vulnerabilities | ||
|
||
Please see [this page](https://www.cloudflare.com/.well-known/security.txt) for information on how to report a vulnerability to Cloudflare. Thanks! | ||
Please see [this page](https://www.cloudflare.com/.well-known/security.txt) for information on how to report a vulnerability to Cloudflare. Thanks! |
Oops, something went wrong.