canonical / paas-app-charmer

2 stars 2 forks source link

Use metadata in ops instead of generating it manually #13

Closed javierdelapuente closed 3 months ago

javierdelapuente commented 3 months ago

Applicable spec:

Overview

In paas-app-charmer it is necessary to get the integrations defined in metadata.yaml or charmcraft.yaml. These files are directly read by paas-app-charmer. However, this functionality is defined in the ops library. Use this functionality from the ops library instead.

Rationale

Juju Events Changes

Module Changes

Library Changes

Checklist

github-actions[bot] commented 3 months ago

Test coverage for ad869b90f9ebecc2391222f92d41c53f02959ab8

Name                                           Stmts   Miss Branch BrPart  Cover   Missing
------------------------------------------------------------------------------------------
paas_app_charmer/__init__.py                       0      0      0      0   100%
paas_app_charmer/_gunicorn/__init__.py             0      0      0      0   100%
paas_app_charmer/_gunicorn/charm.py              115     30     18      6    71%   59-61, 146-147, 149-150, 170->exit, 180-184, 189, 195-203, 207-208, 212, 216, 220, 224, 228, 232, 236, 240, 244, 248
paas_app_charmer/_gunicorn/charm_state.py         62      1      6      1    97%   194
paas_app_charmer/_gunicorn/observability.py       19      0      0      0   100%
paas_app_charmer/_gunicorn/secret_storage.py      13      1      0      0    92%   39
paas_app_charmer/_gunicorn/webserver.py           75      5     16      2    92%   19, 155, 167-173
paas_app_charmer/_gunicorn/wsgi_app.py            61      1     24      1    98%   80
paas_app_charmer/database_migration.py            33      0      2      0   100%
paas_app_charmer/databases.py                     36      3     13      2    90%   80, 95-96
paas_app_charmer/django/__init__.py                1      0      0      0   100%
paas_app_charmer/django/charm.py                  44     13     10      0    65%   72-77, 89, 97-114
paas_app_charmer/exceptions.py                     4      0      0      0   100%
paas_app_charmer/flask/__init__.py                 1      0      0      0   100%
paas_app_charmer/flask/charm.py                   36      0      6      0   100%
paas_app_charmer/secret_storage.py                39      6     16      4    78%   50, 54->53, 55->57, 85, 103-108
------------------------------------------------------------------------------------------
TOTAL                                            539     60    111     16    87%

Static code analysis report

Run started:2024-05-29 00:45:57.380502

Test results:
    No issues identified.

Code scanned:
    Total lines of code: 1230
    Total lines skipped (#nosec): 0
    Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
    Total issues (by severity):
        Undefined: 0
        Low: 0
        Medium: 0
        High: 0
    Total issues (by confidence):
        Undefined: 0
        Low: 0
        Medium: 0
        High: 0
Files skipped (0):