-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:phelps-sg/openai-pygenerator
- Loading branch information
Showing
3 changed files
with
19 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,16 @@ | ||
# This workflow will upload a Python Package using Twine when a release is created | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: Upload Python Package | ||
|
||
# This workname: Python package | ||
on: | ||
release: | ||
types: [published] | ||
|
||
permissions: | ||
contents: read | ||
|
||
push: | ||
tags: | ||
- "v*.*.*" | ||
jobs: | ||
pypi-publish: | ||
name: Upload release to PyPI | ||
build: | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/openai-pygenerator | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- name: Install pypa/build | ||
run: >- | ||
python -m | ||
pip install | ||
build | ||
setuptools_scm | ||
--user | ||
- name: Build a binary wheel and a source tarball | ||
run: >- | ||
python -m | ||
build | ||
--sdist | ||
--wheel | ||
--outdir dist/ | ||
. | ||
- name: Publish package distributions to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
- uses: actions/checkout@v3 | ||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
with: | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
plugins: "poetry-dynamic-versioning[plugin]" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,14 +2,8 @@ | |
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"] | ||
build-backend = "poetry_dynamic_versioning.backend" | ||
|
||
[tool.setuptools.package-data] | ||
openai_pygenerator = ["py.typed"] | ||
|
||
[tool.setuptools_scm] | ||
write_to = "src/version.py" | ||
|
||
[tool.pytest.ini_options] | ||
pythonpath = "src" | ||
[tool.pytest.ini_optons] | ||
pythonpath = ["src"] | ||
|
||
[project] | ||
name = "openai-pygenerator" | ||
|
@@ -30,14 +24,15 @@ classifiers = [ | |
[project.urls] | ||
"Homepage" = "https://github.com/phelps-sg/openai-pygenerator" | ||
"Bug Tracker" = "https://github.com/phelps-sg/openai-pygenerator/issues" | ||
|
||
[tool.poetry] | ||
name = "openai-pygenerator" | ||
version = "0.1.0" | ||
version = "0.0.0" | ||
description = "Simple generator wrapper for OpenAI Python API with retry" | ||
authors = ["Steve Phelps <[email protected]>"] | ||
license = "MIT License" | ||
readme = "README.md" | ||
packages = [{include = "src/openai_pygenerator"}] | ||
packages = [{include="openai_pygenerator", from="src"}] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.8.1" | ||
|