ncihtan / data-models

Schema.org Data Models for HTAN
MIT License
14 stars 7 forks source link

Fix Github action typing_extensions dependency erorr #377

Closed adamjtaylor closed 5 months ago

adamjtaylor commented 5 months ago

Our github actions are failing due to a typing_extensions error

for example https://github.com/ncihtan/data-models/actions/runs/8628156378/job/23649623895?pr=376

[...]
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/IPython/core/completer.py", line 219, in <module>
    from IPython.core.guarded_eval import guarded_eval, EvaluationContext
  File "/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/IPython/core/guarded_eval.py", line 40, in <module>
    from typing_extensions import TypeAliasType
ImportError: cannot import name 'TypeAliasType' from 'typing_extensions' (/opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/typing_extensions.py)

Relevant slack thread here: https://sagebionetworks.slack.com/archives/C01ANC02U59/p1712190013230959

This is a blocker for our current PRs as we use schematic in Github actions to both validate the structure of our csv and convert to JSON-LD

adamjtaylor commented 5 months ago

@aclayton555 this is a blocker for issues in our current sprint, so I am putting into the sprint for us to fix. @aditigopalan maybe you could take a look at this?

adamjtaylor commented 5 months ago

Fix per Slack

Ok, can you try installing ipython==8.18.1?

adamjtaylor commented 5 months ago

After some Jira archeology leading to FDS-511 it looks like I experienced this issue before back in June 2023: https://sagebionetworks.slack.com/archives/C01ANC02U59/p1685613308863559

aditigopalan commented 5 months ago

Installing ipython works! I ran the github actions command and it runs successfully with no errors: schematic schema convert .github/CSV.model.csv

Let me know if I need to push anything to main. Can run through in tomorrow's meeting!

adamjtaylor commented 5 months ago

If you can open a PR to update our workflows that would be superb.

adamjtaylor commented 5 months ago

We use schematic in the actions to both validate the csv contents, and then to convert to JSON-LD:

  1. https://github.com/ncihtan/data-models/blob/ecd512342fda05dded2f2f8aab9e86e00a15fdac/.github/workflows/ci-lint-validate-convert.yml#L42-L62
  2. https://github.com/ncihtan/data-models/blob/ecd512342fda05dded2f2f8aab9e86e00a15fdac/.github/workflows/ci-lint-validate-convert.yml#L71-L85