RaySession icon indicating copy to clipboard operation
RaySession copied to clipboard

[Looking for advice] Version control of my configuration including RaySession

Open zigmhount opened this issue 10 months ago • 3 comments

Hello,

I'm developing a few homemade tools in Pure Data, a few shell scripts, a Csound patch, a few Carla patchbay configurations, and a Open-Stage-Control UI, and I've been keeping track of all that in a single git repository (not published anywhere yet, but eventually it will).

So far I've been using a single RaySession patch to combine all of these as long as the main bricks and the connections between them remained the same (e.g. modifying the internals o the Pure Data patches, shell scripts etc.), but not including the RaySession configuration in git. Now I'm getting to a point where the latest updates require a significant change in the patchbay as well, so that I should use a different RaySession configuration depending whether I use the main branch or if I test the development branch - therefore I'd like to track the RaySession configuration in my git repository. However, given that RaySession does already maintain a git repository for version tracking and snapshots, I'm unsure about how to combine it with my work repo. I've read about git submodules but I never really used them, so I'm wondering if it's the best approach, and if you @Houston4444 have good suggestions on how I could handle that :) Thanks!

zigmhount avatar Feb 12 '25 15:02 zigmhount

Hello !

I am not sure to understand your needs.

Now I'm getting to a point where the latest updates require a significant change in the patchbay as well, so that I should use a different RaySession configuration depending whether I use the main branch or if I test the development branch - therefore I'd like to track the RaySession configuration in my git repository.

Are you talking about the patchbay .json files ? Yes they have changed a lot. Normally, an old file should be loaded correctly with a newer version, but of course the opposite will not work, positions won't be restored. What do you mean exactly with "RaySession configuration" ? the config in ~/.config/RaySession ? the session directory ?

However, given that RaySession does already maintain a git repository for version tracking and snapshots, I'm unsure about how to combine it with my work repo.

If you are talking about the snapshots in .ray-snapshots directory in the session, conflicts should not happen if your session is in a git repo, simply because the directory is not the same. Of course you should add this directory to your .gitignore, else you will track to much files.

If you are talking about the RaySession source code, then submodule is quite easy and really adapted to the situation.

Houston4444 avatar Feb 12 '25 16:02 Houston4444

Thanks for your response!

What do you mean exactly with "RaySession configuration" ? the config in ~/.config/RaySession ? the session directory ?

Thanks for asking this - I actually mean the session directory (not the .config folder, nor RaySession's source code). I don't suppose that the patchbay .json file would be sufficient to restore a patchbay, would it?

If you are talking about the snapshots in .ray-snapshots directory in the session, conflicts should not happen if your session is in a git repo, simply because the directory is not the same. Of course you should add this directory to your .gitignore, else you will track to much files.

Well, but if I add this directly in .gitgnore, then I won't be able to track the changes of the patchbay that I apply as I develop and test my tool 😅 I guess I would need some kind of reference between the commits in my main repository and the commit in .ray-snapshots to ensure that the proper patchbay is loaded?

zigmhount avatar Feb 14 '25 08:02 zigmhount

I don't suppose that the patchbay .json file would be sufficient to restore a patchbay, would it?

.canvas.json stores views and boxes positions (including their hidden state). Of course, this file won't make the clients appears !

Well, but if I add this directly in .gitgnore, then I won't be able to track the changes of the patchbay that I apply as I develop and test my tool 😅

I still try to understand, are you developing a kind of session template including configuration files for your softwares ? If it is the case, I suggest to deactivate auto-snapshots (or to add .ray-snapshots to .gitignore) and to make your session directory a regular git repository. Then, you adjust your commits when you need to commit and not at each session save. You will have the possibility to name the commits, I think it is indispensable when you are catching a bug to find the incriminated modification. You will probably have to add to your .gitignore audio files to avoid to add big files to your git repo with the git add . command.

Houston4444 avatar Feb 14 '25 11:02 Houston4444