InformaticsGenomicMedicine / DraftCoreDataModel

Draft of CoreDataModel
Apache License 2.0
0 stars 0 forks source link

Copy input params first #2

Closed rrfreimuth closed 1 year ago

rrfreimuth commented 1 year ago

https://github.com/InformaticsGenomicMedicine/DraftCoreDataModel/blob/79450932a44ee677816f9c02e6f5660ea03e5ec1/src/core_variant.py#L27C7-L39

Please copy all input params (including **kwargs) before they are used anywhere. By saving them off first-thing, we know we have an accurate copy of whatever was provided and can reference them in error messages. Any processing that occurs before the copy could potentially throw an exception that would kill the routine before the copy took place, or munge the input data silently so the copied values don't actually reflect what was passed in.

SalemBajjali commented 1 year ago

Copied all input params:

https://github.com/InformaticsGenomicMedicine/DraftCoreDataModel/blob/66f815799c6c614970c4caed71740a6bd41ce2e6/src/core_variant.py#L12-L24

SalemBajjali commented 1 year ago

Reviewed with @rrfreimuth.