Closed Stephen-ONeil closed 1 year ago
Coverage Report
File Stmts Miss Cover Missing phac_aspc/django excel.py 148 28 81% 17–18, 49, 71, 81, 85, 119–121, 125–129, 132–133, 162, 170, 187–188, 214, 217, 219, 221, 224, 230, 236, 255–256, 263–264 fields.py 79 16 80% 46, 67–80, 102–105, 120–125, 128–132 phac_aspc/django/admin/decorators admin_decorators.py 18 2 89% 37–38 phac_aspc/django/helpers/auth backend.py 28 28 0% 2–36 views.py 44 27 39% 21, 26–29, 34–42, 47–99 phac_aspc/django/helpers/locale code.py 8 3 62% 10, 13–14 phac_aspc/django/helpers/templatetags phac_aspc_auth.py 7 1 86% 13 phac_aspc_jinja_include.py 12 1 92% 31 phac_aspc_localization.py 11 4 64% 11, 26–29 phac_aspc/django/helpers/views wet.py 10 6 40% 12–19 phac_aspc/django/localization hooks.py 6 6 0% 2–16 phac_aspc/django/localization/decorators __init__.py 2 2 0% 4–6 localization_decorators.py 11 11 0% 4–46 phac_aspc/django/settings security.py 25 12 52% 41–69 utils.py 54 2 96% 103, 154 TOTAL 574 149 74%
Tests | Skipped | Failures | Errors | Time |
---|---|---|---|---|
20 | 0 :zzz: | 0 :x: | 0 :fire: | 2.004s :stopwatch: |
This is cool! Can we also do it the other way around? I think it'll be more common to use 3rd party DTL inclusions in our 1st party jinja templates
Alright, I'll write the reverse version too.
Getting a pretty obtuse error in python 3.8 and 3.9. Do we need to support those still?
I think we can drop support, no projects are using 3.8/3.9. We should be using 3.11 everywhere, though some dev environments might be using 3.10
Coverage Report
File Stmts Miss Cover Missing phac_aspc/django excel.py 148 28 81% 17–18, 49, 71, 81, 85, 119–121, 125–129, 132–133, 162, 170, 187–188, 214, 217, 219, 221, 224, 230, 236, 255–256, 263–264 fields.py 79 16 80% 46, 67–80, 102–105, 120–125, 128–132 phac_aspc/django/admin/decorators admin_decorators.py 18 2 89% 37–38 phac_aspc/django/helpers jinja_dtl_interop_utils.py 7 1 86% 21 phac_aspc/django/helpers/auth backend.py 28 28 0% 2–36 views.py 44 27 39% 21, 26–29, 34–42, 47–99 phac_aspc/django/helpers/locale code.py 8 3 62% 10, 13–14 phac_aspc/django/helpers/templatetags phac_aspc_auth.py 7 1 86% 13 phac_aspc_localization.py 11 4 64% 11, 26–29 phac_aspc/django/helpers/views wet.py 10 6 40% 12–19 phac_aspc/django/localization hooks.py 6 6 0% 2–16 phac_aspc/django/localization/decorators __init__.py 2 2 0% 4–6 localization_decorators.py 11 11 0% 4–46 phac_aspc/django/settings security.py 25 12 52% 41–69 utils.py 54 2 96% 103, 154 TOTAL 588 149 75%
Tests | Skipped | Failures | Errors | Time |
---|---|---|---|---|
22 | 0 :zzz: | 0 :x: | 0 :fire: | 2.067s :stopwatch: |
If I followed the imports correctly, it looks like this won't break DTL projects that don't have jinja installed, correct?
Pretty trivial. ~A utility function for rendering a DTL template in Jinja would look almost identical (I believe the only difference is that their render function expects context to be passed as keywords instead of a dict), but I'm thinking we don't want to provide that. This is to support transitioning from DTL to Jinja.~ Ok, I'll do both directions.
TODO: