Skip to Main Content
Spotfire Ideas Portal
Status Future Consideration
Product Spotfire
Categories Library
Created by Guest
Created on Feb 25, 2020

We need better support for collaboration when working on 1 analysis file

Hello, my team and I have to do work on 1 analysis file which is delivered to our customers as part of our releases. To avoid losing changes, we have agreed that only 1 person is allowed to apply changes at a time. To keep track of the changes we decided to use Git. So we put the analysis file in a Git repository. That way we can use the commit messages to refer to specific work being done in the past (i.e. if we need to revert the file to a previous state).

Having said that, the above way of work is not ideal. Normally in a version control project, we should be able to collaborate and we should be able to resolve "Merge conflicts" if another person have changed the same line of a file and decided what change we would like to pick "theirs" or "ours". So I decided to experiment with the analysis file and unzip it to its consisting files:

 

 

Most of the files (except the image and the txt file) are XML files which are run through a minification algorithm (to take less space on disk) so there is no formatting - everything is on 1 line. For example, this is how the "7.11-AnalysisDocument.xml" looks like (note the length of the file):


In the current state of all of these XML files, it's impossible to use a version control system like Git as they track changes on individual lines of code and in that case, all of the XML files have only 1 line of code. So even if we put the unzipped version of our analysis file into Git it will be pointless as it git will show that the whole line have changed when somebody applies a change to the document. 

 

So I thought maybe we should create a script and attach it to the pre-commit Git hook (git allows us to execute a script before we execute the commit action) that will unzip the document and format all of its XML files in there so that everything is formatted on the appropriate line:

 However, that sounds like overcomplicating the initial problem, there has to be an easier way to do that. Can anybody give me any pointers on how a team can collaborate on working with 1 analysis file without losing changes? 

  • Attach files
  • Admin
    Miguel Díez
    Reply
    |
    Jan 16, 2023

    Hi Georgi,

    As you may know, we added Library version history in Spotfire 12.0.

    You can now browse saved analysis versions and go back to any previously saved version (either to restore the version, or to save a previous version as a new file) in the Spotfire library.

    Version history reduces the need to redo work if mistakes are made, facilitates collaboration and troubleshooting, and provides change traceability.

    Version history is available, not only for analysis files, but for all the visible Spotfire library items, like data sources, data functions, color schemes, SBDF files, mods, automation service jobs, etc.

    This means that, if you are working in teams, it is easier to work together on different parts of the same analysis, tracking changes and resolving conflicts for each separate part on its own, if you choose to work this way.

    For more information, see the What's new in Spotfire 12.0 LTS and the release notes and product documentation.

    Is this feature what you need to enable collaboration in your teams? If not, what are you missing?

    Thanks


  • Guest
    Reply
    |
    Mar 9, 2020

    Perhaps you could take a look at SPF-I-310 and vote for that, lots of people want version control.

  • Admin
    Niklas Amberntsson
    Reply
    |
    Feb 28, 2020

    Georgi, many thanks for contributing. I think the ability to merge two dxp files is interesting and I think many will vote for it. As of today you can manually merge visualizations from one file to another by opening two instances of Spotfire and dragging and dropping the visualizations between the instances. For this to work you need to make sure that the DXPs have the same data tables. Data connections and data functions cannot be dragged and dropped in the same way, but for these you can collaborate by storing them on the library and having the dxps reference them there.