fslaborg / Deedle

Easy to use .NET library for data and time series manipulation and for scientific programming
http://fslab.org/Deedle/
BSD 2-Clause "Simplified" License
937 stars 195 forks source link

Start converting Deedle to target netstandard2.0 #382

Closed kblohm closed 6 years ago

kblohm commented 6 years ago

Hi, i started working on supporting both netstandard2.0 and net45. I have converted all the projects to the new ProjectSdk format and targeted changed the target frameworks to netstandard/netcoreapp and net45 where applicable. There are also a few code changes in order to support netstandard. Mainly the use of AssemblyBuilder instead of AppDomain.CurrentDomain.DefineDynamicAssembly. I also fixed the documentation content and samples and updated the fake build script. For the build script i pretty much copied what FSharp.Data is currently doing in their effort to support netstandard. I also updated several of the packages used.

All the tests (except for the RPlugin, see below) are working fine. The build script might need some more work, especially with regard to publishing to nuget.

There are however a few things i could use help with, mainly in regards to the RProvider:

I also updated the FSharp.Data files and the signature files are out of date. I created new ones but even with updated files, there seems to be a problem with the new project format and linking external files. If i copy a FSharp.Data file (for example IO.fs) into Deedle\src\FSharp.Data next to its signature file (IO.fsi) everything works fine. If i leave the implementation file in paket-files\fsharp\FSharp.Data, the compiler complains about a missing implementation file for the signature file, even though without a signature file at all everything compiles just fine. I'm not really sure what to do about that, so i left the signature files out for now.

zyzhu commented 6 years ago

@kblohm Thanks a lot for your efforts. I modified your changes and get it working now.

The trick to get rprovider working is to reference each file in deedle.rprovider.plugin. I don't know why direct nuget reference gives me error message. Anyway, I'm really glad to move forward to netstandard2.0 now. Thanks again.

kblohm commented 6 years ago

@zyzhu Thank you for finishing this! Maybe the RProvider needs to be updated to actually support netstandard? At least the "docs" suggest that updates might be needed. Does referencing everything directly not create versioning problems? Also, as far as i know R.Net is not supporting netstandard yet. So is this really working or just compiling now?

As a side note (as you mentioned you were new to maintaining OSS): you can generally ask the people that created the PR for help, you did not have to do this all on your own (unless you wanted to of course, which is totally fine).

zyzhu commented 6 years ago

@kblohm Referencing dll files of rprovider definitely is not ideal. But I just want to tackle problem one at a time. Targeting Deedle to netstandard was my priority. At least it can be moved forward independent of RProvider for now.

Deedle.RProvider unit tests are all passed. I also tested locally building 1.2.6 nuget package and it all works well on net45. But Deedle.RProvider is not supposed to work on netstandard yet until RProvider targets netstandard. I'm still learning building type provider and hopefully I can help to fix it.

Thanks for giving me the heads up about OSS. I'm very new to OSS contributions and definitely will need to get familiar with conventions. I figure in order to get people involved on this project, fixing build is the first priority as it's quite tedious. Moving Deedle to netstandard might involve more people who are on Linux and Mac in the future.

My next step is to enrich documentations and create more sample Azure notebooks to let community understand the power of Deedle even at the current status. Meanwhile, I will start to look into the piles of open issues. I might start with various basic CSV problems as that stops most data scientists to use Deedle to test ideas efficiently.

Please grab any issue if you find time to help. Thanks!

dsyme commented 6 years ago

Hi @zyzhu Thanks for all your amazing efforts! I'll try to review your PRs as well :)

Both @zyzhu and @kblohm - I've created a list of TODOs to "modernize" FsLab, see https://github.com/fslaborg/FsLab/issues/137. Please let me know what you think and if you plan to work on any of the issues

@kblohm if you'd like to come on board as a maintainer too for some/all of the projects please let me know