-
Notifications
You must be signed in to change notification settings - Fork 300
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 documentation on putting text onto images #2517
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2517 +/- ##
=======================================
Coverage 94.94% 94.94%
=======================================
Files 354 354
Lines 51474 51474
=======================================
Hits 48873 48873
Misses 2601 2601
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Pull Request Test Coverage Report for Build 5343898810
💛 - Coveralls |
Should we change the name |
This is difficult to answer. The confusion of the documentation page is mostly due to the poorly designed interfaces. That is, that you add overlays at save/write time rather than as a separate step. I don't think it is completely wrong where it is, but yeah maybe a name change to |
I think |
@simonrp84 not much left to finalise this one, want to give it a shot? |
Co-authored-by: Martin Raspaud <[email protected]>
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.
Looks pretty good. You'll need to update the references to the reading and writing files in the index.rst
file that points to them.
I made an inline comment for some changes. Additionally, do we want to go down the road of also documenting how to add coastlines? I suppose that would be easier when pycoast gets rewritten to automatically download/cache coastline shapefiles (a long term dream of mine), but that could be a while.
doc/source/writing.rst
Outdated
|
||
.. code-block:: python | ||
|
||
>>> decodict = {'decorate': [{'text': {'txt': f' {my_text}', |
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.
Can we make this a simple string to not confuse people? Just "txt": "my text"
?
And...based on the conversation at the meeting yesterday and @mraspaud's PR on the ruff
linting tool, can we use double quotes for all of these strings please?
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.
Done!
In general I like the idea of adding documentation on coastlines (I always end up having to search github issues for it). But I'm not sure we should add it in this PR, as I don't really have any time to work on it and we'd end up delaying the PR. Will address your inline comment this evening. |
I see also that the rtd build is failing, but I can't see what cause the error... |
@mraspaud In my comment above:
|
…quotes with double quotes.
@simonrp84 the rtd build is still failing... |
The remaining RTD errors are about docstrings referring to the old readers/writers.rst documents. Those fixes are left as an exercise for the reader. |
Ok, RTD seems to work now but was getting a failing test - I think due to numpy 2.0. Have merged |
@simonrp84 great job! the unstable build is still expected to fail so I'm merging this! |
Thanks! |
As discussed on slack, this PR adds a brief example to the documentation to describe how text can be added to an image when using
save_dataset
.