elixir-cloud-aai / proTES

Proxy service for injecting middleware into GA4GH TES requests
Apache License 2.0
5 stars 6 forks source link

refactor: update code for type checks #169

Closed JaeAeich closed 3 months ago

JaeAeich commented 6 months ago

IMPORTANT: Please create an issue before filing a pull request! Changes need to be discussed before proceeding. Please read the contribution guidelines.

Details

This PR aims to add type-checking, partly addressing #116

JaeAeich commented 4 months ago

I'm not really sure about,

task_id = logs[0].metadata["remote_task_id"]

so ignored it atm, the error it gives is

pro_tes/ga4gh/tes/task_runs.py:391: error: Value of type "Metadata" is not indexable  [index]

which makes sense looking at the class definition of it, maybe I'm missing something :man_shrugging: !

PS: This is solved.

uniqueg commented 3 months ago

I'm not really sure about,

task_id = logs[0].metadata["remote_task_id"]

so ignored it atm, the error it gives is

pro_tes/ga4gh/tes/task_runs.py:391: error: Value of type "Metadata" is not indexable  [index]

which makes sense looking at the class definition of it, maybe I'm missing something 🤷‍♂️ !

PS: This is solved.

I guess this is where .metadata gets overridden, against the model definition. Not good. But I guess this code needs a good round of refactoring anyway.

Will leave this as is, with the type: ignore.