Skip to content

Add instructions to upgrade installed PyGMT version - #1029

Merged
seisman merged 18 commits into
GenericMappingTools:masterfrom
core-man:pygmt-install
Mar 11, 2021
Merged

seisman merged 18 commits into
GenericMappingTools:masterfrom
core-man:pygmt-install

Conversation

@core-man

@core-man core-man commented Mar 9, 2021 •

Copy link
Copy Markdown
Member

Description of proposed changes

Add how to update PyGMT stable and dev version and some tiny improvements.

Fixes #

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@core-man
core-man requested a review from weiji14 March 9, 2021 09:27
@seisman seisman added the documentation Improvements or additions to documentation label Mar 9, 2021
@seisman seisman added this to the 0.3.1 milestone Mar 9, 2021
@weiji14

weiji14 commented Mar 9, 2021

Copy link
Copy Markdown
Member

Would it be possible to move the update steps into its own dedicated section? The Using pip subsection has 5 pip install ... lines and it might be overwhelming to people on why there are so many ways to pip install PyGMT!

@seisman
seisman marked this pull request as draft March 9, 2021 20:59
@seisman

seisman commented Mar 9, 2021

Copy link
Copy Markdown
Member

Would it be possible to move the update steps into its own dedicated section? The Using pip subsection has 5 pip install ... lines and it might be overwhelming to people on why there are so many ways to pip install PyGMT!

I agree that this subsection is too long to read. I think we can remove "pip install from github":

pip install git+https://github.com/GenericMappingTools/pygmt.git#egg=pygmt

