Skip to content

Commit

Permalink
Jupyter -> master (#99)
Browse files Browse the repository at this point in the history
* Fixed IntelliSense and syntax highlighting

* Added git-excluded files

* Added missing file

* Implemented message signing

* Proper handling of unsigned messages.

* linux kernel spec paths corrected

* remove old 0zmq comment

* Fixed automerge mistake

* Added InspectRequest dummy implementation

* Added dummy answer to inspect_request

* Wrapped logging in an exception handler

* Added GenericChartsWithSize, for outputting multiple charts.

* Extending MultiplePlots to use different numbers of columns

* Reverting to packages version of FSharp.Charting.

* Added the ability to prepare temporary files to serve.

* Added some helpers to allow arranging multiple images in an output.

* Added SVG moving and merging functions.

* NuGet package installation will now copy content files to a "content" folder inside the notebook's folder.

* Updated documentation file

* Merging confilicted #51 with Jupyter support.

* modified the FAKE script so it can build the project, add basic paket to get FAKE

* Merging confilicted #51 with Jupyter support.

* Remove TypeProviders include version problems

#53
We can access this via NuGet now i.e.
#N "FSharp.Data.TypeProviders"
Including a specific version is causing problems with VS2015 and Linux
installs.

* switch project to paket instead of Nuget

* comment out the nuget restore from FAKE build script

* build.sh restores packages now

* add initial files for setting up packet in the ifsharp bin directory with xplot as an example

* Switch to using Paket matches #59

* forgot to add references

* Enabled Paket auto restore - VS experience

* updated fsproj

* Minimal xUnit test (avoid spurious errors)

* change helpers to be an ItemGroup, copy all the directory on build, prevent files showing twice in MonoDevelop

* Corrected handling of ZeroMQ identities.
Added loop on the control socket to correctly receive restart requests.

* Upgrade the FCS due to crash on start

* Initial rip out of FSCharting. Note that FSCharting.Gtk depends a local hacked version of FSCharting.Gtk

* Upgrading FSharp.Charting to latest version

* move the copying of the helper scripts to Console project. make build script only make console

* Merged with fsprojects jupyter

* fixed merge mistake

* Removed leftover "data", allow multiple outputs

The "data" variable appears to be redundant #63. Now it just has the
side effect of supressing multiple outputs.

* Proof of concept: show types

Extended the nuget manager to parse more directives. Use this to toggle
the showing of types on.

More work needed - toggle off, refactor out of nuget

* Downgraded NetMQ to 3.3.0.11

* added Dockerfile and updated readme

* fix readme typo

* Update README.md

* Update README.md

* Update README.md

Manual instructions for Mac (may apply to Ubuntu)

* Identify OSX and use right directory

We need to use different directories on Linux and OSX -
//http://jupyter-client.readthedocs.io/en/latest/kernels.html#kernel-spe
cs
Mono breaks OSX detection for backward compatibility. Work around it so
we can write to the correct directory.

* Linux documents

* Update README.md

* Update README.md

* Factored out directives, allow turning off types

Moved more of the directive preprocessing out of nuget manager. Can't
get it all out as the manager is responsible for fetching packages down.

* Project file change

* Manual merge of readme.md

* Switch to F# logo (top right)

* Update console information

* Installer now checks for all files.

* Don't rely on ipython_config.py

If users launch by "jupyter notebook" the extra static directory isn't
being configured. There may be a Jupyter way of doing this but this
fixes the immediate issue.

* Replaced links to static in kernel.js with links to kernelspecs.
Added an installation verification step to the startup sequence.

* Restored NetMQ 3.3.3.1

* Point to alpha2

* Update docker to alpha2

* Use Paket.Core.dll to get dependencies on install

Forces an F# upgrade to 4.x
Allows a clean experience of charting.

* Finish up FSCharting hard dependency removal

Notes for Windows and reduce include.fsx

* Note about include

* Point to local Feature Notebook

* Update README.md

* Pin dependencies for more predictable install

* Update Paket.Core.dll

* Paket should install to distribution directory

If you launch IfSharp from a another directory e.g. up one with
bin/IfSharp.exe then the /packages folder would end up in the wrong
location and use the wrong paket.dependencies

* Mitigation for Paket.Core install issue

fsprojects/Paket#1918
Paket.Core seems to fail if your machine has never installed a given
dependency. This prevents a fatal failure but the user will then have to
install themselves.

* Add required references to build test project

* Auto-Initialise XPlotly.Plotly.fsx and FSCharting.fsx (#84)

* Auto-Initialise FSCharting.fsx

This change automatically initialises Display printers and uses
[<AutoOpen>] to expose the extension methods. As a result, the
notebook user only needs to #load the helper script, and doesn't
need to know a module name to open or an initialisation function
to run.

* Auto-initialise XPlot.Plotly.fsx

This change uses `addDisplayPrinter` to make XPlot charts display
in the same way as other elements. It also changes the way the
plot.ly JavaScript is loaded such that it is loaded in the notebook
browser when the script is loaded, without needing an initialisation
call.

* Allow XPlot.Plotly charts to render as images

Plotly has many lovely features, but large data sets rendered as
JavaScript can be difficult to deal with. This adds Chart.Image,
which renders a chart as a static PNG.

* Consistently load plotly JS across browsers

* Chart.Image generates SVG on Microsoft browsers, as PNG generation fails

* Install option (#87)

Previously, ifsharp.exe would always try to run jupyter. This is not
the desired behaviour in some instances (for example, in a Docker
container, where jupyter must be started with specific command line
options).

This change adds a `--install` option that installs the IfSharp
kernel without trying to start jupyter.

* Update Json.NET and fix for Chessie

Old version of Json.NET was a holdover from NuGet dependencies.

* We're no longer using these binaries in \lib

Remove for clarity.

* Update F# Compiler Services

#85

* Simplify dependencies

* Update sigdata and optdata to F# 4.0

#85

* Add a Paket.fsx script (#86)

* Add a Paket.fsx script

This script loads `Paket.Core.dll` and sets up a `paket` object that
is an instance of `Paket.Dependencies` that is initialised from
`bin/paket.dependencies`. This allows simple use of Pajet from
jupyter, like this:

```fsharp
paket.GetDirectDependencies()
```

* provide convenience syntax for adding deps

* remove accidental nested module

* Add options for PNG and SVG output of Plot.ly charts (#88)

* Add helper script support for Angara.Charting (#89)

* This is fixed by upgrading Json.net

* Coherent net451 framework usage

* Update README.md

* Sample Jupyter feature notebook

* Paket based dependencies (#91)

* Paket based dependencies

Rather than depend on a fixed set of packages, use Paket to fetch all
dependencies dynamically.

Helper scripts are divided into two parts to allow Paket to run _before_
the `#r` directives in the second script are evaluated. This is necessary
because preprocessor directives are evaluated before all code, and this
appears to be transitive through `#load` directives - that is, a wrapper
scripts that loads both the Paket script and the helper script also
evaluates the `#r` directives in the second script before code in the
first script is run.

* Update documentation for Jupyter branch

This includes docs for Paket rather than Nuget, installation procedure,
etc. In addition, this changes the Paket dependencies for building
IfSharp to use a Docs group to prevent an FSharp.Compiler.Service conflict.

* Update dependencies and pin to AsyncIO 0.1.20.0 for NetMQ (#92)

* Update Dockerfile (#93)

* Update Dockerfile

* Fix warnings (#94)

* Use new NetMQ interface
* Handle FSharpToolTipElement.SingleParameter
* Autogenerate binding redirects
* Pin XPlot.Plotly to prevent Newtonsoft.JSON conflicts

* Update to 0.2.5 Angara Charting / XPlot 1.4.2

XPlot 1.4.2 requires Newtonsoft.Json 9.0.1 where Angara needed <= 9.0.0.
Angara has now been updated so we can use both at the same time.

microsoft/Angara#2

* Add support for FsLab-compatible AddHtmlPrinter (#96)

* handle comm_info_request

* fix union type

* Point to alpha4 release fixes Jupyter 4.2 issue

* Fix link to alpha4

* Update README.md

* Update README.md

* Kernelspecs (#98)

* use kernelspecs path

* add semicolon

* do not replace the jupyter logo

* change the display name to F#

* Update installer to get everything in bin
  • Loading branch information
cgravill authored and sylvanc committed Nov 24, 2016
1 parent d7f6183 commit c58e339
Show file tree
Hide file tree
Showing 81 changed files with 2,510 additions and 824 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

.vs/

# User-specific files
*.suo
*.user
Expand Down Expand Up @@ -158,6 +160,9 @@ $RECYCLE.BIN/
# Exclude F# project specific directories and files
# ===================================================

# FAKE directory
.fake/

# NuGet Packages Directory
packages/

Expand All @@ -169,3 +174,5 @@ temp/

# Test results produced by build
TestResults.xml
.paket/paket.exe

136 changes: 0 additions & 136 deletions .nuget/NuGet.targets

This file was deleted.

Binary file added .paket/paket.bootstrapper.exe
Binary file not shown.
41 changes: 41 additions & 0 deletions .paket/paket.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- Enable the restore command to run before builds -->
<RestorePackages Condition=" '$(RestorePackages)' == '' ">true</RestorePackages>
<!-- Download Paket.exe if it does not already exist -->
<DownloadPaket Condition=" '$(DownloadPaket)' == '' ">true</DownloadPaket>
<PaketToolsPath>$(MSBuildThisFileDirectory)</PaketToolsPath>
<PaketRootPath>$(MSBuildThisFileDirectory)..\</PaketRootPath>
<MonoPath Condition="'$(MonoPath)' == '' And Exists('/Library/Frameworks/Mono.framework/Commands/mono')">/Library/Frameworks/Mono.framework/Commands/mono</MonoPath>
<MonoPath Condition="'$(MonoPath)' == ''">mono</MonoPath>
</PropertyGroup>
<PropertyGroup>
<!-- Paket command -->
<PaketExePath Condition=" '$(PaketExePath)' == '' ">$(PaketToolsPath)paket.exe</PaketExePath>
<PaketBootStrapperExePath Condition=" '$(PaketBootStrapperExePath)' == '' ">$(PaketToolsPath)paket.bootstrapper.exe</PaketBootStrapperExePath>
<PaketCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketExePath)"</PaketCommand>
<PaketCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 "$(PaketExePath)"</PaketCommand>
<PaketBootStrapperCommand Condition=" '$(OS)' == 'Windows_NT'">"$(PaketBootStrapperExePath)" $(PaketBootStrapperCommandArgs)</PaketBootStrapperCommand>
<PaketBootStrapperCommand Condition=" '$(OS)' != 'Windows_NT' ">$(MonoPath) --runtime=v4.0.30319 $(PaketBootStrapperExePath) $(PaketBootStrapperCommandArgs)</PaketBootStrapperCommand>
<!-- Commands -->
<PaketReferences Condition="!Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectDirectory)\paket.references</PaketReferences>
<PaketReferences Condition="!Exists('$(PaketReferences)')">$(MSBuildStartupDirectory)\paket.references</PaketReferences>
<PaketReferences Condition="Exists('$(MSBuildProjectFullPath).paket.references')">$(MSBuildProjectFullPath).paket.references</PaketReferences>
<RestoreCommand>$(PaketCommand) restore --references-files "$(PaketReferences)"</RestoreCommand>
<DownloadPaketCommand>$(PaketBootStrapperCommand)</DownloadPaketCommand>
<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">RestorePackages; $(BuildDependsOn);</BuildDependsOn>
</PropertyGroup>
<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate paket.exe -->
<Error Condition="'$(DownloadPaket)' != 'true' AND !Exists('$(PaketExePath)')" Text="Unable to locate '$(PaketExePath)'" />
<MsBuild Targets="DownloadPaket" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadPaket=$(DownloadPaket)" />
</Target>
<Target Name="DownloadPaket">
<Exec Command="$(DownloadPaketCommand)" IgnoreStandardErrorWarningFormat="true" Condition=" '$(DownloadPaket)' == 'true' AND !Exists('$(PaketExePath)')" />
</Target>
<Target Name="RestorePackages" DependsOnTargets="CheckPrerequisites">
<Exec Command="$(RestoreCommand)" IgnoreStandardErrorWarningFormat="true" WorkingDirectory="$(PaketRootPath)" Condition="Exists('$(PaketReferences)')" ContinueOnError="true" />
</Target>
</Project>
38 changes: 38 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
FROM ubuntu:16.04

RUN apt-key adv \
--keyserver hkp://keyserver.ubuntu.com:80 \
--recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
&& echo "deb http://download.mono-project.com/repo/debian wheezy main" | \
tee /etc/apt/sources.list.d/mono-xamarin.list \
&& apt-get update \
&& apt-get install -y \
mono-complete \
fsharp \
python3-pip \
git \
&& rm -rf /var/lib/apt/lists/*

RUN pip3 install --upgrade pip && pip3 install jupyter

WORKDIR /
RUN git clone https://github.com/fsprojects/IfSharp.git

WORKDIR /IfSharp
RUN git checkout jupyter
RUN ./build.sh
RUN mono bin/ifsharp.exe --install

WORKDIR /
RUN mkdir notebooks
VOLUME notebooks

EXPOSE 8888

ENTRYPOINT ["jupyter", \
"notebook", \
"--no-browser", \
"--ip='*'", \
"--port=8888", \
"--notebook-dir=/notebooks" \
]
Loading

0 comments on commit c58e339

Please sign in to comment.