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

Getting started #230

Open
lfoppiano opened this issue Jun 10, 2019 · 11 comments
Open

Getting started #230

lfoppiano opened this issue Jun 10, 2019 · 11 comments

Comments

@lfoppiano
Copy link

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
Copy link
Member

teobais commented Jun 10, 2019

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
Copy link
Author

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
Copy link
Author

lfoppiano commented Jun 11, 2019

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:

  • if I want to cover all units possible (SI, non-SI, imperial, etc) what should I use
  • what are the deprecated packages?

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

Please correct me if I'm wrong.

@lfoppiano
Copy link
Author

lfoppiano commented Jul 29, 2019

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
Copy link
Member

keilw commented Jul 29, 2019

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
Copy link

Let me check Guidebook and start some work there

@lfoppiano
Copy link
Author

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
Copy link
Member

keilw commented Jul 30, 2019

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
Copy link
Member

keilw commented Jul 30, 2019

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
Copy link

frothga commented Apr 3, 2020

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:

  • Parse units that appear at the end of numbers. Units are required to follow the UCUM standard.
  • Perform unit consistency checking between parts of an expression. Eg: detect if a user is adding kilograms to dollars. :)
  • Convert number to its equivalent value in appropriate SI base units. All computation uses naked doubles. (I don't use the computation features of UoM because the simulation must be large-scale and high-performance.)

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
Copy link

frothga commented Apr 3, 2020

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?

keilw added a commit that referenced this issue Jul 15, 2020
keilw added a commit to unitsofmeasurement/uom-demos that referenced this issue Jul 16, 2020
keilw added a commit that referenced this issue Jul 22, 2020
keilw added a commit to unitsofmeasurement/unitsofmeasurement.github.io that referenced this issue Feb 21, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement-jbake that referenced this issue Feb 21, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement.github.io that referenced this issue Feb 21, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement-jbake that referenced this issue Feb 21, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement.github.io that referenced this issue Feb 21, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement-jbake that referenced this issue Feb 21, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement.github.io that referenced this issue Feb 22, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement.github.io that referenced this issue Feb 22, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement-jbake that referenced this issue Feb 22, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement.github.io that referenced this issue Feb 22, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement-jbake that referenced this issue Feb 22, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement.github.io that referenced this issue Feb 22, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement.github.io that referenced this issue Apr 25, 2021
keilw added a commit to unitsofmeasurement/unitsofmeasurement-jbake that referenced this issue Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants