-
Notifications
You must be signed in to change notification settings - Fork 477
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 the docs #972
Comments
There seems to be an issue regarding the Dataframe Integration
This Code Snippet given by the Docs does not work and returns the error; 'DataFrame' object has no attribute 'pint' |
i just checked more to the Dataframe Integration this part also Produces Errors:
Produces the error: data type 'pint[lbf ft]' not understood Im now assuming there is just an import or a setup missing in the Documentation and that fails the Code snippets. Which makes the Pandas Integration part very unintuitive or rather not at all understandable because it is not reproducable. |
Here are some of the thoughts I had (from a high-level perspective, not getting into finer details of the individual pages):
I think many of these could be benefited by changing to a new theme, like the very commonly used Sphinx RTD theme (used by xarray, Dask, CuPy, MetPy, and many others). Would that be a reasonable first step? |
i second the sidebar menu that would be a great addition |
Regarding Navigation and Small-screen friendliness, I think we just need to use another template. This current one has been with us from the very beginning and it has serve us well. But we need to change. My only requirement is that we keep the pint of beer. Regarding API Reference: 100% agree Regarding issues raised by @Meistermagier, I think we need to use doctest in combination with travis more extensively. Additionally, it would be good to test the jupyter notebooks that we might upload. |
Just echoing what others have said, especially regarding the API reference. The formatting is hard to read, it doesn't have subsections, the There should also be a better page index on the left of the docs, at the moment you have to scroll to the bottom of the homepage to find anything. That said I think apart from that the docs are nice, the tutorial sections and descriptions in particular are really good! (Which is the most important part I think). |
1116: Harmonize most doctests with Pint's current behavior r=hgrecco a=clarkgwillison - [ ] Closes # (no single issue) - [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors - [x] The change is fully covered by automated unit tests - [x] Documented in docs/ as appropriate - [x] Added an entry to the CHANGES file This PR partially addresses #947, #972, and #990 After merging, the number of failing doctests in the Sphinx documentation should go from 92 (as mentioned in #947) down to 3: ``` Doctest summary =============== 335 tests 3 failures in tests 0 failures in setup code 0 failures in cleanup code build finished with problems. make: *** [doctest] Error 1 ``` Which will put us well in reach of enabling doctests in Travis to prevent documentation regressions in the future. Most tests were fixed in this PR by deferring to the current behavior of Pint, however `Quantity.__repr__()` was modified to round floating point magnitudes to 9 digits to avoid several test failures that were being caused by floating point ambiguities. Issue #1115 was opened to track the 3 tests that I could not easily resolve. Once that issue is resolved, we can enable doctests in Travis without breaking CI. Co-authored-by: Clark Willison <[email protected]>
1132: Some rewriting and rearranging of docs, including more (and fixed) links r=hgrecco a=clarkgwillison - [x] Addresses (but not closes) #972 - [x] Executed ``black -t py36 . && isort -rc . && flake8`` with no errors - [x] The change is fully covered by automated unit tests - [x] Documented in docs/ as appropriate - [ ] Added an entry to the CHANGES file This PR started with small fixes to links (small syntax errors that were causing links not to render in Sphinx) and some grammar changes, but ended up redoing much of the tutorial page. The main commit is 3a1d475, which moves a good portion of the "parsing strings" section of the tutorial to a new page dedicated to explaining all the ways to define a `Quantity()` in Pint. Theory here is a slightly shorter tutorial with good links to more in-depth coverage will be more helpful to new users and old, but that's just a theory. This PR also removes the testsuite from the developer reference, though it doesn't fix any of the other rendering issues in there. Feedback humbly solicited. Co-authored-by: Clark Willison <[email protected]>
I'm gonna tackle this soon. I'll probably change the theme for either pydata-sphinx-theme (numpy, pandas, ...) or sphinx_book_theme (xarray) which is based on pydata theme. It will leverage a better experience & I know a bunch of contributors has experienced with this. We'll get better side bars to navigate in the docs. I'll also introduce a better API Reference which we lack at the moment. |
for some additional reference and help: https://diataxis.fr/ (formerly https://documentation.divio.com) |
originally posted in #1375 (comment) by @hgrecco:
Edit: Also, I support reorganizing the API reference. I'm not sure whether that's typical usage, but I usually look for the public API in the docs and when working on |
I like the proposed structure. I would just move the "Wrapping and checking functions" to section 3. As small title for this section I suggest "Adjusting and integrating pint". So section 3 would target the advanced user. I find the sub-title "Other cool stuff" OK for a section that describes the features that are not part of the core functionality of a unit library. "Optimizing Performance" could also fit in section 3 (or in "More information"). It does not fit to "Cool stuff". |
I also think that the
|
Closing this after #1474 |
This is just a placeholder issue to obtain feedback about the current state of the docs:
The text was updated successfully, but these errors were encountered: