PHACDataHub / django-phac_aspc-helpers

Provides a series of helpers to provide a consistent experience accross PHAC-ASPC's Django based projects.
MIT License
0 stars 0 forks source link

feat: add csv export utils #70

Closed AlexCLeduc closed 1 year ago

AlexCLeduc commented 1 year ago

closes #69

Tested in a project, works well enough. The API is slightly different than the excel view (get_writer_class vs get_sheetwriter_class), which might be a bit annoying, but we can still easily re-use column and column lists between CSV/Excel output

github-actions[bot] commented 1 year ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
phac_aspc/django
   excel.py1893383%17–18, 49, 81, 85, 119–121, 125–129, 132–133, 162, 170, 186–187, 194, 239, 244, 247, 249, 251, 254, 260, 266, 285–286, 293–294, 319–320, 327–328
   fields.py791680%46, 67–80, 102–105, 120–125, 128–132
phac_aspc/django/admin/decorators
   admin_decorators.py18289%37–38
phac_aspc/django/helpers
   jinja_dtl_interop_utils.py7186%21
phac_aspc/django/helpers/auth
   backend.py28280%2–36
   views.py442739%22, 27–30, 35–43, 48–100
phac_aspc/django/helpers/locale
   code.py8362%10, 13–14
phac_aspc/django/helpers/logging
   configure_logging.py31197%124
   json_post_handlers.py27389%8–9, 61
   utils.py11282%43, 48
phac_aspc/django/helpers/templatetags
   phac_aspc_auth.py7186%14
   phac_aspc_localization.py11464%11, 26–29
phac_aspc/django/helpers/views
   wet.py10640%12–19
phac_aspc/django/localization
   hooks.py660%2–16
phac_aspc/django/localization/decorators
   __init__.py220%4–6
   localization_decorators.py11110%4–46
phac_aspc/django/settings
   logging.py271544%29–37, 47–66
   security.py21957%34–45
phac_aspc/django/settings/utils
   configure_settings_for_tests.py3233%15–19
TOTAL76917278% 

Tests Skipped Failures Errors Time
42 0 :zzz: 0 :x: 0 :fire: 2.524s :stopwatch:
AlexCLeduc commented 1 year ago

Ok, added hyper-abstracted tests, not sure it was that helpful but it was fun 😄