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

Fails to document python functions in jupyter notebook #104

Open
rabyj opened this issue Mar 16, 2023 · 2 comments
Open

Fails to document python functions in jupyter notebook #104

rabyj opened this issue Mar 16, 2023 · 2 comments

Comments

@rabyj
Copy link

rabyj commented Mar 16, 2023

Context

Python: 3.10.9
Mintlify Doc Writer: 2.2.1

Problem

Mintlify does not manage to properly read python when it is in a .ipynb notebook, but it still manages simple functions with the highlight method. It declares that Language not supported, so no general functions are available, but I do not know the exact failure conditions.

Here are two examples of results when you highlight and use the context menu (within a cell).

Examples

Example that does not work (fails with a *|MARKER_CURSOR|* result)

from sklearn.model_selection import cross_val_score
def model_score(X,y,class_model,params) -> float:
    scores = cross_val_score(
        estimator=class_model,
        X=X,
        y=y,
        scoring="Accuracy",
        cv=5,
        **params
    )
    return scores.mean()

Minimal example that works

# Defining a function called `a_fct` that takes two arguments, `x` and `y`, and returns the sum of `x` and `y`.
def a_fct(x, y):
    return x + y
@smohiuddin
Copy link

+1

@rabyj
Copy link
Author

rabyj commented Dec 6, 2023

@smohiuddin product appears abandoned, consider switching to another workflow if you're still using Mintlify.

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

No branches or pull requests

2 participants