-
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
Refactored ModelProperty. #914
Refactored ModelProperty. #914
Conversation
Benchmark is done. Checkout the benchmark result page. Benchmark diff v0.5.0rc1 vs. mainParametrized benchmark signatures: BenchmarkOptimize.time_optimize(index_dependent, grouped, weight)
Benchmark diff main vs. PRParametrized benchmark signatures: BenchmarkOptimize.time_optimize(index_dependent, grouped, weight)
|
Codecov Report
@@ Coverage Diff @@
## main #914 +/- ##
=======================================
+ Coverage 84.5% 85.1% +0.5%
=======================================
Files 85 85
Lines 4785 4793 +8
Branches 891 920 +29
=======================================
+ Hits 4047 4079 +32
+ Misses 589 562 -27
- Partials 149 152 +3
Continue to review full report at Codecov.
|
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.
Functionality wise this looks good to me 👍
So thanks a lot, users will love the enhanced information they get. ❤️
But also it works quite well for 0.6.0
we should really reflect on if we really need this kind of metaprogramming or if we could maybe solve our requirements in a more maintainable fashion and pythonic way, instead of our mad scientist (e.g. utilizing attrs).
For me the most problematic point is inheriting a from the property
decorator class, which leads this strange tests in test_model_property
that don't reflect the actual usage.
The more tests the married, but they should reflect the usage in the code.
For now, there is no quick way around it (at least after 2h of trial and error from my side) and it would be out of scope for this PR, since this is an integral part of the code for 3 years.
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 3.12%.
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! |
SonarCloud Quality Gate failed. 14 Bugs No Coverage information |
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, but I do agree and want to place emphasis on @s-weigand 's findings:
For me the most problematic point is inheriting a from the property decorator class, which leads this strange tests in test_model_property that don't reflect the actual usage.
The more tests the married, but they should reflect the usage in the code.
As (now) picked up by SonarCloud:
https://sonarcloud.io/summary/new_code?id=glotaran_pyglotaran&pullRequest=914
Let's add it to the v0.6.0 list.
This PR refactors the
ModelProperty
class.Change summary
Model
has been changedChecklist
Closes issues
closes #901