Closed 07pepa closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
e186814
) to head (e30ac0a
). Report is 4 commits behind head on main.:exclamation: Current head e30ac0a differs from pull request most recent head 1fff4e3. Consider uploading reports for the commit 1fff4e3 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hello @07pepa That's a great start for the PR, but we should now add Pydantic CoreSchema
& the validation - check here an example, also including a test for JSON schema - check here
Hello @07pepa That's a great start for the PR, but we should now add Pydantic
CoreSchema
& the validation - check here an example, also including a test for JSON schema - check here
I am not sure how/why to add this to literal (since it is supported by pydantic) also litteral is recomended for "enumerations" https://docs.pydantic.dev/latest/concepts/performance/#use-literal-not-enum
I am not sure what you want me to do. please tell me how to do it or just modify the code.. i am fine with that.
Only thing i would add now is a check if all codes are supported with help of some online source of truth (but that would complicate the test code considerably. and we would have to decide on source of truth
Hello @07pepa,
Thank you for your contribution! This PR is indeed valuable, particularly in terms of structuring the data. However, I'd like to propose an enhancement, we can use pycountry
for not only countries but also languages, this ensuring consistency and using existing resources already.
As we're already utilizing pycountry
for country data, integrating language support from pycountry
seems like a natural extension. By doing so, we can ensure uniformity and benefit from the robustness of pycountry
's language code support.
Here are some initial resources to help kickstart this integration:
Once we establish a similar structure as the one we have for countries in country.py
, we can seamlessly support language codes as well. This enhancement would be highly beneficial. Thank you for considering it! 🙏🏻
good point i will look in detail on monday
@yezz123 i am finished .... and test are passing (test are exhaustive)
can you add your input on this code or just merge it .... i will probably add curecies next
I added language definitions