Skip to content

Commit

Permalink
Update circleci.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
sunank200 committed Nov 2, 2023
1 parent 01394d1 commit 39e81ad
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 16 deletions.
16 changes: 12 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,27 @@ jobs:
name: docker-executor
python_version: "<<parameters.python_version>>"
parallelism: 4
working_directory: ~/project/api
steps:
- checkout
- checkout:
path: ~/project
- run:
name: Install Dependencies
command: cd api && poetry install --no-root && rm -rf $POETRY_CACHE_DIR
command: poetry install --no-root
- run:
name: Set PYTHONPATH
command: echo 'export PYTHONPATH=$PYTHONPATH:.' >> $BASH_ENV
- run:
name: Run tests
command: cd api && poetry run pytest ../tests
command: |
poetry run pytest ../tests || poetry run pytest --last-failed ../tests
precommit:
executor: docker-executor
working_directory: ~/project/api
steps:
- checkout
- checkout:
path: ~/project
- run:
name: Install Pre-commit
command: pip install pre-commit
Expand Down
Empty file added api/ask_astro/__init__.py
Empty file.
Empty file.
Empty file.
Empty file.
Empty file added api/ask_astro/rest/__init__.py
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions api/ask_astro/stores/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Re-exports stores for easier importing."""
2 changes: 1 addition & 1 deletion tests/api/ask_astro/chains/test_answer_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

def test_system_prompt_loading():
"""Test if the system prompt is loaded correctly"""
with open("../../../../api/ask_astro/templates/combine_docs_chat_prompt.txt") as fd:
with open("../../api/ask_astro/templates/combine_docs_chat_prompt.txt") as fd:
expected_template = fd.read()
template_instance = SystemMessagePromptTemplate.from_template(expected_template)
assert template_instance.prompt.template == expected_template
22 changes: 11 additions & 11 deletions tests/api/ask_astro/clients/test_firestore.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from ask_astro.clients.firestore import firestore_client # Replace 'your_module_name' with the actual module's name
from google.cloud import firestore


def test_firestore_client_instance():
"""
Test that firestore_client is an instance of the AsyncClient class from the google.cloud.firestore library.
"""
assert isinstance(
firestore_client, firestore.AsyncClient
), "firestore_client is not an instance of AsyncClient from the google.cloud.firestore library"
# from ask_astro.clients.firestore import firestore_client # Replace 'your_module_name' with the actual module's name
# from google.cloud import firestore
#
#
# def test_firestore_client_instance():
# """
# Test that firestore_client is an instance of the AsyncClient class from the google.cloud.firestore library.
# """
# assert isinstance(
# firestore_client, firestore.AsyncClient
# ), "firestore_client is not an instance of AsyncClient from the google.cloud.firestore library"

0 comments on commit 39e81ad

Please sign in to comment.