Conversation
smartie2076
left a comment
There was a problem hiding this comment.
I see what you did here and it does indeed get rid of the error mesaage and save us some line of code. However, I think that #845 just like #780 is more about the fact that we actually define default values for the constraints, but they are not applied to the inputs:
There must be something in A1 being off for the default values not being parsed.
I have commented some stuff now. I am not sure this is the preferred way to fix the problem (I do think that we should be able to set default values for the constraints, and I would say it is not intended that you can leave parameters out from the inputs), so I am not sure if you should work more with this hotfix, especially as there are a lot of pytests to be changed/added, right?
|
#834 changed |
|
I think for the constraints it would make sense not to have constraints, rather than having default values to them. |
I could reapply my changes on top, the gist of it is to make sure the code runs if the constraints are not defined (also good for back compatibility ;)) |
There was a problem hiding this comment.
I think for the constraints it would make sense not to have constraints, rather than having default values to them.
You mean constraints should be always defined explicitly?
The default values always turn off the constraint, so I think it would not lead to unexpected results.
The gist of it is to make sure the code runs if the constraints are not defined (also good for back compatibility ;))
Yeah, the back compatability is quite an issue. Not sure if trying to ensure that via if-statements within the modules is more efficient though then ensuring that in A1 or B. For the constraints this only seems to require changes in D2 and E0, but for others this may be all over the place.
If we want the hotfix, surely avoid excessive constraint preparation time and not change the pytests for the constraints, we could also simply change to the comment below.
c52ed56 to
6dddc31
Compare
|
The error (missing Key in the last test of |
|
Hi @Bachibouzouk! I think the issue is that now, with your changes, you do your pre-processing with Basically, before that the test was able to skip the constraints and run the test on So, you can either add an This is a reason why I think that D0, D1 would do better if we would not test them with a json file but with input csv files... |
smartie2076
left a comment
There was a problem hiding this comment.
I think you should rather move the pre-processing into if-loop. It seems that would not cause any problems.
Are you intentionally not writing with functions you changed in the CHANGELOG? Especially that the validity checks are only performed if a constraint is actually added is also useful information.
Not writing the function names in the CHANGELOG was not intentional, merly laziness I would guess, I will update when I fix |
c0c7629 to
01d77f4
Compare

Fix #827
Changes proposed in this pull request:
CONSTRAINTSindict_valuesThe following steps were realized, as well (if applies):
black . --exclude docs/)EXECUTE_TESTS_ON=master pytest)For more information on how to contribute check the CONTRIBUTING.md.