-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🩹 False positive model validation fail when combining multiple default megacomplexes #797
🩹 False positive model validation fail when combining multiple default megacomplexes #797
Conversation
Codecov Report
@@ Coverage Diff @@
## staging #797 +/- ##
=======================================
Coverage 84.4% 84.4%
=======================================
Files 75 75
Lines 4196 4195 -1
Branches 758 755 -3
=======================================
+ Hits 3542 3544 +2
+ Misses 520 518 -2
+ Partials 134 133 -1
Continue to review full report at Codecov.
|
0719076
to
a80b61e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Compatibility with legacy (0.4.0) model specs and combining multiple megacomplexes
And improved typing. Since 'DatasetModel' is never instantiated from the class definition, but 'create_dataset_model_type' creates a new class in a closure each time a new instance is needed, values across instances won't be overwritten.
After a personal request of @joernweissenborn I removed the class attributes again and moved them to a pyi file
Since it is already reported as 'Missing Model Item'
a80b61e
to
dee11fc
Compare
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.26%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Benchmark is done. Checkout the benchmark result page. Benchmark diffParametrized benchmark signatures: BenchmarkOptimize.time_optimize(index_dependent, grouped, weight)
|
…t megacomplexes (#797) * 🩹 Fixed missing 'f' in front of f-string which rendered the error useless * 🩹 Deactivate instance check if megacomplex type is None Compatibility with legacy (0.4.0) model specs and combining multiple megacomplexes * 🩹 Fixed usage of 'glotaran_unique' in 'ensure_unique_megacomplexes' * 👌 Improved typing * 🧪 Added unittests for 'ensure_unique_megacomplexes' * 🩹 Fixed missing megacomplex definition not being reported as error * 🩹 Fixed megacomplex type being None * ♻️ Refactored 'ensure_unique_megacomplexes' using Counter and improved typing. Since 'DatasetModel' is never instantiated from the class definition, but 'create_dataset_model_type' creates a new class in a closure each time a new instance is needed, values across instances won't be overwritten. * ♻️ Moved typing information to stub file After a personal request of @joernweissenborn I removed the class attributes again and moved them to a pyi file * 🧹 Removed warning about missing megacomplex definition Since it is already reported as 'Missing Model Item'
This PR is just preventing the false-negative validation and not fixing the root cause of the problem.
Change summary
f
in format string)DatasetModel.ensure_unique_megacomplexes
DatasetModel.ensure_unique_megacomplexes
to use counter for uniqueness checkingChecklist
Closes issues
closes #796