NCIEVS / nci-protege5

evs umbrella project for protege 5-based editing software
BSD 3-Clause "New" or "Revised" License
2 stars 2 forks source link

vocabulary version migration #545

Closed NCIEVS closed 2 years ago

NCIEVS commented 2 years ago

Request to rebuild a database "in place" rather than as a new project. Keeps the ancillary code & evs editing history files.

bdionne commented 2 years ago

One thing we might consider doing, that would be minimal, is to enhance the edit project dialog and add a field at the bottom called reload that is next to a button for browsing the filesystem (similar to the same field one sees when adding a new project).

This would allow for using the same project and remove the need to add a date field in the metaproject.

Screen Shot 2022-04-12 at 12 42 35 PM
bdionne commented 2 years ago

@NCIEVS - another consideration here is the status of changes history file on the server. When we do a reload is the assumption that a squash/publish had previously occurred and we should create an empty history? I would think the simplest approach would be to require a squash/publish first, otherwise there's a risk when applying change sets to a newly baseline.

bdionne commented 2 years ago

Using the metaproject-admin UI, when a given project is edited, a new button at the bottom called reload will appear. This allows the user to choose an OWL file just as if this was a new project being added.

When a new file is loaded, which may take some time, if the history file on the server is not empty, .ie. changes have been made since the most recent squash, the load will fail with a warning message.

If successful a new base snapshot is loaded and the user can save the config, forcing a server restart, similar to adding a new project.

chaozhang-nci commented 2 years ago

Tested as following scenarios:

  1. Created a new project with an OWL file.
  2. The project has a reload button to select another OWL file.
  3. If there is NO any edit with the project since the creation, the project could be rebuilt with any new reloaded OWL file.
  4. After any edit happened to the project, and it is NOT squashed yet, the reload will be failed, and a waring message will be popped -up, as in the screenshot attached. Screen Shot 2022-09-09 at 1 10 08 PM
  5. If the project has squashed all the edits, the reload will be happen as to create a new project.
  6. If there is any new edit after squashed, the reload would be failed as in step 4.

From the server side, if the project's history file is zero size, the project could be reloaded with a new OWL file. If the project's history file is non-zero size, the project cannot be reloaded.