Skip to content

Some potential improvements of the installation instructions #3371

Closed

Description

@seisman

Looking at the Installation Instructions, currently four optional dependencies are listed

  • IPython: For embedding the figures in Jupyter notebooks (recommended).
  • Contextily: For retrieving tile maps from the internet.
  • GeoPandas: For using and plotting GeoDataFrame objects.
  • RioXarray: For saving multi-band rasters to GeoTIFFs.

Here are my thoughts:

  1. Install the optional dependencies in the Installing GMT and other dependencies step to have a full-feature PyGMT. There are two options: (1) add optional dependencies when creating the virtual environment; (2) add a separate command: mamba install ipython contextily geopandas rioxarray to install the optional packages after creating the virtual environment.

  2. Are IPython and GeoPandas considered optional dependencies? (1) PyGMT supports GeoPandas objects as inputs but GeoPandas is not imported anywhere in the PyGMT source codes; (2) IPython is needed for embedding figures in Jupyter Notebooks, but as long as users are in a Notebook environment, IPython is always available since it's a dependency of Jupyter.

  3. Some packages like GeoPandas/Shapely/PyArrow, are not directly used in PyGMT, but it's good to let users know that PyGMT supports them.

Activity

  1. added
    discussions
    on Aug 4, 2024
  2. seisman commented on Aug 13, 2024

    @seisman
    MemberAuthor

    Ping @GenericMappingTools/pygmt-maintainers

  3. weiji14 commented on Sep 28, 2024

    @weiji14
    Member
    1. ... (2) add a separate command: mamba install ipython contextily geopandas rioxarray to install the optional packages after creating the virtual environment.

    Sure, we can add a tip admonition to show this, similar to how we're showing pip install pygmt[all] here:

    pygmt/doc/install.md

    Lines 218 to 221 in 89021cd

    ::: {tip}
    You can also run `python -m pip install pygmt[all]` to install pygmt with all of its
    optional dependencies.
    :::

    3. Some packages like GeoPandas/Shapely/PyArrow, are not directly used in PyGMT, but it's good to let users know that PyGMT supports them.

    Maybe we could add a section under the Technical References page or somewhere else to mention these integrations? Some of these are hiding in old issues:

    Examples of others around the Scientific Python Ecosystem:

  4. added
    documentation
    and removed
    discussions
    on Oct 11, 2024
  5. added this to the 0.14.0 milestone on Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions