Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
eecavanna opened this issue Jul 18, 2024 · 8 comments
Closed
Assignees
Labels
berkeley-schema Related to making the Runtime work with the Berkeley schema bug Something isn't working SMALL 1-3 days

Comments

@eecavanna
Copy link
Collaborator

eecavanna commented Jul 18, 2024

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='[email protected]', 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
Copy link
Contributor

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

@ssarrafan
Copy link
Contributor

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

@aclum
Copy link
Contributor

aclum commented Aug 7, 2024

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

@ssarrafan
Copy link
Contributor

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

@eecavanna eecavanna added this to the Berkeley schema compatibility 🤝 milestone Aug 12, 2024
dwinston added a commit that referenced this issue Aug 13, 2024
@PeopleMakeCulture PeopleMakeCulture self-assigned this Aug 14, 2024
@PeopleMakeCulture
Copy link
Collaborator

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

@PeopleMakeCulture
Copy link
Collaborator

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.

@PeopleMakeCulture PeopleMakeCulture changed the title berkeley: Fix failing test test_get_pi in tests/test_data/test_gold_translator.py berkeley: Fix failing tests in GOLD, NEON, and submission portal translators Aug 14, 2024
@PeopleMakeCulture PeopleMakeCulture added SMALL 1-3 days and removed X SMALL Less than 1 day labels Aug 14, 2024
dwinston added a commit that referenced this issue Aug 20, 2024
* Update test_gold_translator.py to add `type`

* Update test_gold_translator.py

remove extra bracket

* Update test_gold_translator.py

syntax fixes

* chore: format

* fix: pass `type` to constructor

closes #600

* fix: make test idempotent

* feat: more resilient test data loading

* fix: failing `test_get_samp_taxon_id`

* fix: `test_get_collection_date` requires timestampvalue type

* fix: add type to _get_quantity_value for gold & submission portal translators

* fix:_get_text_value

* update:test_get_controlled_term_value with comment

* fix:test_get_lat_lon types

* add types to _get_env_term_value

* add types to submission portal translator

* fix:broken neon translator tests

* add types for submission portal translator

* update doi getter

* feat: clear test dbs on `make down-test`

* fix: `test_get_doi`

* fix: partial fix for `test_get_dataset`

* add types to test data yaml

* add more types

* add credit assoc

* add person, study

* add type for env_package

* add types for mock submission object

* add types to translator

* skip three remaining failing tests

---------

Co-authored-by: Donny Winston <[email protected]>
Co-authored-by: Jing <[email protected]>
@aclum aclum moved this from 📝 Todo to 👀 In Review in Berkeley-Schema Refactor Roll Out Aug 20, 2024
@aclum aclum moved this from Todo to In Review in 2024 - Sprint 43 - August 12-23, 2024 Aug 20, 2024
@aclum
Copy link
Contributor

aclum commented Aug 22, 2024

@PeopleMakeCulture okay to close this?

@aclum
Copy link
Contributor

aclum commented Aug 23, 2024

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

@aclum aclum closed this as completed Aug 23, 2024
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in Berkeley-Schema Refactor Roll Out Aug 23, 2024
@eecavanna eecavanna removed this from the Berkeley schema compatibility 🤝 milestone Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
berkeley-schema Related to making the Runtime work with the Berkeley schema bug Something isn't working SMALL 1-3 days
Projects
Archived in project
Development

No branches or pull requests

5 participants