KarthikRIyer / swiftplot

Swift library for Data Visualization :bar_chart:
Apache License 2.0
400 stars 39 forks source link

Update for deprecation of Jupyter in Docker #137

Closed philipturner closed 1 year ago

philipturner commented 2 years ago

I simplified the code cell lines, which no longer require manually linking FreeType2. I am having problems with external system dependencies that require passing -I/... and -L/..., so it's good that SwiftPlot now installs those libraries within the package manifest.

I ran the new build lines in your test notebook, linked on Swift-Colab's front page. I recommend that you try doing so by yourself, because the SwiftPM installation process looks so satisfying with Swift-Colab v2.1. The output has text coloring and looks like an actual terminal on macOS. The only downside is https://github.com/apple/swift/issues/58916.

The installation line in the test notebook can now be simplified from:

%install '.package(url: "https://github.com/pvieito/PythonKit.git", .branch("master"))' PythonKit
%install '.package(url: "https://github.com/philipturner/differentiation", .branch("main"))' _Differentiation
%install-swiftpm-flags -Xcc -isystem/usr/include/freetype2 -Xswiftc -lfreetype
%install '.package(url: "https://github.com/KarthikRIyer/swiftplot", .branch("master"))' SwiftPlot AGGRenderer
%include "EnableIPythonDisplay.swift"
import PythonKit
import Differentiation

To:

%install '.package(url: "https://github.com/pvieito/PythonKit.git", .branch("master"))' PythonKit
%install '.package(url: "https://github.com/KarthikRIyer/swiftplot", .branch("master"))' SwiftPlot AGGRenderer
%include "EnableIPythonDisplay.swift"
philipturner commented 2 years ago

https://github.com/philipturner/swift-colab/issues/16

philipturner commented 2 years ago

Converting to a draft because Swift-Colab has planned support for JupyterLab.