-
Notifications
You must be signed in to change notification settings - Fork 46
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
Regression tests: Option to use reference results from custom path? #393
Comments
@marcusfuchs : I think such an option would be useful. As requirements, we would like to be able to
|
This needs to happen after setting the library root, not in init. For lbl-srg#393
@mwetter Great, I can make a suggestion then. I already saw that what I suggested above will not work correctly. It does not seem possible to set up the default reference directory path during initialization, because the path depends on the library root ( Regarding your other point about comparing different tools, I am not yet sure how this would be best implemented. It seems to me like currently, the reference result directory is always |
@marcusfuchs : Thanks for the PR. Let me have a look at it and propose some edits for #393 (comment) |
@marcusfuchs : I made a working branch Can you please have a look at whether the new code meets what you need. The following will still need to be done (most likely in December):
|
@mwetter Sorry that it took a little longer on my side, but now I had a look at your code. I think your additions still cover my use case nicely, so I think this is even better now. Regarding the logic for the different options, I made some suggestions for a refactoring of your code. The functionality should not have been changed, but I find the conditional statements a little easier to understand in my version. In addition, I added 2 of the tests you suggested above, so what's left is the following Write regression tests for the new functionality:
If you agree with my suggestions the current code would work for me. If you prefer your version, I could also revert my refactorings and just include the new tests. My new code is already updated in #394 |
From my understanding of the code in
buildingspy/development/regressiontest.py
, the reference results for the regression testing are always read from the following directory:We have a use case where we would like to use BuildingsPy to run tests on an auto-generated Modelica package. For this application, it would be useful if we could specify a base directory for the reference results which is outside of the generated library. This may e.g. be done by adding a new class attribute
self.refDir
and moving the code snippet mentioned above into the class initialization to execute it when the defaultrefDir=None
is passed to the ìnit` method.As I understand that this proposed change may be a bit too special for all users I first wanted to ask whether there is an interest in me implementing this. As an alternative, we could also copy reference results into the library during the auto-generation process, so we could also work around this issue.
The text was updated successfully, but these errors were encountered: