-
Notifications
You must be signed in to change notification settings - Fork 71
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
Fix pytest warnings: exemplars not matching schemas #1208
Comments
@sbillinge these warnings show entries that do not match the schemas^, do we edit the schemas to match? A number of these look like test cases that were designed to trigger the warnings? |
@tinatn29 a quick question, do all warnings originate from this unseen keys in the schema ? |
@bobleesj the first (top) two warning messages are different: Data Validation extension not supported and Unknown extension not supported, but I don't know what they mean... (ah sorry should've made this a separate issue!) |
Yes, if you could make separate issues for those, that would be good. So that our PRs become modular. |
A title sth along the line of |
ok! edited this one and will create another one for the other warnings. It will fix < 17 warnings because some of them are the different warnings 😅 so I left the number out for now |
I fixed most of the schema issues. Some that were left may have been coming from the tests. I will have to look. Don't spend too much time on these schema warnings until I look at them. |
Problem
Schema-related warnings when running
pytest
:src/regolith/tests/test_validate.py::test_validate_python
src/regolith/tests/test_validate.py::test_validate_bad_python
src/regolith/tests/test_validators.py::test_validation[grants]
src/regolith/tests/test_validators.py::test_exemplars[grants]
/Users/Baitong/My Drive/BGPostdoc/regolith/regolith/src/regolith/schemas.py:187: UserWarning: "researcher" is not in the preferred entries for "position", please consider changing this entry to conform or add this to the
eallowed
field in the schema.warn(
src/regolith/tests/test_validate.py::test_validate_python
/Users/Baitong/My Drive/BGPostdoc/regolith/regolith/src/regolith/schemas.py:187: UserWarning: "" is not in the preferred entries for "recommendation", please consider changing this entry to conform or add this to the
eallowed
field in the schema.warn(
src/regolith/tests/test_validate.py::test_validate_python
src/regolith/tests/test_validate.py::test_validate_bad_python
src/regolith/tests/test_validators.py::test_validation[expenses]
src/regolith/tests/test_validators.py::test_exemplars[expenses]
/Users/Baitong/My Drive/BGPostdoc/regolith/regolith/src/regolith/schemas.py:187: UserWarning: "bad_status" is not in the preferred entries for "status", please consider changing this entry to conform or add this to the
eallowed
field in the schema.warn(
src/regolith/tests/test_validate.py::test_validate_python
src/regolith/tests/test_validate.py::test_validate_bad_python
src/regolith/tests/test_validators.py::test_validation[people]
src/regolith/tests/test_validators.py::test_exemplars[people]
/Users/Baitong/My Drive/BGPostdoc/regolith/regolith/src/regolith/schemas.py:187: UserWarning: "janitor" is not in the preferred entries for "position", please consider changing this entry to conform or add this to the
eallowed
field in the schema.warn(
Proposed solution
Edit the schema to match or edit the entry in
exemplars.json
? We wonder if some of these might have been "wrong" entries by design to test the warnings... (e.g. our schemas may not need to include "bad_status" or "janitor")The text was updated successfully, but these errors were encountered: