Skip to content

Include various Improvements from the developer branch #17

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

Merged
merged 13 commits into from
Jun 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,6 @@ docsrc/content/license.md
docsrc/content/release-notes.md
.fake
docsrc/tools/FSharp.Formatting.svclog

/docs
AssemblyInfo.fs
docs
temp/gh-pages
/src/FSharp.Plotly/TestScript.fsx
209 changes: 176 additions & 33 deletions .paket/Paket.Restore.targets

Large diffs are not rendered by default.

38 changes: 13 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
language: csharp
#sudo: required
sudo: false
dist: trusty # Ubuntu 14.04
mono: latest
dotnet : 2.1.403

sudo: false # use the new container-based Travis infrastructure

mono: 5.12.0

dotnet: 2.1.300
before_install:

install:
- dotnet restore build.proj

# workaround for missing .net 4.5 targing pack

- export FrameworkPathOverride=$(dirname $(which mono))/../lib/mono/4.5/
script:
- dotnet fake build --target Linux

before_install:
- chmod +x build.sh

matrix:
include:
- os: linux # Ubuntu 14.04
dist: trusty
sudo: required
dotnet : 2.1.300
- os: osx # OSX 10.12
osx_image: xcode9.1
dotnet : 2.1.300
dist: trusty
sudo: required

script:
- ./build.sh All
branches:
except:
- gh-pages
- nuget
55 changes: 28 additions & 27 deletions FSharp.Plotly.sln
Original file line number Diff line number Diff line change
Expand Up @@ -27,33 +27,34 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{83F16175
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D5255-776D-4B61-85F9-73C37AA1FB9A}"
ProjectSection(SolutionItems) = preProject
docs\content\2d-histograms.fsx = docs\content\2d-histograms.fsx
docs\content\3d-line-plots.fsx = docs\content\3d-line-plots.fsx
docs\content\3d-mesh-plots.fsx = docs\content\3d-mesh-plots.fsx
docs\content\3d-scatter-plots.fsx = docs\content\3d-scatter-plots.fsx
docs\content\3d-surface-plots.fsx = docs\content\3d-surface-plots.fsx
docs\content\area-plots.fsx = docs\content\area-plots.fsx
docs\content\bar-charts.fsx = docs\content\bar-charts.fsx
docs\content\box-plots.fsx = docs\content\box-plots.fsx
docs\content\bubble-charts.fsx = docs\content\bubble-charts.fsx
docs\content\choropleth-map.fsx = docs\content\choropleth-map.fsx
docs\content\contour-plots.fsx = docs\content\contour-plots.fsx
docs\content\errorbars.fsx = docs\content\errorbars.fsx
docs\content\extensions.fsx = docs\content\extensions.fsx
docs\content\getting-started.fsx = docs\content\getting-started.fsx
docs\content\heatmaps.fsx = docs\content\heatmaps.fsx
docs\content\histograms.fsx = docs\content\histograms.fsx
docs\content\index.fsx = docs\content\index.fsx
docs\content\line-scatter-plots.fsx = docs\content\line-scatter-plots.fsx
docs\content\multiple-charts.fsx = docs\content\multiple-charts.fsx
docs\content\parallel-coords.fsx = docs\content\parallel-coords.fsx
docs\content\pie-daughnut-charts.fsx = docs\content\pie-daughnut-charts.fsx
docs\content\plotly-wpf.fsx = docs\content\plotly-wpf.fsx
docs\content\polar-charts.fsx = docs\content\polar-charts.fsx
docs\content\range-plots.fsx = docs\content\range-plots.fsx
docs\content\shapes.fsx = docs\content\shapes.fsx
docs\content\violin-plots.fsx = docs\content\violin-plots.fsx
docs\content\windrose-charts.fsx = docs\content\windrose-charts.fsx
docsrc\content\2d-histograms.fsx = docsrc\content\2d-histograms.fsx
docsrc\content\3d-line-plots.fsx = docsrc\content\3d-line-plots.fsx
docsrc\content\3d-mesh-plots.fsx = docsrc\content\3d-mesh-plots.fsx
docsrc\content\3d-scatter-plots.fsx = docsrc\content\3d-scatter-plots.fsx
docsrc\content\3d-surface-plots.fsx = docsrc\content\3d-surface-plots.fsx
docsrc\content\area-plots.fsx = docsrc\content\area-plots.fsx
docsrc\content\bar-charts.fsx = docsrc\content\bar-charts.fsx
docsrc\content\box-plots.fsx = docsrc\content\box-plots.fsx
docsrc\content\bubble-charts.fsx = docsrc\content\bubble-charts.fsx
docsrc\content\choropleth-map.fsx = docsrc\content\choropleth-map.fsx
docsrc\content\contour-plots.fsx = docsrc\content\contour-plots.fsx
docsrc\content\errorbars.fsx = docsrc\content\errorbars.fsx
docsrc\content\extensions.fsx = docsrc\content\extensions.fsx
docsrc\content\getting-started.fsx = docsrc\content\getting-started.fsx
docsrc\content\heatmaps.fsx = docsrc\content\heatmaps.fsx
docsrc\content\histograms.fsx = docsrc\content\histograms.fsx
docsrc\content\index.fsx = docsrc\content\index.fsx
docsrc\content\line-scatter-plots.fsx = docsrc\content\line-scatter-plots.fsx
docsrc\content\multiple-charts.fsx = docsrc\content\multiple-charts.fsx
docsrc\content\parallel-coords.fsx = docsrc\content\parallel-coords.fsx
docsrc\content\pie-daughnut-charts.fsx = docsrc\content\pie-daughnut-charts.fsx
docsrc\content\plotly-wpf.fsx = docsrc\content\plotly-wpf.fsx
docsrc\content\polar-charts.fsx = docsrc\content\polar-charts.fsx
docsrc\content\range-plots.fsx = docsrc\content\range-plots.fsx
docsrc\content\shapes.fsx = docsrc\content\shapes.fsx
docsrc\content\splom.fsx = docsrc\content\splom.fsx
docsrc\content\violin-plots.fsx = docsrc\content\violin-plots.fsx
docsrc\content\windrose-charts.fsx = docsrc\content\windrose-charts.fsx
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{ED8079DD-2B06-4030-9F0F-DC548F98E1C4}"
Expand Down
7 changes: 7 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ image: Visual Studio 2017