because it works the same as "pip install from TestPyPI" (it's different, but is the same for users):

pip install --pre --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pygmt

As for upgrading PyGMT, instead of showing the long commands, I think we can simply say something like:

To upgrade the installed development version to be the latest one, just add --upgrade option
to the pip install command.

@seisman

seisman commented Mar 9, 2021

Copy link
Copy Markdown
Member

Some other suggestions:

Line 32: should add a comma after e.g..

Line 43:

The sections below provide more detailed, step by step instructions to installing and testing PyGMT for those who may have a slightly different setup or want to install the latest development version.

Is the above sentence correct? Should we change "to installing and testing" to "to install and test"?

Line 92:

IPython: For embedding the figures in Jupyter notebooks.

I think we should recommend Jupyter or JupyterLab, not IPython.

@core-man

Copy link
Copy Markdown
Member Author

Line 32: should add a comma after e.g..

Line 43:

The sections below provide more detailed, step by step instructions to installing and testing PyGMT for those who may have a slightly different setup or want to install the latest development version.

Is the above sentence correct? Should we change "to installing and testing" to "to install and test"?

done in 49165b1.

@core-man

Copy link
Copy Markdown
Member Author

Would it be possible to move the update steps into its own dedicated section? The Using pip subsection has 5 pip install ... lines and it might be overwhelming to people on why there are so many ways to pip install PyGMT!

I agree that this subsection is too long to read. I think we can remove "pip install from github":

pip install git+https://github.com/GenericMappingTools/pygmt.git#egg=pygmt

because it works the same as "pip install from TestPyPI" (it's different, but is the same for users):

pip install --pre --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pygmt

Remove "pip install from GitHub" done in 4580e0d.

As for upgrading PyGMT, instead of showing the long commands, I think we can simply say something like:

To upgrade the installed development version to be the latest one, just add --upgrade option
to the pip install command.

Simplify PyGMT update by pip in d5b4ed9.

@core-man

Copy link
Copy Markdown
Member Author

Line 92:

IPython: For embedding the figures in Jupyter notebooks.

I think we should recommend Jupyter or JupyterLab, not IPython.

Actually, we mention IPython in many places (e.g., https://www.pygmt.org/dev/tutorials/first-figure.html). I agree that it's better to recommend JupyterLab. @weiji14 how do you think?

@michaelgrund

Copy link
Copy Markdown
Member

Line 92:

IPython: For embedding the figures in Jupyter notebooks.

I think we should recommend Jupyter or JupyterLab, not IPython.

Actually, we mention IPython in many places (e.g., https://www.pygmt.org/dev/tutorials/first-figure.html). I agree that it's better to recommend JupyterLab. @weiji14 how do you think?

Should we also differentiate between Jupyter notebooks and JupyterLab? Currently, a lot of people still work with notebooks without using them in JupyterLab.

@core-man

Copy link
Copy Markdown
Member Author

Line 92:

IPython: For embedding the figures in Jupyter notebooks.

I think we should recommend Jupyter or JupyterLab, not IPython.

Actually, we mention IPython in many places (e.g., https://www.pygmt.org/dev/tutorials/first-figure.html). I agree that it's better to recommend JupyterLab. @weiji14 how do you think?

Should we also differentiate between Jupyter notebooks and JupyterLab? Currently, a lot of people still work with notebooks without using them in JupyterLab.

Shall we just recommend Jupyter, so the GMT user may choose which of JupyterLab or Jupyter Notebook they prefer?

@seisman

seisman commented Mar 10, 2021

Copy link
Copy Markdown
Member

Here is what I understand about the chaos:

  • IPython Notebook: The first generation of "notebooks". It was renamed to "Jupyter Notebook" a few years ago. We can still run ipython notebook but it's deprecated and will be removed in future versions.
  • Jupyter Notebook: The 2nd generation of "notebooks". It's still maintained but users are encouraged to transition to JupyerLab. However, there are still many users.
  • JupyterLab: The 3rd and the latest generation of "notebooks".

I think we should:

  1. Recommend JupyterLab in the installation guide.
  2. In the tutorial notes, we should say,

This tutorial assumes the use of a Python notebook, such as JupyterLab, Jupyter Notebook, or IPython Notebook.

However, please note that, after we finish and merge #529, we will remove the notes from all tutorials, because Figure.show() should work for any running environments.

@seisman

seisman commented Mar 10, 2021

Copy link
Copy Markdown
Member

BTW, I don't think our main users are Python newbies, as we use many high-level packages like numpy and pandas in the documentation. I expect that our users at least have some basic knowledge about Python, numpy, pandas, and also should have their own preferences about Jupyter Notebook or JupytereLab.

Comment thread doc/install.rst Resolved
Comment thread doc/install.rst Resolved
Comment thread doc/install.rst Resolved
core-man and others added 2 commits March 11, 2021 15:32
Co-authored-by: Michael Grund <[email protected]>
Co-authored-by: Michael Grund <[email protected]>
Comment thread doc/install.rst Resolved
Comment thread doc/install.rst Resolved
Comment thread doc/install.rst Resolved
@seisman seisman changed the title Add how to update PyGMT Add instructions to update PyGMT Mar 11, 2021
@seisman
seisman marked this pull request as ready for review March 11, 2021 16:34

@seisman seisman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

Ping @michaelgrund @willschlitzer @weiji14 for comments and approval.

Comment thread doc/install.rst Resolved

@michaelgrund michaelgrund left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Execpt the minor suggestion I provided, the PR looks fine for me.

Co-authored-by: Michael Grund <[email protected]>
Comment thread doc/install.rst
Comment on lines -150 to -153
or from PyGMT's `GitHub repository <https://github.com/GenericMappingTools/pygmt>`__
(slower as it downloads the whole archive)::

pip install git+https://github.com/GenericMappingTools/pygmt.git#egg=pygmt

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just double checking that we really want to remove this install option?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For most users, it's the same as

pip install --pre --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pygmt

but slower.

I don't see any reasons to keep it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, fine with removing it. I just think the pip install git+https option is nice when you want to install from a GitHub branch (but that's not what we're doing here).

@seisman seisman changed the title Add instructions to update PyGMT Add instructions to upgrade installed PyGMT version Mar 11, 2021
@seisman
seisman merged commit 0bb0500 into GenericMappingTools:master Mar 11, 2021
@core-man
core-man deleted the pygmt-install branch March 12, 2021 02:28
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022

This branch was previously deployed

1 inactive deployment
Preview — 33d29305 Deployed Mar 11, 2021 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants