Skip to content

Commit

Permalink
Merge pull request #93 from SciProgCentre/dev
Browse files Browse the repository at this point in the history
0.5.3
  • Loading branch information
SPC-code authored Apr 28, 2023
2 parents ed26776 + 9cb0d11 commit cc9bb49
Show file tree
Hide file tree
Showing 50 changed files with 880 additions and 293 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Dokka publication

on:
workflow_dispatch:
release:
types: [ created ]

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
java-version: 11
distribution: liberica
- name: Cache konan
uses: actions/[email protected]
with:
path: ~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: gradle/[email protected]
with:
arguments: dokkaHtmlMultiModule --no-parallel
- uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: build/dokka/htmlMultiModule
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Gradle publish

on:
workflow_dispatch:
release:
types: [ created ]

jobs:
publish:
environment:
name: publish
strategy:
matrix:
os: [ macOS-latest, windows-latest ]
runs-on: ${{matrix.os}}
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
java-version: 11
distribution: liberica
- name: Cache konan
uses: actions/[email protected]
with:
path: ~/.konan
key: ${{ runner.os }}-gradle-${{ hashFiles('*.gradle.kts') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Publish Windows Artifacts
if: matrix.os == 'windows-latest'
uses: gradle/[email protected]
with:
arguments: |
publishAllPublicationsToSpaceRepository
-Ppublishing.targets=all
-Ppublishing.space.user=${{ secrets.SPACE_APP_ID }}
-Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }}
- name: Publish Mac Artifacts
if: matrix.os == 'macOS-latest'
uses: gradle/[email protected]
with:
arguments: |
publishMacosX64PublicationToSpaceRepository
publishMacosArm64PublicationToSpaceRepository
publishIosX64PublicationToSpaceRepository
publishIosArm64PublicationToSpaceRepository
publishIosSimulatorArm64PublicationToSpaceRepository
-Ppublishing.targets=all
-Ppublishing.space.user=${{ secrets.SPACE_APP_ID }}
-Ppublishing.space.token=${{ secrets.SPACE_APP_SECRET }}
69 changes: 36 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,43 @@
# Changelog

All notable changes to this project will be documented in this file.

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

## [Unreleased]
## Unreleased

### Added

### Changed

### Deprecated

### Removed

### Fixed

### Security

## 0.5.3 - 2023-04-01

