|
1 |
| -## :tests |
2 |
| - |
3 |
| -Code samples for the documentation website reside in [core/.../test/.../samples/api](../core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api) |
4 |
| -(for samples that depend solely on `dataframe-core`), |
5 |
| -and [tests/.../samples/api](/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api) (for samples can depend on other I/O modules) |
6 |
| -and they are copied over to Markdown files in [docs/StardustDocs/topics](../docs/StardustDocs/topics) |
7 |
| -by [Korro](https://github.com/devcrocod/korro). |
8 |
| - |
9 |
| -This module might be merged with [:core](../core): [Issue #898](https://github.com/Kotlin/dataframe/issues/898). |
10 |
| - |
11 |
| -Uses Kandy samples util. |
12 |
| -See https://github.com/Kotlin/kandy/blob/samples_util/util/kandy-samples-utils/README.md for more details. |
| 1 | +## :samples |
| 2 | + |
| 3 | +Code samples as well as DataFrame iframes and Kandy plot images for the |
| 4 | +[documentation website](https://github.com/Kotlin/dataframe). |
| 5 | + |
| 6 | +### Korro |
| 7 | + |
| 8 | +Saves code samples using [Korro](https://github.com/devcrocod/korro). |
| 9 | + |
| 10 | +To save / update samples: |
| 11 | +* Run `korroClean` and `korro` gradle tasks. |
| 12 | + |
| 13 | +**Important**: may work incorrectly until |
| 14 | +[migration from `:core` is not finished](https://github.com/Kotlin/dataframe/issues/898). |
| 15 | +Run Korro tasks **for the whole project**. |
| 16 | + |
| 17 | +### SampleHelper |
| 18 | + |
| 19 | +[`SampleHelper`](https://github.com/Kotlin/kandy/blob/samples_util/util/kandy-samples-utils/README.md) |
| 20 | +allows to save resulting Kandy plots as SVG images and `DataFrame`s as iframes. |
| 21 | + |
| 22 | +Running tests in this module will save or update these samples. |
| 23 | + |
| 24 | +**Important**: |
| 25 | + |
| 26 | +1) if the sample is changed, check if it is (так и надо было или нет короче переформулируй). |
| 27 | +You can track it with the help of the git file changes tracker in IDEA. |
| 28 | +2) All iframes should be added as resources in [this file](../docs/StardustDocs/topics/_shadow_resources.md). |
| 29 | +Run [this script](https://github.com/Kotlin/kandy/blob/samples_util/util/kandy-samples-utils/README.md#how-to-use) |
| 30 | +to update them. |
| 31 | + |
| 32 | +### Notebook-To-Doc |
| 33 | + |
| 34 | +Kotlin notebook can be easily converted to a documentation using |
| 35 | +[this script](https://github.com/Kotlin/kandy/blob/samples_util/util/kandy-samples-utils/README.md#how-to-use). |
| 36 | +It produces two files: `.kt` and `.md`. |
| 37 | +* Place `.kt` file in the tests in this module, and run it. |
| 38 | +* Place `.md` file in the [docs topics directory](../docs/StardustDocs/topics). |
| 39 | +* Run Korro tasks. |
0 commit comments