Skip to content

reconsider version binding with MMIF spec #293

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

Open
keighrim opened this issue Jul 13, 2024 · 6 comments
Open

reconsider version binding with MMIF spec #293

keighrim opened this issue Jul 13, 2024 · 6 comments

Comments

@keighrim
Copy link
Member

keighrim commented Jul 13, 2024

Because

The problem with SDK version, while using three digits in the version string, indeed having only one digit-space as its actual versioning scheme ("major" and "minor" digits are tied to MMIF spec version) has been raised in multiple occasions (clamsproject/mmif#14 (comment), clamsproject/mmif#228 (comment)) and there are more pending issues (#292 #295 #296 ) that are destined to "break" from older versions. So I don't think we can further operate under the current versioning scheme.

A few possible solutions to the problem

  1. total separation of MMIF version digits and mmif-python version digits at least in formal way (we can keep some "convention" to sync up two versions to a reasonable extent)
  2. use four-digit version scheme for mmif-python to give a wider room to "break" things.
  3. stop "minor" digit sharing and keep three digit versioning - this is in the middle between the above two. A "minor" bump in the MMIF spec won't "break" anything (it just add more features while not changing any existing behaviors), so keeping the "major" digit sync will still indicate that all mmif-python==1.* will work with MMIF files (<2.0).

Any input is welcome. Please share your thoughts.

Done when

No response

Additional context

No response

@keighrim
Copy link
Member Author

keighrim commented Jul 18, 2024

So, looping back to the "meaning" of those digits (clamsproject/mmif#14, clamsproject/mmif#23) based on the sem-ver scheme, there are different types of changes we make to code.

  1. (pb) publicly breaking changes (deletion of a public API, changes of signature or behavior of a public API, etc)
  2. (pa) publicly adding changes (adding a new method, feature, etc)
  3. (b) privately breaking changes (breaking changes in a private functionality of the code)
  4. (a) privately adding changes (adding a private method, class, etc)
  5. (f) fixing public and private bugs (https://xkcd.com/1172/)

(of course any of these types can be eventually breaking, but let's pretend we're in an ideal world)

Now, sem-ver suggests that only pb type of changes are real "breakage", so it suggests

  1. major digit goes for pb changes
  2. minor digit goes for pa changes
  3. all other changes go with patch digit

Now applying the same to the spec, we can roughly think of

  1. (spb) publicly breaking changes (deletion of a public spec, scheme, vocan defs, changes of behavior of them, (adding a new required field to scheme*)
  2. (spa) publicly adding changes (adding an optional field, adding a new type, etc)
  3. (sb) privately breaking changes (everything is public in the spec, so probably no such changes in spec?)
  4. (sa) privately adding changes (everything is public in the spec, so probably no such changes in spec?)
  5. (sf) fixing public and private bugs (fixing typos in spec, defs, etc. no substantials)

So now, let's talk about the SDK. Since SDK is "tied" to MMIF spec versions, there are two different sources of the breaking changes (pb in the SDK code itself, and spb from changes in the spec)


I don't think four-digit scheme (as proposed above by me) won't work, as long as we use x.y.a.b digits where

  • x is tied to spb changes (BREAKING!)
  • y is tied to spa changes
  • a is tied to pb changes (BREAKING!)
  • b is tied to other changes in the code
    because, sorting of version strings will mix and mess up the concept of breakages, and nuke the way we specify the dependency.

To that end, I'm now thinking among these three schemes

  • x.a.b - only tied to major spec version
  • x.a.y.b - four-digit scheme, but re-ordered to work with sorting
  • a.b.c - no tie to the MMIF spec version at all
  • a.b.c.x-y-z - MMIF spec version as the "build" number

@keighrim
Copy link
Member Author

keighrim commented Mar 26, 2025

From my experience in last year or so, now I'm more believing in complete unbinding of mmif-python version from the MMIF spec version. Main reasons being

  1. the update cycle between two are too different, as we keep adding features and helpers to the python side
  2. mmif-python's having two different sources of "breaking" changes causes too many issues, part of which are just impossible to solve (such as version string sorting)

With the merge of #306 (or re-opening of it if necessary), I will move to mmif-python==2.0.0, and until then I will use a branch 2.x as a in-development working branch for merging current issues.

@marcverhagen
Copy link
Contributor

Yeah, I am good with that. We had some reasons for trying this, but it does not seem worth the effort.

One question, do we have a system to specify the dependencies between the two?

@keighrim
Copy link
Member Author

Yes, the package has __specver__ variable that shows the underlying spec version.

@marcverhagen
Copy link
Contributor

Ah, yes, now I remember. Am I right in thinking that pulling the versioning apart should be rather simple then? If so I see really no great reasons not to do this.

@keighrim
Copy link
Member Author

I don't know what it would take. I just know that I can't continue operating under the current restriction.

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

No branches or pull requests

2 participants