### Added
- API for background images (https://github.com/SciProgCentre/plotly.kt/issues/49)
- API for multiple Y axis (https://github.com/SciProgCentre/plotly.kt/issues/92)
- Native support
- `plotlykt module` with basic Geo API
- DataSourceHost/DataSourcePost to configure custom networks

### Changed
- Kotlin 1.8.20
- Moved renderers to JVM to avoid confusion with JS direct element rendering.
- DataForge 0.6
- Replaced krangl by Kotlin-DataFrame
- Replaced krangl by Kotlin-DataFrame in examples
- Plotly server uses push strategy by default
- Renderers moved to common
- Moved to Ktor 2.0

### Deprecated
- Page layout. Use VisionForge for that.

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

### Security
## [0.5.0]
## 0.5.0

### Changed
- Switch to DataForge 0.5
-
## [0.4.4]
-

## 0.4.4

### Added
- Candlestick support
- Range builders for axis
Expand All @@ -46,22 +66,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Deprecated
- Direct usage of `range` in axis

### Removed

### Fixed
- #80
- Plotly coordinate array wrap is moved to the server side

### Security
## [0.4.3]
## 0.4.3

### Fixed
- Proper deserialization of single plot.
- A bug in jupyter lab visualization

### Security

## [0.4.2]
## 0.4.2

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

### Security
## [0.4.0]
## 0.4.0

### Added
- Jupyter integration plugin for server
- Separate static plot integration module in `plotlykt-jupyter`
Expand All @@ -84,17 +99,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Kotlin `1.5.0`
- HtmlFragment renamed to PlotlyHtmlFragment

### Deprecated

### Removed
- Local bootstrap

### Fixed
- Incomplete coverage in JS (#70)

### Security
## 0.3.1

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

### Deprecated

### Removed

### Fixed
- https://github.com/mipt-npm/plotly.kt/issues/53
- Add JQuery to Bootstrap headers

### Security

## [0.3.0]
### Added
-Support for `plotly.kts` in IDEA
## 0.3.0

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

## [0.2.0]
## 0.2.0

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

### Changed

- Migrated from `scientifik` to `kscience`
- Refactored packages to better suit star import style
- Removed bootstrap dependency
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ This project is developed to allow simple access to plotly functionality from ko

The library supports three drawable plot objects:
* `Plot` itself stands for a stand-alone plot frame. It requires external infrastructure to load appropriate JavaScript libraries.
* `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.
* `PlotlyPage` (JVM only) is a complete page, including body fragment and page headers (needed to load JavaScript part of Plotly).
* `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.
* `PlotlyPage` is a complete page, including body fragment and page headers (needed to load JavaScript part of Plotly).

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

## HTML page export
(JVM only) Export plot or a plot grid in a standalone html file, which
uses CDN based plotly distribution. This mode does not support updates.
(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.

See [staticPlot](./examples/src/main/kotlin/staticPlot.kt) and
[customPage](./examples/src/main/kotlin/customPage.kt) for examples.
Expand Down Expand Up @@ -74,6 +73,9 @@ The module `plotly-server` adds server capabilities and allows to render dynamic
## Kotlin-scripting (experimental)
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.

## Kotlin/Native (experimental)
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.

# The feature I need is not implemented!

There are three ways to solve it:
Expand Down
5 changes: 3 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ plugins {
id("space.kscience.gradle.project")
}

val dataforgeVersion by extra("0.6.0-dev-15")
val dataforgeVersion by extra("0.6.1")
val plotlyVersion by extra("2.20.0")

allprojects {
group = "space.kscience"
version = "0.5.3-dev-2"
version = "0.5.3"
}

apiValidation {
Expand Down
10 changes: 6 additions & 4 deletions docs/templates/README-TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,13 @@ This project is developed to allow simple access to plotly functionality from ko

The library supports three drawable plot objects:
* `Plot` itself stands for a stand-alone plot frame. It requires external infrastructure to load appropriate JavaScript libraries.
* `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.
* `PlotlyPage` (JVM only) is a complete page, including body fragment and page headers (needed to load JavaScript part of Plotly).
* `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.
* `PlotlyPage` is a complete page, including body fragment and page headers (needed to load JavaScript part of Plotly).

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

## HTML page export
(JVM only) Export plot or a plot grid in a standalone html file, which
uses CDN based plotly distribution. This mode does not support updates.
(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.

See [staticPlot](./examples/src/main/kotlin/staticPlot.kt) and
[customPage](./examples/src/main/kotlin/customPage.kt) for examples.
Expand Down Expand Up @@ -72,6 +71,9 @@ The module `plotly-server` adds server capabilities and allows to render dynamic
## Kotlin-scripting (experimental)
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.

## Kotlin/Native (experimental)
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.

# The feature I need is not implemented!

There are three ways to solve it:
Expand Down
8 changes: 6 additions & 2 deletions examples/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,18 @@ repositories {

dependencies {
implementation(project(":plotlykt-server"))
implementation(projects.plotlyktJupyter)
implementation(project(":plotlykt-geo"))
implementation(kotlin("script-runtime"))
implementation(project(":plotlykt-script"))
implementation("org.jetbrains.kotlinx:dataframe:0.8.0-dev-968-0.11.0.83")
implementation("org.jetbrains.kotlinx:dataframe:0.9.1")
}

kotlin{
jvmToolchain(11)
}

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

Expand Down
7 changes: 5 additions & 2 deletions examples/fx-demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repositories {
dependencies {
implementation(project(":plotlykt-server"))
implementation("no.tornado:tornadofx:1.7.20")
implementation("ch.qos.logback:logback-classic:1.2.11")
implementation(spclibs.logback.classic)
}

javafx{
Expand All @@ -26,7 +26,10 @@ application {
mainClass.set("space.kscience.plotly.fx.PlotlyFXAppKt")
}

kotlin{
jvmToolchain(11)
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "11"
kotlinOptions.freeCompilerArgs = kotlinOptions.freeCompilerArgs +"-Xopt-in=kotlin.RequiresOptIn"
}
5 changes: 2 additions & 3 deletions examples/js-demo/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ kotlin {
}

dependencies {
implementation(project(":plotlykt-core"))
implementation(npmlibs.kotlinx.coroutines.core)
implementation(projects.plotlyktCore)
implementation(spclibs.kotlinx.coroutines.core)
}

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

0 comments on commit cc9bb49

Please sign in to comment.