fslaborg / zzarchive-FsLab

A collection of packages for data science with F#
http://fslab.org
Other
159 stars 42 forks source link

Make able to reference FsLab.fsx from nuget packages cache. #132

Closed maestrow closed 3 years ago

maestrow commented 7 years ago

Not so long ago in paket was added a great option storage: none. With this option packages folder will not be created in your project directory. In case of FsLab Journal Template this is very helpfull because I do not want to bloat my journal folders with heavy packages folders. I want to keep it clean.

To reference packages from cache there is also a helpfull command to generate include-scripts: paket generate-load-scripts.

And now there is a problem with loading FsLab.fsx from cache, because it references other libraries as they are located in the local packages folder, i.e.:

#I "../Deedle.RPlugin/lib/net40"
#I "../Deedle.RPlugin.1.2.5/lib/net40"
#I "../FSharp.Charting/lib/net40"

and so on. That relative paths is incorrect when I load FsLab.fsx from cache.

  1. One way to solve that - make packages directory structure in local packages folder equals to cahe folder (with versions subfolders).
  2. The second way to make two versions of FsLab.fsx - one to load from local packages folder and the other - to copy to projects folder as content file and to load packages from cache. Both versions can be generated from one source template (so we had to maintain only one source template).

Any other ideas?

tpetricek commented 7 years ago

This would be aeesome!

Using the auto-generated Paket load script would be great - the only caveat is that FsLab.fsx currently sets-up a few things (like FSI view handlers) so we still need that in one way or another.

So, no matter what we do, people will still need to #load something from the Paket-managed folder. How could we do that, if we assume the restored file is hidden somewhere in a cache? (I guess this would be needed in both 1 and 2 options you suggest, or am I missing something?)

One possible option would be to extend Paket so that it can atuomatically include #load for certain "load" or "init" scripts in the NuGet package. That would work, but it's a bit inelegant (as you'd need some convention for magically loaded scripts).

maestrow commented 7 years ago

@tpetricek, thanks for your response. I have new thoughts. Why FsLab.fsx functionality released as s script and why it is not just a part of a library? It contains only some extension methods and functions. All of them can be moved to a librarys code. To reference all FsLab libs we can #load generated by paket include-script. What do you think?

dsyme commented 3 years ago

FsLab is now changing to be an incubation space for F# data science projects, per discussion in https://github.com/fslaborg/zzarchive-FsLab/issues/137#issuecomment-741093688

Closing this out as it relates to the old FsLab package collection.