Update versions

This commit is contained in:
Alexander Nozik 2023-01-24 12:08:29 +03:00
parent 4c67d8b0a0
commit d9b4707da1
17 changed files with 352 additions and 392 deletions

View File

@ -1,5 +1,7 @@
import space.kscience.gradle.*
plugins { plugins {
id("ru.mipt.npm.gradle.project") id("space.kscience.gradle.project")
} }
allprojects { allprojects {
@ -17,8 +19,12 @@ val tablesVersion: String by extra("0.1.2")
val kmathVersion by extra("0.3.0-dev-17") val kmathVersion by extra("0.3.0-dev-17")
val plotlyVersion: String by extra("0.5.0") val plotlyVersion: String by extra("0.5.0")
ksciencePublish{ ksciencePublish {
github("numass")
pom("https://github.com/SciProgCentre/kmath") {
useApache2Licence()
useSPCTeam()
}
space("https://maven.pkg.jetbrains.space/mipt-npm/p/numass/maven") space("https://maven.pkg.jetbrains.space/mipt-npm/p/numass/maven")
} }

View File

@ -12,4 +12,4 @@ org.gradle.configureondemand=true
org.gradle.parallel=true org.gradle.parallel=true
org.gradle.jvmargs=-XX:MaxMetaspaceSize=1G org.gradle.jvmargs=-XX:MaxMetaspaceSize=1G
toolsVersion=0.11.1-kotlin-1.6.10 toolsVersion=0.13.3-kotlin-1.7.20

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,5 @@
plugins { plugins {
kotlin("multiplatform") id("space.kscience.gradle.mpp")
id("ru.mipt.npm.gradle.common")
`maven-publish` `maven-publish`
} }
@ -21,9 +20,9 @@ kotlin.sourceSets {
} }
} }
} }
//
kscience{ //kscience{
useAtomic() // useAtomic()
} //}

View File

