-
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 pull request #3 from Zipstack/feat/update-response-dict
feat: Updated response dict to use snake case
- Loading branch information
Showing
22 changed files
with
672 additions
and
32 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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Run tox tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
if: github.event.pull_request.draft == false | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Cache tox environments | ||
uses: actions/cache@v3 | ||
with: | ||
path: .tox/ | ||
key: ${{ runner.os }}-tox-${{ hashFiles('**/pyproject.toml', '**/tox.ini') }} | ||
restore-keys: | | ||
${{ runner.os }}-tox- | ||
- name: Install tox | ||
run: pip install tox | ||
|
||
- name: Create test env | ||
shell: bash | ||
run: | | ||
cp tests/sample.env tests/.env | ||
sed -i "s|LLMWHISPERER_API_KEY=|LLMWHISPERER_API_KEY=${{ secrets.LLMWHISPERER_API_KEY }}|" tests/.env | ||
- name: Run tox | ||
id: tox | ||
run: | | ||
tox | ||
- name: Render the report to the PR | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
header: llmw-py-client-test-report | ||
recreate: true | ||
path: llmw-py-client-report.md | ||
|
||
- name: Output reports to the job summary when tests fail | ||
shell: bash | ||
run: | | ||
if [ -f "llmw-py-client-report.md" ]; then | ||
{ | ||
echo "<details><summary>Worker Test Report</summary>" | ||
echo "" | ||
cat "llmw-py-client-report.md" | ||
echo "" | ||
echo "</details>" | ||
} >> "$GITHUB_STEP_SUMMARY" | ||
fi |
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 |
---|---|---|
|
@@ -50,6 +50,7 @@ coverage.xml | |
.hypothesis/ | ||
.pytest_cache/ | ||
cover/ | ||
*-report.md | ||
|
||
# Translations | ||
*.mo | ||
|
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
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
5 changes: 4 additions & 1 deletion
5
src/llmwhisperer/__init__.py → src/unstract/llmwhisperer/__init__.py
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
File renamed without changes.
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,17 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
from unstract.llmwhisperer.client import LLMWhispererClient | ||
|
||
|
||
@pytest.fixture(name="client") | ||
def llm_whisperer_client(): | ||
# Create an instance of the client | ||
client = LLMWhispererClient() | ||
return client | ||
|
||
|
||
@pytest.fixture(name="data_dir", scope="session") | ||
def test_data_dir(): | ||
return os.path.join(os.path.dirname(__file__), "test_data") |
File renamed without changes.
Oops, something went wrong.