init:
- git config --global core.autocrlf input
- dotnet tool install fake-cli -g
build_script:
- cmd: build.cmd All
test: off
version: 0.0.1.{build}

branches:
only:
- master
- developer

artifacts:
- path: bin
name: bin
99 changes: 92 additions & 7 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// --------------------------------------------------------------------------------------

#r "paket: groupref FakeBuild //"
open Fake.IO

#load "./.fake/build.fsx/intellisense.fsx"

Expand All @@ -13,10 +12,68 @@ open Fake.Core.TargetOperators
open Fake.DotNet
open Fake.IO
open Fake.IO.FileSystemOperators
open Fake.IO.Globbing
open Fake.IO.Globbing.Operators
open Fake.DotNet.Testing
open Fake.Tools
open Fake.Api
open Fake.Tools.Git

[<AutoOpen>]
module TemporaryDocumentationHelpers =

type LiterateArguments =
{ ToolPath : string
Source : string
OutputDirectory : string
Template : string
ProjectParameters : (string * string) list
LayoutRoots : string list
FsiEval : bool }


let private run toolPath command =
if 0 <> Process.execSimple ((fun info ->
{ info with
FileName = toolPath
Arguments = command }) >> Process.withFramework) System.TimeSpan.MaxValue

then failwithf "FSharp.Formatting %s failed." command

let createDocs p =
let toolPath = Tools.findToolInSubPath "fsformatting.exe" (Directory.GetCurrentDirectory() @@ "lib/Formatting")

let defaultLiterateArguments =
{ ToolPath = toolPath
Source = ""
OutputDirectory = ""
Template = ""
ProjectParameters = []
LayoutRoots = []
FsiEval = false }

let arguments = (p:LiterateArguments->LiterateArguments) defaultLiterateArguments
let layoutroots =
if arguments.LayoutRoots.IsEmpty then []
else [ "--layoutRoots" ] @ arguments.LayoutRoots
let source = arguments.Source
let template = arguments.Template
let outputDir = arguments.OutputDirectory
let fsiEval = if arguments.FsiEval then [ "--fsieval" ] else []

let command =
arguments.ProjectParameters
|> Seq.map (fun (k, v) -> [ k; v ])
|> Seq.concat
|> Seq.append
(["literate"; "--processdirectory" ] @ layoutroots @ [ "--inputdirectory"; source; "--templatefile"; template;
"--outputDirectory"; outputDir] @ fsiEval @ [ "--replacements" ])
|> Seq.map (fun s ->
if s.StartsWith "\"" then s
else sprintf "\"%s\"" s)
|> String.separated " "
run arguments.ToolPath command
printfn "Successfully generated docs for %s" source

// --------------------------------------------------------------------------------------
// START TODO: Provide project-specific details below
Expand Down Expand Up @@ -319,20 +376,43 @@ Target.create "Docs" (fun _ ->
| Some lang -> layoutRootsAll.[lang]
| None -> layoutRootsAll.["en"] // "en" is the default language

FSFormatting.createDocs (fun args ->
createDocs (fun args ->
{ args with
Source = content
OutputDirectory = output
LayoutRoots = layoutRoots
ProjectParameters = ("root", root)::info
Template = docTemplate } )
Template = docTemplate
FsiEval = true
} )
)

// --------------------------------------------------------------------------------------
// Release Scripts


//#load "paket-files/fsharp/FAKE/modules/Octokit/Octokit.fsx"
//open Octokit
Target.create "ReleaseDocs" (fun _ ->
let tempDocsDir = "temp/gh-pages"
Shell.cleanDir tempDocsDir |> ignore
Git.Repository.cloneSingleBranch "" (gitHome + "/" + gitName + ".git") "gh-pages" tempDocsDir
Shell.copyRecursive "docs" tempDocsDir true |> printfn "%A"
Git.Staging.stageAll tempDocsDir
Git.Commit.exec tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion)
Git.Branches.push tempDocsDir
)

Target.create "ReleaseLocal" (fun _ ->
let tempDocsDir = "temp/gh-pages"
Shell.cleanDir tempDocsDir |> ignore
Shell.copyRecursive "docs" tempDocsDir true |> printfn "%A"
Shell.replaceInFiles
(seq {
yield "href=\"/" + project + "/","href=\""
yield "src=\"/" + project + "/","src=\""})
(Directory.EnumerateFiles tempDocsDir |> Seq.filter (fun x -> x.EndsWith(".html")))
)

Target.create "Release" (fun _ ->
// not fully converted from FAKE 4
Expand Down Expand Up @@ -400,16 +480,16 @@ Target.create "All" ignore
==> "Build"
==> "CopyBinaries"
==> "RunTests"
// ==> "GenerateDocs"
==> "GenerateDocs"
==> "NuGet"
==> "All"

"RunTests" ?=> "CleanDocs"

"CleanDocs"
==>"Docs"
// ==> "ReferenceDocs"
// ==> "GenerateDocs"
==> "ReferenceDocs"
==> "GenerateDocs"

"Clean"
==> "Release"
Expand All @@ -418,6 +498,11 @@ Target.create "All" ignore
==> "PublishNuget"
==> "Release"

"GenerateDocs"
==> "ReleaseDocs"

"All"
==> "ReleaseLocal"

"Clean"
==> "AssemblyInfo"
Expand All @@ -427,4 +512,4 @@ Target.create "All" ignore
==> "NuGet"
==> "GitReleaseNuget"

Target.runOrDefault "All"
Target.runOrDefaultWithArguments "All"
Binary file removed docs/content/img/github-blue.png
Binary file not shown.
Binary file removed docs/content/img/github.png
Binary file not shown.
Loading