explosion / explosion/radicli

Allow examples when auto documenting workflow

Open
#30 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
111
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Currently, commands remove spacing and newlines when creating the documentation from the docstring. This prevents adding examples to the documentation.

E.g.
```
Runs the Benchmark on a specified model.

**Example:**

```{python}
# running a model on all languages and tasks
seb run sentence-transformers/all-MiniLM-L6-v2 -o results.json

# Running a model on a subset of languages
seb run sentence-transformers/all-MiniLM-L6-v2 -o results.json -l da sv no nn

# Running a model on a subset of tasks
seb run sentence-transformers/all-MiniLM-L6-v2 -o results.json -t DKHate ScaLA
```

Becomes:

```
Runs the Benchmark on a specified model. Example: ```{python} # running a model on all languages and tasks seb run sentence-transformers/all-MiniLM-L6-v2 -o results.json # Running a model on a subset of languages seb run sentence-transformers/all-MiniLM-L6-v2 -o results.json -l da sv no nn # Running a model on a subset of tasks seb run sentence-transformers/all-MiniLM-L6-v2 -o results.json -t DKHate ScaLA
```

A potential fix is to remove the `_strip` command to avoid removing newlines.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.