-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update the existing example to use the new toolchain
- Loading branch information
1 parent
7127932
commit 18272a4
Showing
9 changed files
with
103 additions
and
830 deletions.
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
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Substrate GenerateText Examples | ||
|
||
To run this example, | ||
|
||
```bash | ||
# Set your API key as an environment variable. | ||
# Get one here https://www.substrate.run/dashboard/keys if this is your first time. | ||
export SUBSTRATE_API_KEY=<your Substrate API key> | ||
|
||
# Navigate to the python example directory. | ||
cd python | ||
``` | ||
|
||
To run the example with Poetry, uncomment the Poetry sections in `pyproject.toml` and run the following. | ||
|
||
```bash | ||
poetry install | ||
poetry run example | ||
poetry run example-multi | ||
``` | ||
|
||
To run the example with Rye, uncomment the Rye sections in `pyproject.toml` and run the following. | ||
|
||
```bash | ||
rye sync | ||
rye run example | ||
rye run example-multi | ||
``` |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[virtualenvs] | ||
in-project = true |
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 |
---|---|---|
@@ -0,0 +1,69 @@ | ||
[project] | ||
name = "example-generate-text" | ||
version = "0.1.0" | ||
description = "" | ||
authors = [{ name = "Ben Guo", email = "[email protected]" }] | ||
readme = "README.md" | ||
|
||
requires-python = ">= 3.9" | ||
dependencies = ["substrate"] | ||
|
||
[project.scripts] | ||
example = "generatetext.example:main" | ||
example-multi = "generatetext.example_multi:main" | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
output-format = "grouped" | ||
target-version = "py310" | ||
|
||
[tool.pyright] | ||
venvPath = "." | ||
venv = ".venv" | ||
|
||
############################## | ||
# Uncomment for Poetry support | ||
############################## | ||
|
||
# [build-system] | ||
# requires = ["poetry-core"] | ||
# build-backend = "poetry.core.masonry.api" | ||
|
||
# [tool.poetry] | ||
# name = "example-generate-text" | ||
# version = "0.1.0" | ||
# description = "" | ||
# authors = ["Ben Guo <[email protected]>"] | ||
# readme = "README.md" | ||
|
||
# packages = [{ include = "generatetext", from = "src" }] | ||
|
||
# [tool.poetry.dependencies] | ||
# python = "^3.9" | ||
# substrate = "220240617.*" | ||
|
||
# [tool.poetry.group.dev.dependencies] | ||
# ruff = "^0.6.1" | ||
# marimo = "^0.8.0" | ||
|
||
# [tool.poetry.scripts] | ||
# example = "generatetext.example:main" | ||
# example-multi = "generatetext.example_multi:main" | ||
|
||
########################### | ||
# Uncomment for Rye support | ||
########################### | ||
|
||
# [build-system] | ||
# requires = ["hatchling"] | ||
# build-backend = "hatchling.build" | ||
|
||
# [tool.rye] | ||
# managed = true | ||
# dev-dependencies = ["ruff>=0.6.1", "marimo>=0.8.0"] | ||
|
||
# [tool.hatch.metadata] | ||
# allow-direct-references = true | ||
|
||
# [tool.hatch.build.targets.wheel] | ||
# packages = ["src/generatetext"] |
Empty file.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.