Skip to content

Commit

Permalink
ci ʘ‿ʘ
Browse files Browse the repository at this point in the history
  • Loading branch information
JaeAeich committed Jun 7, 2024
1 parent eb9da5a commit 5b0e58d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code_quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
with:
os: ${{ job.os }}
python-version: '3.11'
poetry-install-options: "--only=types --no-root"
poetry-export-options: "--only=types"
poetry-install-options: "--only=main --only=types --no-root"
poetry-export-options: "--only=main --only=types"

- name: Check types
run: poetry run mypy tesk/
Expand Down
3 changes: 2 additions & 1 deletion tesk/api/ga4gh/tes/base/base_tesk_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ def response(self) -> dict:
dict: Serialized response for the specific endpoint.
"""
_response = self.api_response()
assert isinstance(_response, BaseModel)
if not isinstance(_response, BaseModel):
raise TypeError('API response must be a Pydantic model.')
return _response.dict()
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,5 @@ def _hash_service_info_config(self) -> str:
if not self._service_info_present_in_config():
return ''
_service_info = self._get_service_info_present_in_config()
assert _service_info is not None
_config_to_hash = _service_info.json().encode('utf-8')
return sha256(_config_to_hash).hexdigest()
10 changes: 6 additions & 4 deletions tesk/tesk_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@


# TODO: Maybe TeskApp should be a singleton, and extend the Foca class, so that
# we can have a single instance of the app, and we can access the configuration
# and other attributes from the instance itself. This way we can avoid passing
# the configuration file path to the Foca class, and we can have a single point
# of access to the configuration and other attributes.
# we can have a single instance of the app, and we can access the
# configuration and other attributes from the instance itself.
# This way we can avoid passing the configuration file path to the Foca class,
# and we can have a single point of access to the configuration and
# other attributes.


class TeskApp:
"""TESK API class."""
Expand Down

0 comments on commit 5b0e58d

Please sign in to comment.