@ -1,6 +1,5 @@
plugins { plugins {
kotlin("multiplatform") id("space.kscience.gradle.mpp")
id("ru.mipt.npm.gradle.common")
`maven-publish` `maven-publish`
} }
@ -12,7 +11,7 @@ kotlin.sourceSets {
dependencies { dependencies {
api("space.kscience:dataforge-context:$dataforgeVersion") api("space.kscience:dataforge-context:$dataforgeVersion")
api("space.kscience:dataforge-data:$dataforgeVersion") api("space.kscience:dataforge-data:$dataforgeVersion")
api("org.jetbrains.kotlinx:kotlinx-datetime:${ru.mipt.npm.gradle.KScienceVersions.dateTimeVersion}") api("org.jetbrains.kotlinx:kotlinx-datetime:${space.kscience.gradle.KScienceVersions.dateTimeVersion}")
} }
} }
jvmMain{ jvmMain{

View File

@ -1,7 +1,6 @@
plugins { plugins {
kotlin("jvm") id("space.kscience.gradle.jvm")
id("ru.mipt.npm.gradle.common") id("com.squareup.wire") version "4.4.3"
id("com.squareup.wire") version "4.2.0"
`maven-publish` `maven-publish`
} }
@ -10,7 +9,7 @@ val dataforgeVersion: String by rootProject.extra
dependencies { dependencies {
api(project(":numass-data-model")) api(project(":numass-data-model"))
api("space.kscience:dataforge-io:$dataforgeVersion") api("space.kscience:dataforge-io:$dataforgeVersion")
api(npmlibs.ktor.io) // api(npmlibs.ktor.io)
} }
wire{ wire{

View File

@ -18,6 +18,7 @@ package ru.inr.mass.data.proto
import io.ktor.utils.io.core.* import io.ktor.utils.io.core.*
import space.kscience.dataforge.context.Context import space.kscience.dataforge.context.Context
import space.kscience.dataforge.context.invoke
import space.kscience.dataforge.io.* import space.kscience.dataforge.io.*
import space.kscience.dataforge.meta.Meta import space.kscience.dataforge.meta.Meta
import space.kscience.dataforge.meta.get import space.kscience.dataforge.meta.get
@ -109,7 +110,7 @@ public class TaggedNumassEnvelopeFormat(private val io: IOPlugin) : EnvelopeForm
override val name: Name = super.name + "numass" override val name: Name = super.name + "numass"
override fun invoke(meta: Meta, context: Context): EnvelopeFormat { override fun build(context: Context, meta: Meta): EnvelopeFormat {
val io = context.io val io = context.io
val metaFormatName = meta["name"].string?.let { Name.parse(it) } ?: JsonMetaFormat.name val metaFormatName = meta["name"].string?.let { Name.parse(it) } ?: JsonMetaFormat.name

View File

@ -1,6 +1,6 @@
plugins { plugins {
kotlin("multiplatform") kotlin("multiplatform")
id("ru.mipt.npm.gradle.common") id("space.kscience.gradle.common")
`maven-publish` `maven-publish`
} }

View File

@ -1,5 +1,5 @@
plugins { plugins {
id("ru.mipt.npm.gradle.jvm") id("space.kscience.gradle.jvm")
} }
val dataforgeVersion: String by rootProject.extra val dataforgeVersion: String by rootProject.extra

View File

@ -1,5 +1,5 @@
plugins { plugins {
id("ru.mipt.npm.gradle.mpp") id("space.kscience.gradle.mpp")
`maven-publish` `maven-publish`
} }

View File

@ -1,5 +1,5 @@
plugins { plugins {
id("ru.mipt.npm.gradle.jvm") id("space.kscience.gradle.jvm")
id("com.github.johnrengelman.shadow") version "7.1.1" id("com.github.johnrengelman.shadow") version "7.1.1"
`maven-publish` `maven-publish`
} }
@ -21,9 +21,9 @@ dependencies {
implementation("space.kscience:plotlykt-jupyter:$plotlyVersion") implementation("space.kscience:plotlykt-jupyter:$plotlyVersion")
implementation("space.kscience:kmath-jupyter:$kmathVersion") implementation("space.kscience:kmath-jupyter:$kmathVersion")
implementation("space.kscience:tables-kt:$tablesVersion") implementation("space.kscience:tables-kt:$tablesVersion")
implementation(platform("com.google.cloud:libraries-bom:23.0.0")) // implementation(platform("com.google.cloud:libraries-bom:23.0.0"))
implementation("com.google.cloud:google-cloud-nio:0.123.10") // implementation("com.google.cloud:google-cloud-nio:0.123.10")
implementation("com.google.auth:google-auth-library-oauth2-http:1.3.0") // implementation("com.google.auth:google-auth-library-oauth2-http:1.3.0")
} }
kscience{ kscience{

View File

@ -1,17 +1,17 @@
package ru.inr.mass.scripts package ru.inr.mass.scripts
import com.google.cloud.storage.contrib.nio.CloudStorageFileSystem //import com.google.cloud.storage.contrib.nio.CloudStorageFileSystem
import ru.inr.mass.data.proto.NumassDirectorySet //import ru.inr.mass.data.proto.NumassDirectorySet
import ru.inr.mass.workspace.Numass //import ru.inr.mass.workspace.Numass
import space.kscience.dataforge.data.DataTree //import space.kscience.dataforge.data.DataTree
//
// https://storage.cloud.google.com/numass-data/2020_12/Adiabaticity/16/set_3/p10(10s)(HV1%3D13750) //// https://storage.cloud.google.com/numass-data/2020_12/Adiabaticity/16/set_3/p10(10s)(HV1%3D13750)
//
suspend fun main() { //suspend fun main() {
CloudStorageFileSystem.forBucket("numass-data").use { fs -> // CloudStorageFileSystem.forBucket("numass-data").use { fs ->
val repo: DataTree<NumassDirectorySet> = Numass.readRepository(fs.getPath("2020_12/Adiabaticity")) // val repo: DataTree<NumassDirectorySet> = Numass.readRepository(fs.getPath("2020_12/Adiabaticity"))
repo.items().forEach{ (key,item)-> // repo.items().forEach{ (key,item)->
println(key) // println(key)
} // }
} // }
} //}

View File

@ -15,11 +15,9 @@ import space.kscience.dataforge.names.Name
import space.kscience.dataforge.names.NameToken import space.kscience.dataforge.names.NameToken
import java.nio.file.Files import java.nio.file.Files
import java.nio.file.Path import java.nio.file.Path
import kotlin.io.path.ExperimentalPathApi
import kotlin.io.path.exists import kotlin.io.path.exists
import kotlin.io.path.isDirectory import kotlin.io.path.isDirectory
import kotlin.io.path.relativeTo import kotlin.io.path.relativeTo
import kotlin.streams.toList
object Numass { object Numass {
fun readDirectory(path: String): NumassDirectorySet = NUMASS.context.readNumassDirectory(path) fun readDirectory(path: String): NumassDirectorySet = NUMASS.context.readNumassDirectory(path)

View File

@ -113,6 +113,7 @@ class NumassPlugin : WorkspacePlugin() {
companion object : PluginFactory<NumassPlugin> { companion object : PluginFactory<NumassPlugin> {
override val tag: PluginTag = PluginTag("numass", "ru.mipt.npm") override val tag: PluginTag = PluginTag("numass", "ru.mipt.npm")
override val type: KClass<out NumassPlugin> = NumassPlugin::class override val type: KClass<out NumassPlugin> = NumassPlugin::class
override fun invoke(meta: Meta, context: Context): NumassPlugin = NumassPlugin()
override fun build(context: Context, meta: Meta): NumassPlugin = NumassPlugin()
} }
} }

View File

@ -0,0 +1,36 @@
@file:OptIn(UnstableKMathAPI::class)
package ru.inr.mass.workspace
import space.kscience.kmath.data.XYColumnarData
import space.kscience.kmath.expressions.DifferentiableExpression
import space.kscience.kmath.expressions.Symbol
import space.kscience.kmath.misc.FeatureSet
import space.kscience.kmath.misc.Loggable
import space.kscience.kmath.misc.UnstableKMathAPI
import space.kscience.kmath.optimization.*
public suspend fun XYColumnarData<Double, Double, Double>.fitWith(
optimizer: Optimizer<Double, XYFit>,
modelExpression: DifferentiableExpression<Double>,
startingPoint: Map<Symbol, Double>,
vararg features: OptimizationFeature = emptyArray(),
xSymbol: Symbol = Symbol.x,
pointToCurveDistance: PointToCurveDistance = PointToCurveDistance.byY,
pointWeight: PointWeight = PointWeight.byYSigma,
): XYFit {
var actualFeatures = FeatureSet.of(*features, OptimizationStartPoint(startingPoint))
if (actualFeatures.getFeature<OptimizationLog>() == null) {
actualFeatures = actualFeatures.with(OptimizationLog(Loggable.console))
}
val problem = XYFit(
this,
modelExpression,
actualFeatures,
pointToCurveDistance,
pointWeight,
xSymbol
)
return optimizer.optimize(problem)
}

View File

@ -15,10 +15,10 @@ pluginManagement {
} }
plugins { plugins {
id("ru.mipt.npm.gradle.project") version toolsVersion id("space.kscience.gradle.project") version toolsVersion
id("ru.mipt.npm.gradle.mpp") version toolsVersion id("space.kscience.gradle.mpp") version toolsVersion
id("ru.mipt.npm.gradle.jvm") version toolsVersion id("space.kscience.gradle.jvm") version toolsVersion
id("ru.mipt.npm.gradle.js") version toolsVersion id("space.kscience.gradle.js") version toolsVersion
} }
} }
@ -34,7 +34,7 @@ dependencyResolutionManagement {
versionCatalogs { versionCatalogs {
create("npmlibs") { create("npmlibs") {
from("ru.mipt.npm:version-catalog:$toolsVersion") from("space.kscience:version-catalog:$toolsVersion")
} }
} }
} }