Skip to content

Commit

Permalink
Merge pull request #12 from monarch-initiative/test-refactor-redux
Browse files Browse the repository at this point in the history
refactor tests
  • Loading branch information
cmungall authored Mar 22, 2023
2 parents d1b813c + d2d7d56 commit 9a3e13e
Show file tree
Hide file tree
Showing 33 changed files with 354 additions and 716 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/qc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8", "3.9", "3.10" ]
python-version: [ "3.9", "3.10" ]

steps:
- uses: actions/checkout@v3.0.2
Expand All @@ -26,12 +26,12 @@ jobs:
- name: Install dependencies
run: poetry install --no-interaction

- name: Check code quality with flake8
run: poetry run tox -e flake8
# - name: Check code quality with flake8
# run: poetry run tox -e flake8
# - name: Check package metadata with Pyroma
# run: poetry run tox -e pyroma
- name: Check static typing with MyPy
run: poetry run tox -e mypy
# - name: Check static typing with MyPy
# run: poetry run tox -e mypy

- name: Test with pytest and generate coverage file
run: poetry run tox -e py
- name: Unit tests only
run: poetry run python -m unittest discover tests.unit
3 changes: 2 additions & 1 deletion src/ontogpt/clients/openai_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class OpenAIClient:
api_key: str = None

def __post_init__(self):
self.api_key = get_apikey_value("openai")
if not self.api_key:
self.api_key = get_apikey_value("openai")
openai.api_key = self.api_key

def complete(self, prompt, **kwargs) -> str:
Expand Down
3 changes: 3 additions & 0 deletions src/ontogpt/templates/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from pathlib import Path

PATH_TO_TEMPLATES = Path(__file__).parent
Binary file modified tests/input/eds-output.pickle
Binary file not shown.
Binary file added tests/input/recipe-spaghetti.pickle
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 9a3e13e

Please sign in to comment.