-
Notifications
You must be signed in to change notification settings - Fork 224
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 optional dependencies to pyproject.toml #2069
Conversation
I'm not sure if we should update the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should update the
pip install pygmt
command 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
@@ -32,6 +32,11 @@ dependencies = [ | |||
] | |||
dynamic = ["version"] | |||
|
|||
[project.optional-dependencies] | |||
all = [ | |||
"geopandas" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because we also try to import IPython in our codes.
4cc4429
to
4483e01
Compare
Co-authored-by: Wei Ji <[email protected]>
Co-authored-by: Wei Ji <[email protected]>
Description of proposed changes
As suggested in #1848 (comment), this PR adds
optional-dependencies
to 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 format
andmake check
to 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