Add optional dependencies to pyproject.toml#2069
Conversation
|
I'm not sure if we should update the |
weiji14
left a comment
There was a problem hiding this comment.
I'm not sure if we should update the
pip install pygmtcommand topip install pygmt[all]in the installation instructions (https://www.pygmt.org/dev/install.html).
Wouldn't recommend replacing it with pip install pygmt[all], but I think we can mention the pip install pygmt[all] command in https://www.pygmt.org/v0.7.0/install.html#using-pip and indicate that this will install optional dependencies like geopandas.
pyproject.toml
Outdated
|
|
||
| [project.optional-dependencies] | ||
| all = [ | ||
| "geopandas" |
There was a problem hiding this comment.
Should we add ipython as well as mentioned in https://www.pygmt.org/v0.7.0/install.html#dependencies?
| "geopandas" | |
| "geopandas", | |
| "ipython" |
There was a problem hiding this comment.
Yes, because we also try to import IPython in our codes.
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
4cc4429 to
4483e01
Compare
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Description of proposed changes
As suggested in #1848 (comment), this PR adds
optional-dependenciesto pyproject.toml so that people can runpip install pygmt[all]to install pygmt with optional dependencies included.To test it locally, you can check out this branch, change into the root directory, and run
and
you should see that
pip install .[all]also check if geopandas is installed whilepip install .doesn't.Address #1848 (comment).
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version