Skip to content
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

[Feature Request] Add XLSX git diff #198

Closed
Freymaurer opened this issue Jun 25, 2024 · 4 comments
Closed

[Feature Request] Add XLSX git diff #198

Freymaurer opened this issue Jun 25, 2024 · 4 comments
Assignees
Labels
Type: Feature Request This item is confirmed by the maintainers to be a request for a new feature

Comments

@Freymaurer
Copy link
Collaborator

The user should be able to preview and then choose:

  • keep remote
  • keep local
  • keep automatic git merge
@github-actions github-actions bot added the Status: Needs Triage This item is up for investigation. label Jun 25, 2024
@Freymaurer Freymaurer added this to the ARCitect v0.0.37 milestone Jun 25, 2024
@Freymaurer Freymaurer moved this to Backlog in ARCStack Jun 25, 2024
@Freymaurer Freymaurer added Type: Feature Request This item is confirmed by the maintainers to be a request for a new feature and removed Status: Needs Triage This item is up for investigation. labels Jun 25, 2024
@HLWeil
Copy link
Member

HLWeil commented Jul 4, 2024

Little BUMP After a user request from our partners in FAIRagro:

Could we generalize this issue to a general diff?

In one case, they

  • created an ARC on the DataHub (only a README)
  • initialzed an ARC locally
  • set the the URL of the one in the DataHUB as the remote for the local one
  • tried to sync

Now, this did not work, as there were different histories online and offline. But in this case, an automatic Rebase could have solved the problem for the user.

@Freymaurer Freymaurer modified the milestones: ARCitect v0.0.37, ARCitect v0.0.38 Jul 10, 2024
@JonasLukasczyk
Copy link
Collaborator

This is work in progress, but since 5067c04 it is possible to attempt an xlsx merge when a merge conflict is detected. For now this works as follows:

  1. When performing a pull and git detects a merge conflict then the ok button in the dialog changes to a "merge" button:
    image
  2. When the user clicks on cancel then the repo reverts to the state before the pull request.
  3. When the user clicks on the merge button then ARCitect performs the following steps
  4. First ARCitect finds the latest commit both branches agree on which is called the ancestor
  5. Then for each conflicted XLSX file ARCitect will download the XLSX file version of the ancestor, the local repo, and the remote repo. NOTE: Currently conflicts of non-xlsx files can not be resolved within ARCitect.
  6. Then ARCitect transforms all the XLSX files into JSON files using fsspreadsheet
  7. Next it uses the git merge-file -p local_json ancestor_json remote_json command to merge the files as if they were source code (how reliable this is needs to be seen).
  8. If both the local and remote version changed the same cells, then the user has to decide which changes to keep.
  9. The resulting merged JSON files are then transformed back to XLSX files and added in a new commit.

This definitely needs to be more tested.

@JonasLukasczyk
Copy link
Collaborator

This feature was added in 20198b6

@github-project-automation github-project-automation bot moved this from Backlog to Done in ARCStack Sep 25, 2024
@Freymaurer
Copy link
Collaborator Author

@JonasLukasczyk Does this feature allow previewing local/remote/merge? can you post some images?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Request This item is confirmed by the maintainers to be a request for a new feature
Projects
Status: Done
Development

No branches or pull requests

3 participants