Skip to content

Commit 67f9bf6

Browse files
authored
Merge pull request #3 from SciProgCentre/dev
Release 0.3.1
2 parents 5659ff5 + e6f5a5c commit 67f9bf6

24 files changed

+159
-61
lines changed

.github/CODEOWNERS

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@altavir
2+
3+
/kmath-trajectory @ESchouten

.github/workflows/build.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Gradle build
2+
3+
on:
4+
push:
5+
branches: [ dev, master ]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
timeout-minutes: 20
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: actions/[email protected]
15+
with:
16+
java-version: '11'
17+
distribution: 'liberica'
18+
cache: 'gradle'
19+
- name: Gradle Wrapper Validation
20+
uses: gradle/[email protected]
21+
- name: Gradle Build
22+
uses: gradle/[email protected]
23+
with:
24+
arguments: test jvmTest

.github/workflows/pages.yml

+31
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-20.04
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

+50
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 }}

build.gradle.kts

+11-15
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ plugins {
77
id("space.kscience.gradle.mpp")
88
`maven-publish`
99
}
10-
val fxVersion by extra("11")
1110

1211
val kmathVersion: String by project.extra
1312
val versionPrefix: String by project.extra("1.0.0")
@@ -17,16 +16,26 @@ allprojects {
1716
version = "${versionPrefix}-kmath-$kmathVersion"
1817
}
1918

19+
20+
dependencies {
21+
dokkaPlugin("org.jetbrains.dokka:mathjax-plugin:${npmlibs.versions.dokka.get()}")
22+
}
23+
2024
kscience {
25+
jvm()
26+
js()
2127
native()
28+
dependencies {
29+
api("space.kscience:kmath-core:$kmathVersion")
30+
}
2231
}
2332

2433
ksciencePublish {
2534
pom("https://github.com/SciProgCentre/kmath-polynomial") {
2635
useApache2Licence()
2736
useSPCTeam()
2837
}
29-
github(githubProject = "visionforge", githubOrg = "SciProgCentre")
38+
github(githubProject = "kmath-polynomials", githubOrg = "SciProgCentre")
3039
space(
3140
if (isInDevelopment) {
3241
"https://maven.pkg.jetbrains.space/spc/p/sci/dev"
@@ -37,21 +46,8 @@ ksciencePublish {
3746
sonatype()
3847
}
3948

40-
41-
4249
description = "Polynomials, rational functions, and utilities"
4350

44-
kotlin.sourceSets {
45-
commonMain {
46-
dependencies {
47-
api("space.kscience:kmath-core:$kmathVersion")
48-
}
49-
}
50-
}
51-
52-
dependencies {
53-
dokkaPlugin("org.jetbrains.dokka:mathjax-plugin:${npmlibs.versions.dokka.get()}")
54-
}
5551

5652
readme {
5753
maturity = space.kscience.gradle.Maturity.PROTOTYPE

examples/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies {
1616
kotlin.sourceSets.all {
1717
with(languageSettings) {
1818
optIn("kotlin.contracts.ExperimentalContracts")
19-
optIn("space.kscience.kmath.misc.UnstableKMathAPI")
19+
optIn("space.kscience.kmath.UnstableKMathAPI")
2020
}
2121
}
2222

examples/src/main/kotlin/space/kscience/kmath/functions/polynomials.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
*/
55

66
@file:Suppress("LocalVariableName")
7+
@file:OptIn(UnstableKMathAPI::class)
78

89
package space.kscience.kmath.functions
910

11+
import space.kscience.kmath.UnstableKMathAPI
1012
import space.kscience.kmath.expressions.Symbol
1113
import space.kscience.kmath.expressions.symbol
12-
import space.kscience.kmath.functions.*
1314
import space.kscience.kmath.operations.algebra
1415
import space.kscience.kmath.operations.invoke
1516

gradle.properties

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
kotlin.code.style=official
22
kotlin.mpp.stability.nowarn=true
3+
kotlin.wasm.stability.nowarn=true
4+
kotlin.native.ignoreDisabledTargets=true
35
kotlin.incremental.js.ir=true
46

57
org.gradle.parallel=true
68
org.gradle.jvmargs=-Xmx4G
79

8-
toolsVersion=0.13.3-kotlin-1.7.20
9-
kmathVersion=0.3.1-dev-5
10+
toolsVersion=0.14.7-kotlin-1.8.20
11+
kmathVersion=0.3.1

gradle/wrapper/gradle-wrapper.jar

1.29 KB
Binary file not shown.
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

gradlew

+12-7
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,10 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
9087

9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
@@ -143,12 +140,16 @@ fi
143140
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144141
case $MAX_FD in #(
145142
max*)
143+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
144+
# shellcheck disable=SC3045
146145
MAX_FD=$( ulimit -H -n ) ||
147146
warn "Could not query maximum file descriptor limit"
148147
esac
149148
case $MAX_FD in #(
150149
'' | soft) :;; #(
151150
*)
151+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
152+
# shellcheck disable=SC3045
152153
ulimit -n "$MAX_FD" ||
153154
warn "Could not set maximum file descriptor limit to $MAX_FD"
154155
esac
@@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then
193194
done
194195
fi
195196

197+
198+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
199+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
200+
196201
# Collect all arguments for the java command;
197202
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198203
# shell script including quotes and variable substitutions, so put them in

gradlew.bat

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
2828
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

settings.gradle.kts

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
1-
/*
2-
* This file was generated by the Gradle 'init' task.
3-
*
4-
* The settings file is used to specify which projects to include in your build.
5-
*
6-
* Detailed information about configuring a multi-project build in Gradle can be found
7-
* in the user manual at https://docs.gradle.org/7.5.1/userguide/multi_project_builds.html
8-
* This project uses @Incubating APIs which are subject to change.
9-
*/
10-
111
rootProject.name = "kmath-polynomial"
122

133
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
14-
enableFeaturePreview("VERSION_CATALOGS")
154

165
pluginManagement {
176

@@ -32,6 +21,7 @@ pluginManagement {
3221
}
3322
}
3423

24+
@Suppress("UnstableApiUsage")
3525
dependencyResolutionManagement {
3626

3727
val toolsVersion: String by extra

src/commonMain/kotlin/space/kscience/kmath/functions/labeledConstructors.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
package space.kscience.kmath.functions
99

10+
import space.kscience.kmath.UnstableKMathAPI
1011
import space.kscience.kmath.expressions.Symbol
11-
import space.kscience.kmath.misc.UnstableKMathAPI
1212
import space.kscience.kmath.operations.Ring
1313
import space.kscience.kmath.operations.invoke
1414

src/commonMain/kotlin/space/kscience/kmath/functions/labeledUtil.kt

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55

66
package space.kscience.kmath.functions
77

8+
import space.kscience.kmath.UnstableKMathAPI
89
import space.kscience.kmath.expressions.Symbol
9-
import space.kscience.kmath.misc.UnstableKMathAPI
10-
import space.kscience.kmath.operations.*
10+
import space.kscience.kmath.operations.Field
11+
import space.kscience.kmath.operations.Ring
12+
import space.kscience.kmath.operations.algebra
13+
import space.kscience.kmath.operations.invoke
1114
import kotlin.contracts.InvocationKind
1215
import kotlin.contracts.contract
1316
import kotlin.jvm.JvmName

src/commonMain/kotlin/space/kscience/kmath/functions/listUtil.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
package space.kscience.kmath.functions
77

8-
import space.kscience.kmath.misc.UnstableKMathAPI
8+
import space.kscience.kmath.UnstableKMathAPI
99
import space.kscience.kmath.operations.*
1010
import kotlin.contracts.InvocationKind
1111
import kotlin.contracts.contract

src/commonMain/kotlin/space/kscience/kmath/functions/numberedConstructors.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
package space.kscience.kmath.functions
99

10-
import space.kscience.kmath.misc.UnstableKMathAPI
10+
import space.kscience.kmath.UnstableKMathAPI
1111
import space.kscience.kmath.operations.Ring
1212

1313

src/commonMain/kotlin/space/kscience/kmath/functions/numberedUtil.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
package space.kscience.kmath.functions
77

8-
import space.kscience.kmath.misc.UnstableKMathAPI
8+
import space.kscience.kmath.UnstableKMathAPI
99
import space.kscience.kmath.operations.Field
1010
import space.kscience.kmath.operations.Ring
1111
import space.kscience.kmath.operations.algebra

src/commonTest/kotlin/space/kscience/kmath/functions/LabeledConstructorsTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
package space.kscience.kmath.functions
77

8+
import space.kscience.kmath.UnstableKMathAPI
89
import space.kscience.kmath.expressions.Symbol
910
import space.kscience.kmath.functions.testUtils.t
1011
import space.kscience.kmath.functions.testUtils.x
1112
import space.kscience.kmath.functions.testUtils.y
1213
import space.kscience.kmath.functions.testUtils.z
13-
import space.kscience.kmath.misc.UnstableKMathAPI
1414
import space.kscience.kmath.operations.algebra
1515
import space.kscience.kmath.operations.invoke
1616
import kotlin.test.Test

src/commonTest/kotlin/space/kscience/kmath/functions/LabeledPolynomialUtilTest.kt

+2-7
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,9 @@
55

66
package space.kscience.kmath.functions
77

8+
import space.kscience.kmath.UnstableKMathAPI
89
import space.kscience.kmath.expressions.Symbol
9-
import space.kscience.kmath.functions.testUtils.assertEquals
10-
import space.kscience.kmath.functions.testUtils.Rational
11-
import space.kscience.kmath.functions.testUtils.RationalField
12-
import space.kscience.kmath.functions.testUtils.iota
13-
import space.kscience.kmath.functions.testUtils.x
14-
import space.kscience.kmath.functions.testUtils.y
15-
import space.kscience.kmath.misc.UnstableKMathAPI
10+
import space.kscience.kmath.functions.testUtils.*
1611
import kotlin.test.Ignore
1712
import kotlin.test.Test
1813
import kotlin.test.assertEquals

src/commonTest/kotlin/space/kscience/kmath/functions/ListPolynomialUtilTest.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
package space.kscience.kmath.functions
77

8-
import space.kscience.kmath.misc.UnstableKMathAPI
8+
import space.kscience.kmath.UnstableKMathAPI
99
import space.kscience.kmath.functions.testUtils.Rational
1010
import space.kscience.kmath.functions.testUtils.RationalField
1111
import space.kscience.kmath.functions.testUtils.assertFailsWithTypeAndMessage

0 commit comments

Comments
 (0)