-
Notifications
You must be signed in to change notification settings - Fork 1
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
consistency with IBPSA #4
Comments
For the merger script, we could have a list of models to be merged to the
IbpsaMpc repository, but as you wrote, this would overwrite custom changes
done to the file in the IbpsaMpc repository.
…On Wed, Aug 14, 2019 at 10:34 AM Filip Jorissen ***@***.***> wrote:
@dhblum <https://github.com/dhblum>
One thing that I lost track of:
if we now copy models from IBPSA into IbpsaMpc manually, we will
gradually diverge from IBPSA since new changes of IBPSA don't get merged
into IbpsaMpc. To avoid this, it would make sense to set up some way to
automate the merging process. Two problems here:
1. The buildingspy merger could be used for the merging, but it's not
practical to use it for merging only a limited set of models (while it's
easy to *exclude* a limit set of models). This functionality should
thus be added to buildingspy. @mwetter <https://github.com/mwetter> do
you agree?
2. The merging will overwrite our custom changes to the models that
make them compatible with JModelica. One approach to reapply the changes is
to use git cherry-pick, although I'm not sure whether this will work
as intended, especially when merge conflicts arise. We would also have to
keep track of all commits that modify IBPSA code.
Perhaps there is a better way but we better look into this before making
too many PRs?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4?email_source=notifications&email_token=AAKEPOEAJP4O3IMGOYFAGCDQEQ6LRA5CNFSM4ILXG63KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HFINRMA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKEPOEMIKXDTCH2ZEIBWC3QEQ6LRANCNFSM4ILXG63A>
.
|
Just to confirm, that functionality does not exist yet in Buildingspy, right? |
Yes, you would need to add this functionality. |
I think we discussed before that there will be three types of models in the library, with reference to the IBPSA library:
For 1., is solved by a merge script using buildingspy with a custom include list, as you've suggested. For 2., I think could be solved by having the user-facing mpc library models extend base ibpsa models with edited parameters. For 3., I'm not sure of a good way to automatically merge. The options perhaps are to:
|
For 1) and 2) we could write a new merger functionality that takes a .json as input that includes the parameters that should be overwritten. If the parameter set is empty then we simply copy the file, otherwise we duplicate it and extend it with the required parameters. I think it's best to start a new merger function for this as integrating it with the existing code may become a mess. For 3) I would wait to automate this but one way to go would be to keep track of the changes we performed and add the respective commits to a cherry-pick list that is run after each merge.. |
For 1) and 2) you mean integrating with existing buildingspy code? I don't see why the use of cherry-pick wouldn't work for 3). But as you mentioned before, we have to be careful about tracking which commits should be applied (and what is contained in those commits). We could create a specific issue label to help us with tracking these changes. Kind of like a "non-backwards-compatible" label. Maybe "modified-ibpsa-code"? |
|
Yes, I think it should work (maybe I shouldn't have used a double negative in my earlier comment?). I'm just suggesting that we can flag issues that require this to help keep track of which commits should be on/added to the cherry-pick list. |
I guess that most issues would need the flag. As part of the merge process we could require the developer to append the relevant sha's to a predefined txt file in the repository? |
Yes, that would make sense. As part of the review process, the reviewer should also make sure the listed sha's only commit the relevant changes, otherwise we could end up with unexpected conflicts over time. |
@dhblum see https://github.com/Mathadon/BuildingsPy/tree/issue278_mergeMpc for a first working version of the merge script. E.g. use
This only implements 'type 1' and 'type 2' merges. |
#3 uses this functionality but does not yet override parameters. For the movers/sensors we will however need it. |
This issue is addressed by #8. Can it be closed? |
@dhblum
One thing that I lost track of:
if we now copy models from
IBPSA
intoIbpsaMpc
manually, we will gradually diverge fromIBPSA
since new changes ofIBPSA
don't get merged intoIbpsaMpc
. To avoid this, it would make sense to set up some way to automate the merging process. Two problems here:git cherry-pick
, although I'm not sure whether this will work as intended, especially when merge conflicts arise. We would also have to keep track of all commits that modify IBPSA code.Perhaps there is a better way but we better look into this before making too many PRs?
The text was updated successfully, but these errors were encountered: