SlideRuleEarth / sliderule-python

SlideRule Earth Example Notebooks: On-demand, cloud-based processing of satellite mission data (NASA ICESat-2, GEDI, ArcticDEM/REMA, HLS)
https://slideruleearth.io/rtd/
BSD 3-Clause "New" or "Revised" License
41 stars 21 forks source link

Update example api_widget_demo.ipynb #128

Closed dshean closed 1 year ago

dshean commented 1 year ago

Error reported by Martin Truffer when trying to run api_widget_demo.ipynb on fresh install.

%%time
# sliderule asset and data release
asset = SRwidgets.asset.value
release = SRwidgets.release.value
# build sliderule parameters using latest values from widget
parms = SRwidgets.build_atl06()

# create an empty geodataframe
gdf = icesat2.emptyframe()

# for each region of interest
for poly in m.regions:
    # add polygon from map to sliderule parameters
    parms["poly"] = poly 
    # make the request to the SlideRule (ATL06-SR) endpoint
    # and pass it the request parameters to request ATL06 Data
    gdf = gdf.append(icesat2.atl06p(parms, asset, version=release))

AttributeError                            Traceback (most recent call last)
File <timed exec>:8

AttributeError: module 'sliderule.icesat2' has no attribute 'emptyframe'
dshean commented 1 year ago

Maybe we should just get rid of this notebook? I think most of the functionality is in the voila_demo notebook?

jpswinski commented 1 year ago

@dshean, looking at the code snippet, it appears the code is coming from the development branch on this repository. That branch contains the tip of development and is not always consistent. The main branch is the code base that matches the public cluster and has all of the examples consistent and working.

After the paper review, I switched the default branch to the development branch to address the valid concern that anyone wanting to contribute to this repo needed to know to branch and create pull requests off of the development instead of main, and so by making development the default branch, any contributors were likely to start from where they needed to be without worrying about it.

But now I see that I only made things worse as people who are using the repository to install the client and get easy access to the examples need to first switch to main which is not said anywhere and is far from obvious.

I have switched the default branch back to main, and will add guidance in our contribution guidelines on switching to the development branch for any pull requests. I think this is the best option for now.

dshean commented 1 year ago

@martintruffer

jpswinski commented 1 year ago

Closing for now. Feel free to reopen if additional issues arise.