Skip to content

Commit cc9bb49

Browse files
authored
Merge pull request #93 from SciProgCentre/dev
0.5.3
2 parents ed26776 + 9cb0d11 commit cc9bb49

File tree

50 files changed

+880
-293
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+880
-293
lines changed

.github/workflows/pages.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Dokka publication
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [ created ]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 40
12+
steps:
13+
- uses: actions/[email protected]
14+
- uses: actions/[email protected]
15+
with:
16+
java-version: 11
17+
distribution: liberica
18+
- name: Cache konan
19+
uses: actions/[email protected]
20+
with:
21+
path: ~/.konan
22+
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
23+
restore-keys: |
24+
${{ runner.os }}-gradle-
25+
- uses: gradle/[email protected]
26+
with:
27+
arguments: dokkaHtmlMultiModule --no-parallel
28+
- uses: JamesIves/[email protected]
29+
with:
30+
branch: gh-pages
31+
folder: build/dokka/htmlMultiModule

.github/workflows/publish.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Gradle publish
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [ created ]
7+
8+
jobs:
9+
publish:
10+
environment:
11+
name: publish
12+
strategy:
13+
matrix:
14+
os: [ macOS-latest, windows-latest ]
15+
runs-on: ${{matrix.os}}
16+
steps:
17+
- uses: actions/[email protected]
18+
- uses: actions/[email protected]
19+
with:
20+
java-version: 11
21+
distribution: liberica
22+
- name: Cache konan
23+
uses: actions/[email protected]
24+
with:
25+
path: ~/.konan
26+
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
27+
restore-keys: |
28+
${{ runner.os }}-gradle-
29+
- name: Publish Windows Artifacts
30+
if: matrix.os == 'windows-latest'
31+
uses: gradle/[email protected]
32+
with:
33+
arguments: |
34+
publishAllPublicationsToSpaceRepository
35+
-Ppublishing.targets=all
36+
-Ppublishing.space.user=${{ secrets.SPACE_APP_ID }}
37+
-Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }}
38+
- name: Publish Mac Artifacts
39+
if: matrix.os == 'macOS-latest'
40+
uses: gradle/[email protected]
41+
with:
42+
arguments: |
43+
publishMacosX64PublicationToSpaceRepository
44+
publishMacosArm64PublicationToSpaceRepository
45+
publishIosX64PublicationToSpaceRepository
46+
publishIosArm64PublicationToSpaceRepository
47+
publishIosSimulatorArm64PublicationToSpaceRepository
48+
-Ppublishing.targets=all
49+
-Ppublishing.space.user=${{ secrets.SPACE_APP_ID }}
50+
-Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }}

CHANGELOG.md

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,43 @@
11
# Changelog
2-
32
All notable changes to this project will be documented in this file.
43

54
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
65
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
76

