sgrid / pysgrid

Python tools for sgrid
BSD 3-Clause "New" or "Revised" License
10 stars 16 forks source link

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

Open acrosby opened 6 years ago

acrosby commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Just pushed cell_tree2d-0.3.0 to pypi.

acrosby commented 6 years ago

Thanks guys.

acrosby commented 6 years ago

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 commented 6 years ago

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