Skip to content

Commit

Permalink
Merge pull request #7 from SpellcraftAI/dev
Browse files Browse the repository at this point in the history
DataFrame index, add column values to observation with `add()`, request timeouts
  • Loading branch information
ctjlewis authored Feb 13, 2024
2 parents d1fffb1 + 632069a commit 1fdf830
Show file tree
Hide file tree
Showing 10 changed files with 609 additions and 43 deletions.
47 changes: 30 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
name: Build, Test, Publish

on: push
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

jobs:
build:
name: Build distribution 📦
name: 📦 Build
runs-on: ubuntu-latest

steps:
Expand All @@ -14,11 +16,7 @@ jobs:
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
run: python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
Expand All @@ -27,12 +25,28 @@ jobs:
name: python-package-distributions
path: dist/

test:
name: 🔍 Test
runs-on: ubuntu-latest

needs:
- build

steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: python3 -m pip install pandas tqdm openai --user
- name: Install Pytest
run: python3 -m pip install pytest pytest-asyncio --user
- name: Run tests
run: pytest

publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
🛜 Publish to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
- test
runs-on: ubuntu-latest
environment:
name: pypi
Expand All @@ -41,7 +55,7 @@ jobs:
id-token: write

steps:
- name: Download all the dists
- name: Download the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
Expand All @@ -51,8 +65,7 @@ jobs:

github-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
✍️ Sign with Sigstore and Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest
Expand All @@ -62,7 +75,7 @@ jobs:
id-token: write

steps:
- name: Download all the dists
- name: Download the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
Expand Down Expand Up @@ -93,10 +106,10 @@ jobs:
--repo '${{ github.repository }}'
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
name: 🛜 Publish to TestPyPI
if: contains(github.ref, 'refs/heads/dev')
needs:
- build
- test
runs-on: ubuntu-latest

environment:
Expand All @@ -107,12 +120,12 @@ jobs:
id-token: write

steps:
- name: Download all the dists
- name: Download the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
Loading

0 comments on commit 1fdf830

Please sign in to comment.