-
Notifications
You must be signed in to change notification settings - Fork 64
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
Migrate to uv #170
Migrate to uv #170
Changes from 18 commits
2e1101f
1d2f792
0addd68
716bee0
65fdbbd
e71ae36
7d04187
4f35070
041344b
867e7fd
e0d5a69
3e9417b
5d15e67
6c4420f
3652864
1058734
7044d9b
725f277
7bfe1d7
c9ceb45
c99cefe
f443083
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,22 @@ | ||
# Temporal Python SDK Samples | ||
|
||
This is the set of Python samples for the [Python SDK](https://github.com/temporalio/sdk-python). | ||
This is a collection of samples showing how to use the [Python SDK](https://github.com/temporalio/sdk-python). | ||
|
||
## Usage | ||
|
||
Prerequisites: | ||
|
||
* Python >= 3.9 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we leave the Python version constraints? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't want users thinking they have to install a special Python version. uv users should install python using
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Happy to clarify somewhere that they should run that command. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Right, "Python >= 3.9" just means "the software in this repository needs at least Python 3.9", it doesn't say how to install it or that it has to be any specific version. Our SDK and samples repo READMEs need to clarify which versions of Python they work with. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about this? c99cefe There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM |
||
* [Poetry](https://python-poetry.org) | ||
* [uv](https://docs.astral.sh/uv/) | ||
* [Temporal CLI installed](https://docs.temporal.io/cli#install) | ||
* [Local Temporal server running](https://docs.temporal.io/cli/server#start-dev) | ||
|
||
With this repository cloned, run the following at the root of the directory: | ||
|
||
poetry install | ||
uv sync | ||
|
||
That loads all required dependencies. Then to run a sample, usually you just run it in Python. For example: | ||
|
||
poetry run python hello/hello_activity.py | ||
uv run python hello/hello_activity.py | ||
|
||
Some examples require extra dependencies. See each sample's directory for specific instructions. | ||
|
||
|
@@ -81,7 +80,7 @@ Some examples require extra dependencies. See each sample's directory for specif | |
|
||
Running the tests requires `poe` to be installed. | ||
|
||
python -m pip install poethepoet | ||
uv tool install poethepoet | ||
|
||
Once you have `poe` installed you can run: | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure we really need this Python version checker code (or the
--python
on theuv sync
)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops yes, removed.