xarray-contrib / xoak

xarray extension that provides tree-based indexes used for selecting irregular, n-dimensional data.
https://xoak.readthedocs.io
MIT License
57 stars 4 forks source link

Add basic examples notebook #15

Closed benbovy closed 4 years ago

benbovy commented 4 years ago

@koldunovn I remember you asked for some examples. These ones are taken from the gist I've shown at our last meeting (sorry, it's been a while!)

benbovy commented 4 years ago

The binder setup is a workaround that I've found in https://github.com/jupyterhub/repo2docker/issues/835#issue-556130444, as poetry is not yet supported (I have other problems with poetry, e.g., editable - dev - install seems not well supported / not very flexible and my IDE has troubles with poetry... but that's other issues).

willirath commented 4 years ago

@benbovy Great to see progress here! I was pretty absorbed in other projects and my guilt-level was approaching values where it actively blocks picking this up again... :)

benbovy commented 4 years ago

my guilt-level was approaching values where it actively blocks picking this up again...

Hehe, I know that kind of feeling too well :). No worries at all!

willirath commented 4 years ago

Re poetry: Wouldn't a

python -m pip install .

work as well? At least this is true on my box:

$ conda activate base
$ conda create -n poetxoak python=3 pip -y
[...]
$ conda activate poetxoak
$ pip install git+https://github.com/ESM-VFC/xoak.git@master
[...]
$ python -c "import xoak" && echo "successfully installed xoak with pip"
successfully installed xoak with pip
benbovy commented 4 years ago

Yes, but this doesn't work:

$ python -m pip install -e .
ERROR: File "setup.py" not found. Directory cannot be installed in editable mode ...
(A "pyproject.toml" file was found, but editable mode currently requires a setup.py based build.)

However I've just found that poetry install installs the library in development mode.

willirath commented 4 years ago

Ah, yes a dev-mode install is not easily possible here. I agree this is desirable at the current stage of the development.

benbovy commented 4 years ago

I'm going to merge this to have the notebook example available in the main branch (check fails are not related to the additions here). Let's see if binder works and maybe fix that in follow-up PRs.