-
Notifications
You must be signed in to change notification settings - Fork 98
Addressing (some) stainless notion doc comments #264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
0e492d0
Added session create helper
monadoid f81c365
Using existing types
monadoid 5cbee8c
Showing only async python examples
monadoid cb804fc
docs show using uv
monadoid 823092d
Added local example
monadoid ba50c85
lint fix
monadoid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -14,22 +14,10 @@ Or [install uv manually](https://docs.astral.sh/uv/getting-started/installation/ | |
| $ uv sync --all-extras | ||
| ``` | ||
|
|
||
| You can then run scripts using `uv run python script.py` or by manually activating the virtual environment: | ||
| You can then run scripts using `uv run python script.py`: | ||
|
|
||
| ```sh | ||
| # manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work | ||
| $ source .venv/bin/activate | ||
|
|
||
| # now you can omit the `uv run` prefix | ||
| $ python script.py | ||
| ``` | ||
|
|
||
| ### Without `uv` | ||
|
|
||
| Alternatively if you don't want to install `uv`, you can stick with the standard `pip` setup by ensuring you have the Python version specified in `.python-version`, create a virtual environment however you desire and then install dependencies using this command: | ||
|
|
||
| ```sh | ||
| $ pip install -r requirements-dev.lock | ||
| uv run python script.py | ||
| ``` | ||
|
|
||
| ## Modifying/Adding code | ||
|
|
@@ -103,7 +91,7 @@ If you’d like to use the repository from source, you can either install from g | |
| To install via git: | ||
|
|
||
| ```sh | ||
| $ pip install git+ssh://[email protected]/browserbase/stagehand-python#stainless.git | ||
| uv run pip install git+ssh://[email protected]/browserbase/stagehand-python#stainless.git | ||
| ``` | ||
|
|
||
| Alternatively, you can build from source and install the wheel file: | ||
|
|
@@ -115,13 +103,13 @@ To create a distributable version of the library, all you have to do is run this | |
| ```sh | ||
| $ uv build | ||
| # or | ||
| $ python -m build | ||
| $ uv run python -m build | ||
| ``` | ||
|
|
||
| Then to install: | ||
|
|
||
| ```sh | ||
| $ pip install ./path-to-wheel-file.whl | ||
| uv run pip install ./path-to-wheel-file.whl | ||
monadoid marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| ## Running tests | ||
|
|
@@ -134,7 +122,7 @@ $ npx prism mock path/to/your/openapi.yml | |
| ``` | ||
|
|
||
| ```sh | ||
| $ ./scripts/test | ||
| $ uv run -- ./scripts/test | ||
| ``` | ||
|
|
||
| ## Linting and formatting | ||
|
|
@@ -145,13 +133,13 @@ This repository uses [ruff](https://github.com/astral-sh/ruff) and | |
| To lint: | ||
|
|
||
| ```sh | ||
| $ ./scripts/lint | ||
| $ uv run -- ./scripts/lint | ||
| ``` | ||
|
|
||
| To format and fix all ruff issues automatically: | ||
|
|
||
| ```sh | ||
| $ ./scripts/format | ||
| $ uv run -- ./scripts/format | ||
| ``` | ||
|
|
||
| ## Publishing and releases | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.