-
Notifications
You must be signed in to change notification settings - Fork 300
Small modification to documentation around cube constructor #862
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
Conversation
lib/iris/cube.py
Outdated
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.
Typo: by -> be
|
sorry Andrew - that was rubbish on my part. |
|
I've also just noticed the little status line that suggests the Travis CI build is broken - is this something I've done (is the line with the reference too long for instance - and its failing some style checking?) |
lib/iris/cube.py
Outdated
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.
Typo: convertable -> convertible
This is not strictly correct though because array subclasses such as masked arrays are allowed, they are not converted with numpy.asarray(). The following might be more correct:
"If the object contains phenomenon values it can be a numpy array or array subclass, or any object that is convertible to an array using :func:numpy.asarray."
although I'm not sure if that is more detail than is needed. Perhaps some one else has thoughts on this.
|
@jkettleb - your update caused another comment to disappear, I've added it back. The test fail is due to an error, but your long line probably would have caused the coding standards test to fail, don't worry though, the previous comment suggests you should remove it anyway. |
|
@ajdawson - Hello Andrew, not sure what I did to remove that other comment (if know what I did so I can avoid doing it in future - that would be great. I've revised the text based on your latest comments. I hope that reflects things more accurately. |
|
@jkettleb - Don't worry about it, it was just because you made a change to the same line the comment was on so github considered both comments to refer to out of date code. You were just too quick! |
lib/iris/cube.py
Outdated
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.
Very minor (i.e. not a deal breaker for me), but you don't need the :py prefix here, Sphinx defaults to the Python domain.
|
NB. It looks like the CF standard name table has gone offline again 😦 so all the Travis tests are failing. But once we're happy with the PR we can just test on our own dev machines and merge. |
|
I've removed the |
lib/iris/cube.py
Outdated
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 don't think this reads correctly, you shouldn't start a new sentence with "Where". We should keep this short and simple, I really preferred this:
If the object contains phenomenon values it can be a numpy array
or array subclass, or any object that is convertible to an array using
:func:`numpy.asarray`.
because it doesn't get too complicated, just an array or anything that is like an array, the following would be fine too:
If the object contains phenomenon values it can be a numpy array
or array subclass, or an *array_like* as described in
:func:`numpy.asarray`.
Remember that the reference to numpy.asarray will be turned into a link to the numpy documentation for that function in the online iris documentation, so users should have no problem finding what they need.
|
@ajdawson - Andrew - any better? English isn't my strong point (so I guess you could ask why am I trying to write documentation...) |
lib/iris/cube.py
Outdated
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.
Bang a full stop on the end and we're good to go I think.
|
@jkettleb - I personally think writing good documentation is one of the hardest parts of the project, it is always tricky to know what to write. Don't be disheartened at all, these types of contribution are extremely valuable to the project and we're really glad you took the time to do this. I made one last comment about a full stop but other than that I'm happy. |
|
Thanks @jkettleb. Since there are a lot of commits here would you mind squashing them into a single commit before this is merged. If you aren't sure how to do that the last section of this page in the developer guide explains how to do it. In your case you'd need to do: Which will pop open an editor where you leave the first line as it is and just replace the "pick" at the start of each other line with "f", save the file and your 7 commits should be squashed into a single commit. Please feel free to ask if you need any further guidance. |
|
I'm guessing @jkettleb is a Met Office employee, in which case I'm also guessing his life has already been signed away and we don't need a CLA? Just want to check before merging @rhattersley, @munslowa? |
|
@jkettleb - I forgot to say before... but it is always a good idea to back up your branch before doing the interactive rebase (squashing) in case you make a mistake. |
|
@ajdawson, Andrew - thanks for the tips on rebasing. I think I have done it - does it look ok from your view? Thanks for the review and advice around this pull request. |
|
👍 |
Small modification to documentation around cube constructor
|
Good work @jkettleb. As I said before writing good documentation is very hard and your efforts in this area are highly valued. |
Hello,
this is a very small modification. I wanted to try put it into a pull request on its own as its my first attempt at doing this. As it's small it hopefully won't waste a huge amount of anyone's time.
I have a couple of reservations about what I've done...
Jamie