-
Notifications
You must be signed in to change notification settings - Fork 9
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
How to create an RPM unit? #101
Comments
First of all, please use Indriya 2.1.2 if you can, that's the latest version and some of the 2.0.x ones may behave slightly different especially converting due to underlying number systems and precisions. |
This had to be created here, uom-guide is not compatible with these types of issues or the repository type, but similar to jakartaee-tutorial and jakartaee-tutorial-examples either here (probably makes more sense) or in a separate repository, there could also be concrete examples and demos for the guide book. |
UCUM uses the official unit Hertz for frequency, so to handle it with Jackson Binding as it is now (intended to work with APIs in a consistent environment backed by the UCUM catalog) you may have to convert your |
As regards Indriya versions:
This one requires:
... this is per GH documentation for uom-lib-jackson. I can go as high as Indriya 2.1... above that I get:
As regards using |
That's a minimum version to build it, if your app uses 2.1.2 I am not aware you would get Indriya twice. As for the UCUM representation I mentioned RPM does not exist in UCUM, that is something we cannot change, they stick to HERTZ. Please file a ticket against https://github.com/unitsofmeasurement/uom-lib/issues (as a "bug" if you want) because normally as you see, there is no problem running it on top of 2.1.2 but we simplified some structures of Indriya between 2.0.4 and 2.1.0 or above (especially with MR1) so the missing For the desire to use a different parser, please also file another ticket there (but without label or "new feature") because it is currently based on UCUM for a good reason and you cannot use UCUM with a unit like |
Thank you very much for your help. A general note on (compatible) library versions. It would be nice to have a top-level UOM BOM that would pull in all the compatible versions from the different modules for a release. |
We thought about that and uom-lib itself (almost e.g. projects like Eclipse MicroProfile, but not so complex ;-) has more than one version lifecycle, because Indriya among other artifacts uses uom-lib-common while some including the Jackson library depend on a particular version. There may be a better solution here in future to call Please feel free to suggest a BOM under https://github.com/unitsofmeasurement/uom-parent and its issue tracker, We already used that to control all the detail tasks for the Bintray replacement, so if a new repo was necessary don't worry but that seems the best place for "umbrella" topics. |
Trying to create a new
Unit<Frequency>
RPM:Specifying alternate as "rpm" I get:
The RPM unit should have the symbol "rpm" (or "[rpm]"?) instead of 1/min. This should work in serialization and deserialization.
Tried using:
... but this works only partially: using toString() it writes "rpm", but using Jackson serialization we still get 1/min.
Using indriya 2.0.4
The text was updated successfully, but these errors were encountered: