5monkeys / django-bananas

Django extensions the monkey way
MIT License
66 stars 17 forks source link

Env util helper `get_path` #73

Closed beshrkayali closed 1 year ago

beshrkayali commented 3 years ago

Based on a suggestion from @flaeppe, this adds a method to the environment parsing helper that allows parsing strings as a pathlib.Path.

github-actions[bot] commented 3 years ago

File Coverage Lines Branches Missing
All files 92% 97% 87% :white_check_mark:
bananas/__init__.py 79% 83% 75% :x: 19-20
bananas/models.py 97% 100% 95% :white_check_mark:
bananas/url.py 96% 100% 93% :white_check_mark:
bananas/admin/extension.py 93% 100% 86% :white_check_mark:
bananas/admin/api/i18n.py 90% 80% 100% :white_check_mark: 9
bananas/admin/api/mixins.py 68% 74% 63% :x: 70, 78-84, 94, 110, 117-128
bananas/admin/api/serializers.py 75% 100% 50% :x:
bananas/admin/api/versioning.py 91% 100% 83% :white_check_mark:
bananas/admin/api/views.py 99% 98% 100% :white_check_mark: 134
bananas/admin/api/schemas/base.py 87% 75% 100% :white_check_mark: 3
bananas/admin/api/schemas/yasg.py 88% 95% 82% :white_check_mark: 77, 86, 125-126
bananas/drf/fencing.py 87% 94% 80% :white_check_mark: 91-97, 136
bananas/management/commands/syncpermissions.py 87% 95% 80% :white_check_mark: 32

Minimum allowed coverage is 85%

Generated by :monkey: cobertura-action against f6c24aba3edf6003e339fc3bb430dc2992f6f0c7

antonagestam commented 3 years ago

I just recalled that this is the only thing we have type tests for, which is nice to have because it verifies that the exposed typing is correct. Would you mind adding a case for Path as well? https://github.com/5monkeys/django-bananas/blob/master/tests/test_env.yaml

antonagestam commented 3 years ago

We want to test that: