unitsofmeasurement / indriya

JSR 385 - Reference Implementation
Other
122 stars 42 forks source link

Getting started #230

Open lfoppiano opened 5 years ago

lfoppiano commented 5 years ago

I've made an full update of my dependencies and, so I started to add indyria 2.0-PRD, is that enough?

After long time using this library I still haven't really understood how to use it properly. I'm still lost among the several projects...

What other library should I include in my dependencies if I want the maximum support for unit parsing? Is there like a getting started for dummies guide that I could use?

Thank you Luca

teobais commented 5 years ago

Hey @lfoppiano ,

thanks a lot for using JSR-385!

Indeed, for the very basic usage, just importing the indriya dependency should be enough. I've initiated a jsr385-examples repo where you can find some very basic examples.

Please let me know whether that helps!

Thodoris

lfoppiano commented 5 years ago

Dear @thodorisbais. thanks for your answer.

Actually, I need it for advanced usage 😄 so I need to support all the possible forms (see: https://github.com/kermitt2/grobid-quantities - please notice the dependencies are old)

lfoppiano commented 5 years ago

OK I'm going to add some more documentation on the part I'm working on (parsing / normalisation) in the uom-guide -> https://github.com/lfoppiano/uom-guide

What I need to understand is:

Would be good to redirect there all the various documentation pages:

Please correct me if I'm wrong.

lfoppiano commented 5 years ago

Now that the version 2.0 I can really help with some documentation and testing.

First question, here my dependencies...

    compile 'tech.units:indriya:2.0'
    compile group: 'si.uom', name: 'si-units', version: '2.0'
    compile group: 'si.uom', name: 'si-quantity', version: '2.0'
    compile group: 'systems.uom', name: 'systems-quantity', version: '2.0'
    compile group: 'systems.uom', name: 'systems-common', version: '2.0'
    compile group: 'systems.uom', name: 'systems-unicode', version: '2.0'
    compile group: 'systems.uom', name: 'systems-ucum', version: '2.0'

It seems that the system package has not been released as version 2.0.. which version should I use? 2.0-SNAPSHOT? Is there any plan to release them as well?

keilw commented 5 years ago

We're about to release SI Units and the other System Units. As the JSR is already available in 2.0 (there still need to be administrative steps in the JCP to officially finalize it there, but the ballot passed) we expect these fairly soon, especially for SI it should not take more than end of July.

As for a getting started or other topics to improve, the UoM Guidebook is the best place to contribute. The old RI guide is frozen and was for JSR 363 only. Thanks for your desire to help.

magesh678 commented 5 years ago

Let me check Guidebook and start some work there

lfoppiano commented 5 years ago

We're about to release SI Units and the other System Units. As the JSR is already available in 2.0 (there still need to be administrative steps in the JCP to officially finalize it there, but the ballot passed) we expect these fairly soon, especially for SI it should not take more than end of July.

OK, no problem, I will wait.

As for a getting started or other topics to improve, the UoM Guidebook is the best place to contribute. The old RI guide is frozen and was for JSR 363 only. Thanks for your desire to help.

Yes I've started to write something locally but I would like to have some solid ground and final releases so that I can test and write at the same time 😄

keilw commented 5 years ago

As a member of the EG @magesh678 would be able to edit the guidebook already. If it exists, there is a team called @unitsofmeasurement/content-developers which is not directly related to the JSR itself. As with Observers or Contributors (which are not strictly for the contributor members of the JSR) we're happy to invite those interested to help into such a team.

keilw commented 5 years ago

Actually I saw, there is a chapter https://unitsofmeasurement.gitbook.io/uom-guide/getting-started/getting-started-with-indriya already in the UoM Guidebook. @magesh678, @lfoppiano and others, could you please get in touch over what other chapters in the "Getting Started" section might be useful, or if what you have prepared fits there best?

frothga commented 4 years ago

I have a similar question to the OP. Basically, there is no single coherent explanation of the role each package plays or their dependency chain. I don't consider the dependency chains hidden in Maven to be sufficient documentation. The UoM Guidebook might be a reasonable place for this, but it is little more than a skeleton. The closest example is https://github.com/unitsofmeasurement/uom-systems . That page seems a bit out of date, and would need a more explicit mapping to packages.

I've been using the UoM suite of java packages for several years now. My use case is:

I'm currently using these packages: si-quantity-0.9.jar si-units-java8-0.9.jar systems-quantity-0.9.jar systems-ucum-java8-1.0.jar unit-api-1.0.jar uom-lib-common-1.0.2.jar uom-se-1.0.9.jar

(This seems like an awful lot of packages just to do the most basic UoM tasks.)

I want to upgrade to the most current packages, but it is not clear which are needed. For instance, what is the relationship between "-java8" and non-java8 packages? Does indriya simplify any of the packaging? Which "common" packages are (still) required?

frothga commented 4 years ago

After carefully tracing all the dependencies in Maven, it seems like the biggest single question is: What is the role of "-java8" packages? How does one decide whether the use them versus the (apparently more up-to-date) non-java8 packages?