pins-r icon indicating copy to clipboard operation
pins-r copied to clipboard

Ensure R and python pins have compatible api_version behavior

Open machow opened this issue 2 years ago • 0 comments

Currently, it seems like R and python pins treat api_version differently:

  • R pins:
  • Python pins:
    • Sets api_version as an integer (1), and has a type hint that suggests it expects an integer
    • Just reads api_version from the yaml, so fine reading R pins metadata, and having it be a float (e.g. 1.0)

Options

It seems like if we want to preserve compatibility with the current R pins, we have two safe options for api_version:

  • one part: It follows the form 0, 1, 2, etc..
  • two parts: It allows one period, e.g. 1.1, 2.0

And then one crazy option--three parts, allowing the string "x.y.z"-- since in R:

  • "0" > 1 -> False
  • "1" > 1 -> False
  • But we'd have to be very careful, since "1.0" > 1 -> True

(Also I can't remember exactly how these comparisons work, so could be missing some bad behavior; but it should be okay as long as "2.0.0" etc > 1?)

machow avatar Apr 27 '22 19:04 machow