8-
## [Unreleased]
7+
## Unreleased
8+
9+
### Added
10+
11+
### Changed
12+
13+
### Deprecated
14+
15+
### Removed
16+
17+
### Fixed
18+
19+
### Security
20+
21+
## 0.5.3 - 2023-04-01
22+
923
### Added
24+
- API for background images (https://github.com/SciProgCentre/plotly.kt/issues/49)
25+
- API for multiple Y axis (https://github.com/SciProgCentre/plotly.kt/issues/92)
26+
- Native support
1027
- `plotlykt module` with basic Geo API
1128
- DataSourceHost/DataSourcePost to configure custom networks
1229

1330
### Changed
31+
- Kotlin 1.8.20
1432
- Moved renderers to JVM to avoid confusion with JS direct element rendering.
1533
- DataForge 0.6
16-
- Replaced krangl by Kotlin-DataFrame
34+
- Replaced krangl by Kotlin-DataFrame in examples
1735
- Plotly server uses push strategy by default
1836
- Renderers moved to common
1937
- Moved to Ktor 2.0
2038

2139
### Deprecated
40+
- Page layout. Use VisionForge for that.
2241

2342
### Removed
2443
- Moved CORS to `Plotly.serve`
@@ -28,13 +47,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2847
- #85
2948
- Rendering in JS that used backend HTML generation
3049

31-
### Security
32-
## [0.5.0]
50+
## 0.5.0
3351

3452
### Changed
3553
- Switch to DataForge 0.5
36-
-
37-
## [0.4.4]
54+
-
55+
56+
## 0.4.4
57+
3858
### Added
3959
- Candlestick support
4060
- Range builders for axis
@@ -46,22 +66,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4666
### Deprecated
4767
- Direct usage of `range` in axis
4868

49-
### Removed
50-
5169
### Fixed
5270
- #80
5371
- Plotly coordinate array wrap is moved to the server side
5472

55-
### Security
56-
## [0.4.3]
73+
## 0.4.3
5774

5875
### Fixed
5976
- Proper deserialization of single plot.
6077
- A bug in jupyter lab visualization
6178

62-
### Security
63-
64-
## [0.4.2]
79+
## 0.4.2
6580

6681
### Added
6782
- `automargin` property to `Axis` according to https://plotly.com/python/reference/layout/xaxis/#layout-xaxis-automargin
@@ -70,8 +85,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7085
- Remove unnecessary `kotlinx-css` dependency.
7186
- Added compatibility mode for legacy notebooks. Use `Plotly.jupyter.notebook()` call to enable legacy mode.
7287

73-
### Security
74-
## [0.4.0]
88+
## 0.4.0
89+
7590
### Added
7691
- Jupyter integration plugin for server
7792
- Separate static plot integration module in `plotlykt-jupyter`
@@ -84,17 +99,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8499
- Kotlin `1.5.0`
85100
- HtmlFragment renamed to PlotlyHtmlFragment
86101

87-
### Deprecated
88-
89102
### Removed
90103
- Local bootstrap
91104

92105
### Fixed
93106
- Incomplete coverage in JS (#70)
94107

95-
### Security
108+
## 0.3.1
96109

97-
## [0.3.1]
98110
### Added
99111
- Table widget implementation by @ArtificialPB
100112
- Mathjax header promoted to stable
@@ -105,23 +117,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
105117
- **Breaking API change!** Trace `text` replaced by `TraceValues`
106118
- Moved to DataForge 0.3 API
107119
- Kotlin 1.4.30
108-
- **JVM-IR**
120+
- **JVM-IR**
109121
- Plot `Config` moved to constructor
110122
- Replaced direct color accessor by a delegate
111123

112-
### Deprecated
113-
114-
### Removed
115-
116124
### Fixed
117125
- https://github.com/mipt-npm/plotly.kt/issues/53
118126
- Add JQuery to Bootstrap headers
119127

120-
### Security
121-
122-
## [0.3.0]
123-
### Added
124-
-Support for `plotly.kts` in IDEA
128+
## 0.3.0
125129

126130
### Changed
127131
- Serialization API is encapsulated (not longer exposed) in order to provide compatibility with new serialization.
@@ -132,7 +136,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
132136
### Fixed
133137
- https://github.com/mipt-npm/plotly.kt/issues/51
134138

135-
## [0.2.0]
139+
## 0.2.0
136140

137141
### Added
138142
- Experimental scripting support
@@ -141,7 +145,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
141145
- Color palettes (T10 and XKCD)
142146
- New parameters and classes in Trace, Legend, Layout
143147
- Parameters description
144-
- naming.md with decisions about parameters and methods names
148+
- naming.md with decisions about parameters and methods names
145149
- Error bars
146150
- New scatter, contour, error plots examples
147151
- Interfaces with common parameters for some plots (Histogram, Contour, Heatmap)
@@ -152,7 +156,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
152156
- TraceValues extension for krangl columns
153157

154158
### Changed
155-
156159
- Migrated from `scientifik` to `kscience`
157160
- Refactored packages to better suit star import style
158161
- Removed bootstrap dependency

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ This project is developed to allow simple access to plotly functionality from ko
2424

2525
The library supports three drawable plot objects:
2626
* `Plot` itself stands for a stand-alone plot frame. It requires external infrastructure to load appropriate JavaScript libraries.
27-
* `PlotFragment` (JVM only) is an HTML fragment possibly including several plots. The API for html is provided by [kotlinx-html](https://github.com/Kotlin/kotlinx.html) library.
28-
* `PlotlyPage` (JVM only) is a complete page, including body fragment and page headers (needed to load JavaScript part of Plotly).
27+
* `PlotFragment` is an HTML fragment possibly including several plots. The API for html is provided by [kotlinx-html](https://github.com/Kotlin/kotlinx.html) library.
28+
* `PlotlyPage` is a complete page, including body fragment and page headers (needed to load JavaScript part of Plotly).
2929

3030
The work with plotly graphs could be rendered in following modes:
3131

3232
## HTML page export
33-
(JVM only) Export plot or a plot grid in a standalone html file, which
34-
uses CDN based plotly distribution. This mode does not support updates.
33+
(JVM and native) Export plot or page in a standalone html file, using CDN distribution or local JS file (JVM only). This mode does not support updates.
3534

3635
See [staticPlot](./examples/src/main/kotlin/staticPlot.kt) and
3736
[customPage](./examples/src/main/kotlin/customPage.kt) for examples.
@@ -74,6 +73,9 @@ The module `plotly-server` adds server capabilities and allows to render dynamic
7473
## Kotlin-scripting (experimental)
7574
It is possible to separate script logic into stand-alone `plotly.kts` script file and generate an html from the command line. See [plotlykt-script](./plotlykt-script) module for details.
7675

76+
## Kotlin/Native (experimental)
77+
Plotly model now fully supports Kotlin/Native. It means that you can use it to create a proper Plotly-based HTML file. You will still need browser to view it. You can use [native-demo](./examples/native-demo) example.
78+
7779
# The feature I need is not implemented!
7880

7981
There are three ways to solve it:

build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ plugins {
66
id("space.kscience.gradle.project")
77
}
88

9-
val dataforgeVersion by extra("0.6.0-dev-15")
9+
val dataforgeVersion by extra("0.6.1")
10+
val plotlyVersion by extra("2.20.0")
1011

1112
allprojects {
1213
group = "space.kscience"
13-
version = "0.5.3-dev-2"
14+
version = "0.5.3"
1415
}
1516

1617
apiValidation {

docs/templates/README-TEMPLATE.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,13 @@ This project is developed to allow simple access to plotly functionality from ko
2424

2525
The library supports three drawable plot objects:
2626
* `Plot` itself stands for a stand-alone plot frame. It requires external infrastructure to load appropriate JavaScript libraries.
27-
* `PlotFragment` (JVM only) is an HTML fragment possibly including several plots. The API for html is provided by [kotlinx-html](https://github.com/Kotlin/kotlinx.html) library.
28-
* `PlotlyPage` (JVM only) is a complete page, including body fragment and page headers (needed to load JavaScript part of Plotly).
27+
* `PlotFragment` is an HTML fragment possibly including several plots. The API for html is provided by [kotlinx-html](https://github.com/Kotlin/kotlinx.html) library.
28+
* `PlotlyPage` is a complete page, including body fragment and page headers (needed to load JavaScript part of Plotly).
2929

3030
The work with plotly graphs could be rendered in following modes:
3131

3232
## HTML page export
33-
(JVM only) Export plot or a plot grid in a standalone html file, which
34-
uses CDN based plotly distribution. This mode does not support updates.
33+
(JVM and native) Export plot or page in a standalone html file, using CDN distribution or local JS file (JVM only). This mode does not support updates.
3534

3635
See [staticPlot](./examples/src/main/kotlin/staticPlot.kt) and
3736
[customPage](./examples/src/main/kotlin/customPage.kt) for examples.
@@ -72,6 +71,9 @@ The module `plotly-server` adds server capabilities and allows to render dynamic
7271
## Kotlin-scripting (experimental)
7372
It is possible to separate script logic into stand-alone `plotly.kts` script file and generate an html from the command line. See [plotlykt-script](./plotlykt-script) module for details.
7473

74+
## Kotlin/Native (experimental)
75+
Plotly model now fully supports Kotlin/Native. It means that you can use it to create a proper Plotly-based HTML file. You will still need browser to view it. You can use [native-demo](./examples/native-demo) example.
76+
7577
# The feature I need is not implemented!
7678

7779
There are three ways to solve it:

examples/build.gradle.kts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@ repositories {
99

1010
dependencies {
1111
implementation(project(":plotlykt-server"))
12+
implementation(projects.plotlyktJupyter)
1213
implementation(project(":plotlykt-geo"))
1314
implementation(kotlin("script-runtime"))
1415
implementation(project(":plotlykt-script"))
15-
implementation("org.jetbrains.kotlinx:dataframe:0.8.0-dev-968-0.11.0.83")
16+
implementation("org.jetbrains.kotlinx:dataframe:0.9.1")
17+
}
18+
19+
kotlin{
20+
jvmToolchain(11)
1621
}
1722

1823
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
19-
kotlinOptions.jvmTarget = "11"
2024
kotlinOptions.freeCompilerArgs = kotlinOptions.freeCompilerArgs +"-Xopt-in=kotlin.RequiresOptIn"
2125
}
2226

examples/fx-demo/build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repositories {
1414
dependencies {
1515
implementation(project(":plotlykt-server"))
1616
implementation("no.tornado:tornadofx:1.7.20")
17-
implementation("ch.qos.logback:logback-classic:1.2.11")
17+
implementation(spclibs.logback.classic)
1818
}
1919

2020
javafx{
@@ -26,7 +26,10 @@ application {
2626
mainClass.set("space.kscience.plotly.fx.PlotlyFXAppKt")
2727
}
2828

29+
kotlin{
30+
jvmToolchain(11)
31+
}
32+
2933
tasks.withType<KotlinCompile> {
30-
kotlinOptions.jvmTarget = "11"
3134
kotlinOptions.freeCompilerArgs = kotlinOptions.freeCompilerArgs +"-Xopt-in=kotlin.RequiresOptIn"
3235
}

examples/js-demo/build.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,10 @@ kotlin {
1515
}
1616

1717
dependencies {
18-
implementation(project(":plotlykt-core"))
19-
implementation(npmlibs.kotlinx.coroutines.core)
18+
implementation(projects.plotlyktCore)
19+
implementation(spclibs.kotlinx.coroutines.core)
2020
}
2121

2222
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
23-
kotlinOptions.jvmTarget = "11"
2423
kotlinOptions.freeCompilerArgs = kotlinOptions.freeCompilerArgs +"-Xopt-in=kotlin.RequiresOptIn"
2524
}

0 commit comments

Comments
 (0)