You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Blocked by #1061. Will probably have merge conflicts with #825 , #826 , #827
###Description of the Tech Debt###
In #333 we updated to django-ninja 1, but we ran into some trouble because 1 doesn't support foreign keys the same way the old one (0) does. The 0 way is deprecated but not broken, and there's some discussion with the maintainer about how foreign keys would work (@Sepehr-Sobhani do you have the link?), so we decided to leave the deprecated code in for now.
Most of the warnings come up when running the tests and these seem to be the main ones:
../../.cache/pypoetry/virtualenvs/registration-Ja4MI3ZB-py3.9/lib/python3.9/site-packages/pydantic/_internal/_config.py:272: 31 warnings
/home/briannacerkiewicz/.cache/pypoetry/virtualenvs/registration-Ja4MI3ZB-py3.9/lib/python3.9/site-packages/pydantic/_internal/_config.py:272: PydanticDeprecatedSince20: Support for class-based config is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.6/migration/
warnings.warn(DEPRECATION_MESSAGE, DeprecationWarning)
../../.cache/pypoetry/virtualenvs/registration-Ja4MI3ZB-py3.9/lib/python3.9/site-packages/ninja/orm/metaclass.py:90: 29 warnings
/home/briannacerkiewicz/.cache/pypoetry/virtualenvs/registration-Ja4MI3ZB-py3.9/lib/python3.9/site-packages/ninja/orm/metaclass.py:90: DeprecationWarning: The use of `Config` class is deprecated for ModelSchema, use 'Meta' instead
meta_conf = MetaConf.from_schema_class(name, namespace)
once we switch from Config to Meta, instead of "naics_code" in the schema it would have to change to "naics_code_id" (from "naics_code"), and this is going to affect both back and front ends
don't seem to be able to return more than one schema from a single endpoint. Eg, previously if an industry user was requesting operation data we'd give them some of it, and if it was a cas_user, they'd get all of it. We can't do this with schemas anymore so see resolve_operator validator
If there are other warnings, either address them as part of this card or make another if it looks like a big job.
###Tech Debt Triage#
The purpose of our technical debt triage process is to analyze technical debt to determine risk level of the technical debt and the value in tackling that technical debt.
Risk Value Scoring:
Level
Value
High
3
Medium
2
Low
1
Technical Debt - Risk Types
Level
Value
Business Area Risk - Risk of business area visibility / damage to user experience
Developer Fault Risk - How likely will this tech debt cause a future error related to coding on top of it
System Fault Risk - Risk of system errors or application downtime
Time Scale Risk - Compound risk effect if left alone. How much more difficult to fix or dangerous will this become over time?
Time Sink Risk - How much will this tech debt slow the development process down
TOTAL SCORE:
The text was updated successfully, but these errors were encountered:
I had originally written this ticket because I wasn't planning to change from Config to model_config etc. in the open PR. Have you addressed all of that in your commits?
Blocked by #1061. Will probably have merge conflicts with #825 , #826 , #827
###Description of the Tech Debt###
In #333 we updated to django-ninja 1, but we ran into some trouble because 1 doesn't support foreign keys the same way the old one (0) does. The 0 way is deprecated but not broken, and there's some discussion with the maintainer about how foreign keys would work (@Sepehr-Sobhani do you have the link?), so we decided to leave the deprecated code in for now.
Most of the warnings come up when running the tests and these seem to be the main ones:
Django-ninja and pydantic docs on fixing this. Notes:
Config
toMeta
, instead of "naics_code" in the schema it would have to change to "naics_code_id" (from "naics_code"), and this is going to affect both back and front endsresolve_operator
validatorIf there are other warnings, either address them as part of this card or make another if it looks like a big job.
###Tech Debt Triage#
The purpose of our technical debt triage process is to analyze technical debt to determine risk level of the technical debt and the value in tackling that technical debt.
Risk Value Scoring:
The text was updated successfully, but these errors were encountered: