NLDCSC / nldcsc

NLDCSC package
GNU General Public License v3.0
2 stars 0 forks source link

Flask sqlalchemy wrap #59

Closed Thomas-Dolle closed 4 months ago

Thomas-Dolle commented 4 months ago

Makes use of SQLAlchemy 2.0 models easier across projects by wrapping the Flask-SQLAlchemy default class.

@P-T-I What do you think of putting this in the NLDCSC package? This should reduce the duplication of this code by quite a few times. However, it may create the effect that if a new type is needed this needs to be updated in this package first or on the models own type_annotation_map.

LMK what you think!

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 0% with 32 lines in your changes missing coverage. Please review.

Project coverage is 29.07%. Comparing base (24608eb) to head (4c63001).

Files Patch % Lines
...dcsc/flask_plugins/flask_sqlalchemy/annotations.py 0.00% 16 Missing :warning:
...flask_plugins/flask_sqlalchemy/flask_sqlalchemy.py 0.00% 9 Missing :warning:
...ldcsc/flask_plugins/flask_sqlalchemy/model_base.py 0.00% 5 Missing :warning:
nldcsc/flask_plugins/flask_sqlalchemy/__init__.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #59 +/- ## ========================================== - Coverage 29.73% 29.07% -0.67% ========================================== Files 24 28 +4 Lines 1399 1431 +32 ========================================== Hits 416 416 - Misses 983 1015 +32 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

P-T-I commented 4 months ago

@Thomas-Dolle I see no issues with this change; if it reduces the code base from other projects and makes it easier to work with sqlalchemy 2.0; then why wouldn't we use it?

Thomas-Dolle commented 4 months ago

@Thomas-Dolle I see no issues with this change; if it reduces the code base from other projects and makes it easier to work with sqlalchemy 2.0; then why wouldn't we use it?

Fair enough!