microbiomedata / nmdc-runtime

Runtime system for NMDC data management and orchestration
https://microbiomedata.github.io/nmdc-runtime/
Other
5 stars 3 forks source link

`berkeley`: Fix failing tests in GOLD, NEON, and submission portal translators #600

Closed eecavanna closed 2 weeks ago

eecavanna commented 1 month ago

The test test_get_pi in tests/test_data/test_gold_translator.py is failing on the berkeley branch.

Here's an excerpt of the pytest output from the tip of the berkeley branch:

demo/metadata_migration/notebooks/test_helpers.py .                      [  0%]
tests/e2e/test_minter_api.py XXXX                                        [  4%]
tests/integration/test_minter_repository.py ....X...                     [ 12%]
tests/test_api/test_db_mongo.py .....                                    [ 17%]
tests/test_api/test_endpoints.py ss.....s.                               [ 25%]
tests/test_api/test_metadata.py ssss..                                   [ 31%]
tests/test_data/test_gold_translator.py F

...

tests/test_data/test_gold_translator.py:16: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
nmdc_runtime/site/translation/gold_translator.py:68: in _get_pi
    return nmdc.PersonValue(
<string>:10: in __init__
    ???
/usr/local/lib/python3.10/site-packages/nmdc_schema/nmdc.py:1058: in __post_init__
    super().__post_init__(**kwargs)
/usr/local/lib/python3.10/site-packages/nmdc_schema/nmdc.py:910: in __post_init__
    self.MissingRequiredField("type")
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = PersonValue(type=None, has_raw_value='Joan D. Berger', email='jdb@example.com', name='Joan D. Berger', orcid=None, profile_image_url=None, websites=[])
field_name = 'type'

    def MissingRequiredField(self, field_name: str) -> None:
        """ Generic loader error handler """
>       raise ValueError(f"{field_name} must be supplied")
E       ValueError: type must be supplied

/usr/local/lib/python3.10/site-packages/linkml_runtime/utils/yamlutils.py:278: ValueError

...

=========================== short test summary info ============================
FAILED tests/test_data/test_gold_translator.py::test_get_pi - ValueError: typ...
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
======= 1 failed, 21 passed, 7 skipped, 5 xpassed, 2 warnings in 18.82s ========

I will assign this to @sujaypatil96 for starters, based upon this comment.

ssarrafan commented 1 month ago

@sujaypatil96 what's the status of this? Are you actively working on this?

ssarrafan commented 1 month ago

It's relatively new so I'll move to new sprint. @sujaypatil96 let me know if you're not working on this.

aclum commented 1 month ago

Test has been updated but the _get_pi function needs to be updated.

ssarrafan commented 1 month ago

Discussed at infra sync today. Jing said she can help with this. I'm adding her to this issue and moving this to the next sprint. @aclum @PeopleMakeCulture @sujaypatil96

PeopleMakeCulture commented 4 weeks ago

@sujaypatil96 Is it cool if I take this issue off you're hands?

PeopleMakeCulture commented 4 weeks ago

I'm updating the issue name since there are a number of other tests failing in the berkeley schema - the tests are designed to stop after the first failure, but there's a couple dozen translator tests that are failing for various type issues.

aclum commented 2 weeks ago

@PeopleMakeCulture okay to close this?

aclum commented 2 weeks ago

I'm closing this for now, the linked PR was merged in. Please open new more specific tickets if needed.