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

Modernize dictionaryutils jsonschema.RefResolver #30

Open
bwalsh opened this issue Dec 14, 2023 · 0 comments
Open

Modernize dictionaryutils jsonschema.RefResolver #30

bwalsh opened this issue Dec 14, 2023 · 0 comments

Comments

@bwalsh
Copy link
Contributor

bwalsh commented Dec 14, 2023

We have removed the dependency on gen3 by moving over the single class iceberg_tools used. dictionaryutils.DataDictionary. See https://ohsucomputationalbio.slack.com/archives/C043HPV0VMY/p1702501294219239 for rationale

However, the code we lifted over still uses a deprecated class jsonschema.RefResolver.
See the warnings displayed below.

As a low-priority task, it would be useful to modernize the resolution of schemas and possibly create a PR to the chicago dictionaryutils repo.

================================================================================ test session starts ================================================================================
platform darwin -- Python 3.9.18, pytest-7.4.0, pluggy-1.3.0
rootdir: /Users/walsbr/bmeg/iceberg-schema-tools
plugins: anyio-4.0.0, cov-4.1.0
collected 15 items                                                                                                                                                                  

tests/integration/simplified/test_codeable_concept.py .                                                                                                                       [  6%]
tests/integration/simplified/test_embedded_types.py .                                                                                                                         [ 13%]
tests/integration/simplified/test_identifiers.py .                                                                                                                            [ 20%]
tests/integration/simplified/test_individual_yaml.py .                                                                                                                        [ 26%]
tests/integration/simplified/test_keys.py .                                                                                                                                   [ 33%]
tests/integration/simplified/test_primitive.py ..                                                                                                                             [ 46%]
tests/integration/simplified/test_quantities.py .                                                                                                                             [ 53%]
tests/integration/simplified/test_research_study_has_project.py .                                                                                                             [ 60%]
tests/integration/simplified/test_schema.py ..                                                                                                                                [ 73%]
tests/integration/simplified/test_simplify_medication.py .                                                                                                                    [ 80%]
tests/integration/simplified/test_simplify_task.py .                                                                                                                          [ 86%]
tests/integration/simplified/test_specimen_plucked_properties.py .                                                                                                            [ 93%]
tests/integration/simplified/test_task.py .                                                                                                                                   [100%]

================================================================================= warnings summary ==================================================================================
iceberg_tools/dictionaryutils/__init__.py:7
iceberg_tools/dictionaryutils/__init__.py:7
  /Users/walsbr/bmeg/iceberg-schema-tools/iceberg_tools/dictionaryutils/__init__.py:7: DeprecationWarning: jsonschema.RefResolver is deprecated as of v4.18.0, in favor of the https://github.com/python-jsonschema/referencing library, which provides more compliant referencing behavior as well as more flexible APIs for customization. A future release will remove RefResolver. Please file a feature request (on referencing) if you are missing an API for the kind of customization you need.
    from jsonschema import RefResolver

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================== 15 passed, 2 warnings in 3.00s ===========================================================================
(```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants