dandi / dandi-schema

Schemata for DANDI archive project
Apache License 2.0
5 stars 8 forks source link

OPT: (memory) cache schema files upon first read from github #213

Closed yarikoptic closed 5 months ago

yarikoptic commented 6 months ago

Transpired by looking at never finalized

as a much less intrusive and simpler approach to avoid repetitive requests for the same schema files.

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (a9d7f89) 97.71% compared to head (e780174) 97.72%. Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #213 +/- ## ======================================= Coverage 97.71% 97.72% ======================================= Files 17 17 Lines 1752 1755 +3 ======================================= + Hits 1712 1715 +3 Misses 40 40 ``` | [Flag](https://app.codecov.io/gh/dandi/dandi-schema/pull/213/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dandi) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/dandi/dandi-schema/pull/213/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dandi) | `97.72% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dandi#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

yarikoptic commented 6 months ago

FWIW restarted for errored out windows

================================== FAILURES ===================================
____________________________ test_datacite[000008] ____________________________
dandischema\tests\test_datacite.py:156: in test_datacite
    datacite_post(datacite, meta.doi)
dandischema\tests\test_datacite.py:30: in datacite_post
    rp.raise_for_status()
.tox\py\Lib\site-packages\requests\models.py:1021: in raise_for_status
    raise HTTPError(http_error_msg, response=self)
E   requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://api.test.datacite.org/dois

---------- coverage: platform win32, python 3.11.7-final-0 -----------
Coverage XML written to file coverage.xml
yarikoptic commented 5 months ago

was approved, so let's proceed