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

Format version upgrade script #449

Open
1 of 2 tasks
achilleas-k opened this issue Mar 24, 2020 · 3 comments
Open
1 of 2 tasks

Format version upgrade script #449

achilleas-k opened this issue Mar 24, 2020 · 3 comments
Labels
Milestone

Comments

@achilleas-k
Copy link
Member

achilleas-k commented Mar 24, 2020

We need a way to make old files compatible for writing with newer version of the library.

With the upcoming changes in v1.5.0, we will be upgrading the file format version to 1.2.0. This will make it impossible to write to old files (< 1.2.0) with the new library. We should have a command line script that upgrades a file to the newest version. This script can be maintained in the future for further format changes.

Currently, for the 1.1.x to 1.2.0 file format transition it would have to:

  • Change the format of the Property objects (no more Value object).
  • Add a File UUID.
@achilleas-k
Copy link
Member Author

By default running the script should open the file in Read Only mode, determine the upgrade tasks that are needed, print them to the user, and warn them that the file will be upgraded in place. This should warn the user about having backups of their data.

A flag can be set (--force) to perform the operation without asking, for batch processing/scripting.

@matham
Copy link
Member

matham commented Jun 24, 2021

Seems like there's already a script in cmd/ that upgrades the files!?

Would it be possible to make this script available through the API so that I could call e.g. nixio.upgrade_file(filename, output_filename=None). That would be easier to use for me to help users upgrade through my program. Also, it would be nice if the function that checks for compatibility is part of the public API (i.e. can_write and can_read).

Also, while I have been aware for some time about the version incompatibility issues, I don't see anywhere on the site that lists which nixpy versions break file compatibility with previous versions or such plans for the future. It would be nice to have a list somewhere listing these versions and possibly what they changed. But what would be even more helpful is having a roadmap somewhere that indicates any future plans for breaking compatibility so that users could plan for it. Although I get that may not be knowable before it happens. But still, something about any such future plans would be helpful in the readme or somewhere prominent.

@jgrewe
Copy link
Member

jgrewe commented Jun 25, 2021

Hi @matham regarding the changes I am currently update (actually rewriting) the docu for nixpy. It will contain a section about changes in 1.5.
Will have a look into your ather points as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants