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

Consider making iris.unit submodule its own module. #1563

Closed
ocefpaf opened this issue Feb 25, 2015 · 14 comments
Closed

Consider making iris.unit submodule its own module. #1563

ocefpaf opened this issue Feb 25, 2015 · 14 comments

Comments

@ocefpaf
Copy link
Member

ocefpaf commented Feb 25, 2015

Hello! This is more a request than an issue.

There are some projects that do not need all of iris, but would be greatly improved with some of iris parts. one of them is iris.unit. There is some ongoing discussion on using it here, but having iris as a dependency is not an option for most projects.

@pelson
Copy link
Member

pelson commented Feb 27, 2015

👍 - I'd find this a most welcome improvement.
Is this something you'd be interested in taking a look at @ocefpaf?

Thanks for the heads up!

@rhattersley
Copy link
Member

some of iris parts. one of them is iris.unit

Out of interest, what are the other parts?

@ocefpaf
Copy link
Member Author

ocefpaf commented Feb 27, 2015

Is this something you'd be interested in taking a look at @ocefpaf?

Yes. I will try (and cry for help if I crash and burn). Wait for something next week...

@rhattersley I know that the "cf interpretation" that iris does is of great interest to people like @rsignell-usgs.

On the top of my head I think that splitting the fileformats (netcdf, pp, grib, etc) would make iris installation easier and lighter for people using just one format. (I only use netcdf for example.)
Something like what pydap does for the handlers and responses.

(Although, iris installation became much easier lately that this is not a big issue anymore.)

@pelson
Copy link
Member

pelson commented Mar 2, 2015

On the top of my head I think that splitting the fileformats

Agreed. On my radar in the short-ish term is the Unified Model type files such as Fieldsfiles and PP.

Wait for something next week...

Cool. Keep us in the loop, I'd be happy to help if you hit any blockers.

@ocefpaf
Copy link
Member Author

ocefpaf commented Mar 12, 2015

Thanks to iris high quality code it was easy to hack (and slash) the code and create a units stand-alone module. I have a prototype working:

http:https://nbviewer.ipython.org/gist/ocefpaf/ba386349d035edd15dcf

I still need to:

  • import all the tests from iris
  • prepare an iris PR that removes all units code and imports this instead

But before I do that I have a few questions. Should I create a GitHub repository using my account with this prototype? Is that OK with iris license?

(Once this is done, and if there is interested, we'll move it to Scitools of course.)

PS: @rhattersley While working on this I found out about symbols.py, and that is another good candidate to be a stand-alone module 😉

@QuLogic
Copy link
Member

QuLogic commented Mar 12, 2015

Should I create a GitHub repository using my account with this prototype? Is that OK with iris license?

The ToS of GitHub allow you to fork and do edits at will. But license-wise, that is the point of the (L)GPL. The code (that was obtained under the terms of the LGPL) will always be free.

@ocefpaf
Copy link
Member Author

ocefpaf commented Mar 12, 2015

It is not really a fork in the GitHub sense of "forks." Although I could fork, rename, and remove everything non-units from the repository, but that sounds like an overkill.

I will start a repository with the same licenses and later on, if this takes flight, you'll decide where it should live.

@ocefpaf
Copy link
Member Author

ocefpaf commented Mar 12, 2015

@ChrisBarker-NOAA
Copy link

@ocefpaf : very cool!

Pardon my ignorance, but will this work all on its own -- i.e. not requiring udnitspy (though probably requiring udunits itself)

@QuLogic
Copy link
Member

QuLogic commented Mar 12, 2015

Just as an aside, there already appears to be a Python package named "units", so you may wish to choose an alternate name. While that package is quite old, it might be a bit confusing.

@ocefpaf
Copy link
Member Author

ocefpaf commented Mar 12, 2015

@QuLogic yes, i just realized that 😞 Suggestions? iris_units?

BTW: Iris was also taken, but this did not stop anyone 😜

@ocefpaf
Copy link
Member Author

ocefpaf commented Mar 12, 2015

Pardon my ignorance, but will this work all on its own -- i.e. not requiring udnitspy (though probably requiring udunits itself)

Correct @ChrisBarker-NOAA. It is substitute for udnitspy 😃 , but still dependent on udunits2 😒

See: http:https://nbviewer.ipython.org/gist/ocefpaf/60ecac928612f5ae8fed

@ChrisBarker-NOAA
Copy link

Maybe "cf_units" it's all about CF, but theoretically only used by Iris, rather than the other way around. But I don't care, really. Good to have "units" in the name, so people will find it.

@ocefpaf : maybe udinits2 could be built-in, rather then kept as a separate package. It would make it harder to build, but then it would be only one package to manage.

-CHB

@pelson
Copy link
Member

pelson commented May 16, 2016

We did this. Yay to cf-units! https://github.com/SciTools/cf_units/.

@pelson pelson closed this as completed May 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants