Closed ekalosak closed 3 years ago
Thanks, very useful update!
Two comments:
>>> help(repr)
: "For many object types, including most builtins, eval(repr(obj)) == obj".Any thoughts on adding black
or some other code formatter to the CI?
No, haven't considered any formatters yet. But will now, thanks for asking!
Can you have a look at the build failure? Seems to be some confusion with multi-line f-string.
Merging #336 (d317d9c) into master (184da9f) will decrease coverage by
0.18%
. The diff coverage is62.96%
.
@@ Coverage Diff @@
## master #336 +/- ##
==========================================
- Coverage 89.40% 89.22% -0.19%
==========================================
Files 123 123
Lines 4022 4045 +23
Branches 459 459
==========================================
+ Hits 3596 3609 +13
- Misses 330 340 +10
Partials 96 96
Impacted Files | Coverage Δ | |
---|---|---|
emukit/core/categorical_parameter.py | 95.23% <60.00%> (-4.77%) |
:arrow_down: |
emukit/core/continuous_parameter.py | 91.66% <60.00%> (-8.34%) |
:arrow_down: |
emukit/core/discrete_parameter.py | 85.00% <60.00%> (-3.89%) |
:arrow_down: |
emukit/core/bandit_parameter.py | 64.77% <66.66%> (-0.29%) |
:arrow_down: |
emukit/core/parameter.py | 79.16% <66.66%> (-4.17%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 184da9f...d317d9c. Read the comment docs.
@apaleyes looks like my hubris in submitting a PR without associated unit tests was misplaced. I've added tests.
Yup, tests are always good to have! thanks, merging now
Description of changes: Implemented
str
andrepr
magic methods for the Parameter class and XyzParameter subclasses.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.