Skip to content

Commit ed1753d

Browse files
update readme
1 parent a037993 commit ed1753d

File tree

2 files changed

+39
-34
lines changed

2 files changed

+39
-34
lines changed

core/README.md

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,6 @@ At the moment, these integrations are still part of the `:core` module:
1010
- (deprecated) csv/tsv
1111
- html
1212

13-
### Korro code samples
14-
15-
Code samples for the documentation website reside
16-
in [core/.../test/.../samples/api](./src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api) (for samples that depend solely on `dataframe-core`),
17-
and [tests/.../samples/api](../tests/src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api) (for samples can depend on other I/O modules)
18-
and they are copied over to Markdown files in [docs/StardustDocs/topics](../docs/StardustDocs/topics)
19-
by [Korro](https://github.com/devcrocod/korro).
20-
21-
### ~~Explainer dataframes~~ NOTE: This is being moved to [tests](../tests)
22-
23-
Aside from code samples, `@TransformDataFrameExpressions` annotated test functions also generate sample
24-
dataframe HTML files that can be used as iFrames on the documentation website.
25-
They are tested, generated, and copied over to [docs/StardustDocs/resources/snippets](../docs/StardustDocs/resources/snippets) by
26-
our "explainer" [plugin callback proxy](./src/test/kotlin/org/jetbrains/kotlinx/dataframe/explainer),
27-
which hooks into [the TestBase class](./src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/TestBase.kt) and
28-
retrieves the intermediate DataFrame expressions thanks to our "explainer" compiler plugin
29-
[:plugins:expressions-converter](../plugins/expressions-converter).
30-
31-
We can also generate "normal" DataFrame samples for the website. This can be done using the
32-
[OtherSamples class](./src/test/kotlin/org/jetbrains/kotlinx/dataframe/samples/api/OtherSamples.kt). Generated
33-
HTML files will be stored in [docs/StardustDocs/resources/snippets/manual](../docs/StardustDocs/resources/snippets/manual).
34-
3513
### KoDEx
3614

3715
The code you're working on needs to be edited in [src](src), but the KDocs are processed by

samples/README.md

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,39 @@
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

Comments
 (0)