Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library configuration improvements #34

Merged
merged 12 commits into from
Dec 23, 2019
Merged

Library configuration improvements #34

merged 12 commits into from
Dec 23, 2019

Conversation

nikitinas
Copy link
Contributor

@nikitinas nikitinas commented Dec 17, 2019

  1. Split library descriptors into separate jsons
  2. Load local library descriptors from "/.jupyter_kotlin/libraries" directory
  3. Download library descriptors from master branch of "https://github.com/Kotlin/kotlin-jupyter" repository
  4. Cache downloaded descriptors in "/.jupyter_kotlin/cache/libraries" directory
  5. Make descriptors loading async
  6. Check library descriptor format version and suggest updating kernel if format was changed

Fixes #31

@nikitinas nikitinas requested a review from ileasile December 17, 2019 08:10
Copy link
Contributor

@ileasile ileasile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are few minor comments, may you please answer them / fix?

src/main/kotlin/org/jetbrains/kotlin/jupyter/repl.kt Outdated Show resolved Hide resolved
src/main/kotlin/org/jetbrains/kotlin/jupyter/config.kt Outdated Show resolved Hide resolved
src/main/kotlin/org/jetbrains/kotlin/jupyter/config.kt Outdated Show resolved Hide resolved
src/main/kotlin/org/jetbrains/kotlin/jupyter/config.kt Outdated Show resolved Hide resolved
Copy link
Contributor

@ileasile ileasile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more note

src/main/kotlin/org/jetbrains/kotlin/jupyter/config.kt Outdated Show resolved Hide resolved
fun <T> Deferred<T>.awaitBlocking(): T = if (isCompleted) getCompleted() else runBlocking { await() }

fun String.parseIniConfig() =
split("\n").map { it.split('=') }.filter { it.count() == 2 }.map { it[0] to it[1] }.toMap()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why isn't some INI parser used? In this implementation comments (;) are not handled properly. I understand that .properties has only one line, and it may be left as is this time.

@nikitinas nikitinas merged commit 1e416c7 into master Dec 23, 2019
@nikitinas nikitinas deleted the remote_config branch December 23, 2019 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Config editor / network based configuration
2 participants