-
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
Improve PyGMT documentation #983
Comments
Also see #631 |
I feel I am totally new to the PyGMT documentation (https://www.pygmt.org/latest/). What I am feeling when I first go through the documentation may represent some new PyGMT users. I plan to go through the documentation from the landing page to the end and make some comments about what I feel in a PR/issue. I quickly read
@GenericMappingTools/python How do you think? or do you have any comments? |
@core-man I think these are all good suggestions. We definitely need more new PyGMT users like you to help us find bugs in our documentation. |
So I think it's OK to remove
This is a good point. In the install guide, we show different ways to install PyGMT, but don't show any way to update it. I think we want people to use the latest PyGMT versions if possible, so we should add a subsection of "Upgrade PyGMT" or similar.
Windows users may not know what the
I think yes. |
@weiji14 @seisman @willschlitzer shall I open a PR to submit some revisions directly so that you can review them in the PR instead of answering the comments here? I can still submit some comments to this issue if I've no idea about something and want your suggestions and answers. |
Yes, please open a PR instead. It would be much easier to discuss. |
On https://test.pypi.org/project/pygmt/, the title is |
TestPyPI is only for testing purposes. We make a dev release for every commit merged in the master branch. The dev version string is like |
At https://www.pygmt.org/dev/index.html#documentation-for-other-versions,
The latest release is also 0.3.0, right? Why do we list both of them? How about merging them into one term?
Same question for the left side-bar. Meanwhile, shall we move Below is from GMT Documentation
|
@GenericMappingTools/python I am still a little confused why we need the Quickstart subsection? |
Yes 0.3.0 is currently the latest, but the URL is different. One is a dynamic URL https://www.pygmt.org/latest which always resolves to the latest version, the other one is a static version URL https://www.pygmt.org/v0.3.0 useful as a permalink. E.g. I could go to https://www.pygmt.org/v0.1.0 and get the documentation for some old pygmt module.
The quickstart was added in v0.3.0 (#865), and is meant to be a one-liner installation step (because the conda
The steps below the Quickstart are basically the old install steps (see https://www.pygmt.org/v0.2.1/install.html), which break down the installation into several steps: Python/Numpy et al. --> GMT --> PyGMT. This is intended for more advanced people who may have a different Python and/or GMT setup (e.g. installing via an exe file). |
@weiji14 Thanks for the detailed explanations. I see~ |
Currently, there is a note on almost every tutorial/gallery page: Some pages miss it: Gallery, projection, subplots. Shall we add this note for these pages? By the way, how about making this note as a snippet so that we can simply include it for every tutorial and don't need to copy it. @GenericMappingTools/python |
@GenericMappingTools/python If my understanding is right,
Take import pygmt
fig = pygmt.Figure()
fig.coast(
region="JP",
projection="M12c",
land="lightgray",
)
print(fig.region) Output:
Use
We can see:
I don't know if some statements in the user guide about this option are right or exact. For example,
Does the above statement mean to be multiples of these steps?
The comment is a little misleading or wrong, since
Not exact?
I cannot understand this comment which actually should be that for |
|
Yes, @weiji14 found the issue in #975 (comment), and I added it in #975. But #975 won't be merged recently, so you can open a PR fixing it if you want. |
Good to know. Waiting for that PR be merged. |
Lots of great work here, @core-man! Are there any other PRs that you plan to submit as part of this issue or is it ready to be closed? |
@meghanrjones Thanks for the reminding. Actually, the initial topic at the top is not discussed and not resolved because I begin to work with you from this issue and go off-topic later. Which one shall we use, I think we may discuss here and fix them when a PR works on the file containing them in the future instead of finding and revising all of them in a PR. How do you think? |
Even though it looks a bit silly in the source code and it’s different than pandas and other packages, I actually like how |
I think we have five ways to show a string value in the docstring. Please see the table below. (BTW, we can use either ' or " in the python source code to indicate a string value)
Some examples in PyGMT source codes are shown below:
This example sets a string value to a parameter. Line 85 in 955a55e
I think we may have two topics here: A. Shall we add
B. ' or "?
|
Great summary! To start, want to open a PR adding your recommended documentation conventions for these two topics to the CONTRIBUTING.md example code standards section? People could recommend revisions to the guidance through a PR review if necessary - but these seem like a good starting point. |
How about waiting for comments from other contributors and maintainers here for 1-2 days? Maybe they have better ideas. |
I thought that only people who would be aware of this conversation are those who have notifications turned on for every event in the PyGMT repo and the two others who have commented here (but on unrelated documentation topics), meaning that opening a PR would probably involve more people into the discussion without needing to open a separate, more focused issue. But, if you want to wait that is fine. |
Woow~ I see. Thanks a lot for the explanation 😄 . Let's open a PR. |
I hope my comment did not come across as a rebuke and am very sorry if it did - there's definitely merits to both paths fowards. |
Not at all, I think you are right. I thought all of us turn notifications on for every event. I am heading to bed now and will work on it tomorrow. |
Single-quotes and double-quotes are the same in Python. Our codes use double quotes following the Another alternative way is using bold text, for example, 05m, as bold text means literal arguments in both GMT and PyGMT documentation. |
We have to decide whether we want to add quotes to all arguments, e.g.,
'05m'
or05m
. Originally posted in #976 (comment).We use quotes for many arguments, e.g.,
pygmt/pygmt/datasets/earth_relief.py
Lines 34 to 39 in afe9293
Meanwhile, we don't use quotes in some cases, e.g.,
pygmt/pygmt/datasets/earth_relief.py
Lines 44 to 45 in afe9293
We could refer to other projects posted in #976 (comment)
The text was updated successfully, but these errors were encountered: