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

Add option to use the package online #20

Closed
mdtanker opened this issue Jul 26, 2022 · 1 comment
Closed

Add option to use the package online #20

mdtanker opened this issue Jul 26, 2022 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@mdtanker
Copy link
Owner

Description of the desired feature:

Choose between Google Colab or Binder

Binder

Colab

  • can install packages within the Colab with !pip install or !apt-get install
  • Follow directions here to set up PyGMT on Colab
%%capture
!sudo apt update
!sudo apt upgrade -y
!sudo apt install -y build-essential cmake libcurl4-gnutls-dev libnetcdf-dev gdal-bin libgdal-dev libfftw3-dev libpcre3-dev liblapack-dev libblas-dev libglib2.0-dev ghostscript ghostscript-x graphicsmagick ffmpeg xdg-utils
# clone gmt from source
!git clone --depth 50 https://github.com/GenericMappingTools/gmt
# cmake everything
!cmake /content/gmt
# build and install
!cmake --build . --target install

# just for the paranoics (answer should be )/usr/local/bin/gmt
!which GMT

# install pygmt and geopandas with pip
%%capture
!pip install pygmt geopandas

# %load_ext autoreload
# %autoreload 2
# install antarctic_plots with pip
%%capture
!pip install antarctic_plots
from antarctic_plots import profile
from antarctic_plots import fetch

Above only recognized v0.0.1 of antarctic_plots

Other things

Are you willing to help implement and maintain this feature?

Yes

@mdtanker mdtanker added this to the v.0.0.4 milestone Jul 26, 2022
@mdtanker mdtanker added the enhancement New feature or request label Jul 26, 2022
@mdtanker
Copy link
Owner Author

mdtanker commented Sep 6, 2022

Added folder /binder with environment.yml. This automatically re-builds binder with each PR with the pinned packages in the above file.

I haven't figured out how to have conda install optional dependencies, so tqdm is included for pooch[progress], and the following are included for xarray[io]:

  • cfgrib=0.9.10.1
  • rasterio=1.3.2
  • cftime=1.6.1
  • zarr=2.12.0
  • pydap=3.2.2
  • scipy=1.6.1
  • h5netcdf=1.0.2
  • netcdf4=1.6.0

After lots of attempts, the following commit had the successful environment.yml file: c88a23c

The binder link is: https://mybinder.org/v2/gh/mdtanker/antarctic_plots/c88a23c9dfe92c36f0bfdbbc277d926c2de763de

Still need to follow this link to help reduce the binder build time, and to stop rebuilding at each commit.

@mdtanker mdtanker closed this as completed Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant