Skip to content
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

List of general functions and their documentation isn't showing up in the documentation #1146

Closed
DavidHinchee opened this issue Aug 13, 2022 · 10 comments · Fixed by #1148
Closed

Comments

@DavidHinchee
Copy link

"General Functions" link on this page doesn't open the list of general functions and their documentation:

This link: https://pyjanitor-devs.github.io/pyjanitor/api/functions/

and this link: https://pyjanitor-devs.github.io/pyjanitor/api/functions/#janitor.functions--general-functions

display same page.

All other "API Reference" subsection links--Biology, Chemistry, Engineering, etc.--display functions & descriptions, but not the General

@Zeroto521
Copy link
Member

Zeroto521 commented Aug 13, 2022

I can make sure mkdocstrings 0.19.0 #1138 cause this.
0.19.0 is breaking changing version.

The lower version use mkdocstrings-python-legacy as the documentation hander.

A quickly fix this we can mkdocstrings-python-legacy as the default handler instead of mkdocstrings-python

As the developer said, mkdocstrings-python is the future.
mkdocstrings-python-legacy official has a note.

WARNING: We suggest using the new handler instead: mkdocstrings-python.

@Zeroto521
Copy link
Member

Zeroto521 commented Aug 13, 2022

I know little about mkdocs, I use sphinx a lot.
I don't why functions documentation missing.

But I know how to fix this.
image

    Method chaining usage example:

-    >>> import pandas as pd
-    >>> import janitor.finance
-    >>> df = pd.DataFrame({"profit":[100.10, 200.20, 300.30, 400.40, 500.50]})
-    >>> df
-       profit
-    0   100.1
-    1   200.2
-    2   300.3
-    3   400.4
-    4   500.5
-    >>> df.inflate_currency(
-    ...    column_name='profit',
-    ...    country='USA',
-    ...    currency_year=2015,
-    ...    to_year=2018,
-    ...    make_new_column=True
-    ... )
-       profit  profit_2018
-    0   100.1   106.050596
-    1   200.2   212.101191
-    2   300.3   318.151787
-    3   400.4   424.202382
-    4   500.5   530.252978
+    ```python
+    >>> import pandas as pd
+    >>> import janitor.finance
+    >>> df = pd.DataFrame({"profit":[100.10, 200.20, 300.30, 400.40, 500.50]})
+    >>> df
+       profit
+    0   100.1
+    1   200.2
+    2   300.3
+    3   400.4
+    4   500.5
+    >>> df.inflate_currency(
+    ...    column_name='profit',
+    ...    country='USA',
+    ...    currency_year=2015,
+    ...    to_year=2018,
+    ...    make_new_column=True
+    ... )
+       profit  profit_2018
+    0   100.1   106.050596
+    1   200.2   212.101191
+    2   300.3   318.151787
+    3   400.4   424.202382
+    4   500.5   530.252978
+    ```

or

    Method chaining usage example:

-    >>> import pandas as pd
-    >>> import janitor.finance
-    >>> df = pd.DataFrame({"profit":[100.10, 200.20, 300.30, 400.40, 500.50]})
-    >>> df
-       profit
-    0   100.1
-    1   200.2
-    2   300.3
-    3   400.4
-    4   500.5
-    >>> df.inflate_currency(
-    ...    column_name='profit',
-    ...    country='USA',
-    ...    currency_year=2015,
-    ...    to_year=2018,
-    ...    make_new_column=True
-    ... )
-       profit  profit_2018
-    0   100.1   106.050596
-    1   200.2   212.101191
-    2   300.3   318.151787
-    3   400.4   424.202382
-    4   500.5   530.252978
+       >>> import pandas as pd
+       >>> import janitor.finance
+       >>> df = pd.DataFrame({"profit":[100.10, 200.20, 300.30, 400.40, 500.50]})
+       >>> df
+          profit
+       0   100.1
+       1   200.2
+       2   300.3
+       3   400.4
+       4   500.5
+       >>> df.inflate_currency(
+       ...    column_name='profit',
+       ...    country='USA',
+       ...    currency_year=2015,
+       ...    to_year=2018,
+       ...    make_new_column=True
+       ... )
+          profit  profit_2018
+       0   100.1   106.050596
+       1   200.2   212.101191
+       2   300.3   318.151787
+       3   400.4   424.202382
+       4   500.5   530.252978

@samukweku
Copy link
Collaborator

thanks @DavidHinchee for the observation. @Zeroto521 @ericmjl should we revert temporarily to mkdocs-python-legacy?

@Zeroto521
Copy link
Member

Zeroto521 commented Aug 14, 2022

Does Mkdocs have documentation version feature?
We always let us see latest version. But some new coming features are not in stable (released) package.
If Mkdocs owns this feature, we could easily fix it via pointing site to stable version documentation.
image

@samukweku
Copy link
Collaborator

@Zeroto521 something like this: link

@ericmjl
Copy link
Member

ericmjl commented Aug 14, 2022

I am pushing up a temporary fix for the docs; we will pin mkdocstrings to 0.18.1. In a future PR, this can be fixed up.

@samukweku
Copy link
Collaborator

@DavidHinchee kindly have a look now; the documentation should render completely

@DavidHinchee
Copy link
Author

DavidHinchee commented Aug 15, 2022 via email

@ericmjl
Copy link
Member

ericmjl commented Aug 15, 2022

Thank you, @DavidHinchee, for letting us know! The positive feedback is encouraging!

@Zeroto521
Copy link
Member

There has another reason need to set the versioning feature for the docs website. #1145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants