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

pip install fails because PyPi only has cell_tree2d==0.1.1 #105

Open
acrosby opened this issue Nov 16, 2017 · 5 comments
Open

pip install fails because PyPi only has cell_tree2d==0.1.1 #105

acrosby opened this issue Nov 16, 2017 · 5 comments

Comments

@acrosby
Copy link

acrosby commented Nov 16, 2017

This is for both the master branch and the latest release. Is version 0.1.3 or greater of cell_tree2d really required?

Thanks!

@ChrisBarker-NOAA
Copy link
Contributor

This is the trick -- cell_tree2d is an optional dependency, and pip is not very good with that.

(or at least, I don't know how to configure it to do that...)

But if you want to use the cell_tree point-in-cell location, then yes, I think 0.1.3 is needed.

What we should do is push it up to PyPi, but it's here if you want to just get it working:

https://github.com/NOAA-ORR-ERD/cell_tree2d/releases

and on conda-forge

https://anaconda.org/conda-forge/cell_tree2d

(we've been kinda conda focused, which is why pypi wasn't updated.

And if you want to contribute a twine config to make it easy to get up on pypi we'll take it :-)

BTW: we (at NOAA ERD) have shifted development to the gridded package:

https://github.com/NOAA-ORR-ERD/gridded

It takes pysgrid, pyugrid (and some regular grid stuff, and (attempts to) wrap it all up under a single API.

we brought the pysgrid and pyugrid source into the package, as it's a lot easier to keep the APIs in sync, share code, etc.

@jay-hennen
Copy link
Contributor

Just pushed cell_tree2d-0.3.0 to pypi.

@acrosby
Copy link
Author

acrosby commented Nov 16, 2017

Thanks guys.

@acrosby
Copy link
Author

acrosby commented Nov 16, 2017

I'll look at a PR to support the optional deps. @ChrisBarker-NOAA does https://github.com/NOAA-ORR-ERD/gridded use pyugrid and pysgrid as deps, or do you have independent implementations of the specs?

@ChrisBarker-NOAA
Copy link
Contributor

we have copied the pyugrid and pysgrid code into the gridded source.

It was just too much of a nightmare to try to maintain them in three places, while keeping them in sync. And while in principle, I like things separate that have their own domain, and might want to be used independently, in this case:

  1. the goal it to have one API to work with, so (at least anything not grid-type-specific) can be done in exactly the same way -- so all you need is gridded, and you don't have to know ir care that it supports other grid types than the ones you care about.

  2. they all have the same dependencies, and are not all that much code, so there isn't any real overhead to putting them in one package.

I'm pretty sure that you can do:

from gridded import pysgrid

and get the same old pysgrid. Though I don't think we should guarantee that always stay the same, rather, that you would do:

import gridded

ds = gridded.Dataset(a_file_name)

and if you really needed to do something grid specific:

the_grid = ds.grid

and that will be a UGrid or SGrid or ??? object.

And yes, the docs need lots of help :-)

-CHB

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

3 participants