Skip to content

Commit 0dfae71

Browse files
authored
Merge pull request #17 from muehlhaus/developer
Include various Improvements from the developer branch
2 parents 7c6ec95 + 11a80f9 commit 0dfae71

File tree

191 files changed

+17972
-1624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+17972
-1624
lines changed

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,6 @@ docsrc/content/license.md
183183
docsrc/content/release-notes.md
184184
.fake
185185
docsrc/tools/FSharp.Formatting.svclog
186-
187-
/docs
188-
AssemblyInfo.fs
186+
docs
187+
temp/gh-pages
188+
/src/FSharp.Plotly/TestScript.fsx

.paket/Paket.Restore.targets

+176-33
Large diffs are not rendered by default.

.travis.yml

+13-25
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,19 @@
11
language: csharp
2+
#sudo: required
3+
sudo: false
4+
dist: trusty # Ubuntu 14.04
5+
mono: latest
6+
dotnet : 2.1.403
27

3-
sudo: false # use the new container-based Travis infrastructure
4-
5-
mono: 5.12.0
6-
7-
dotnet: 2.1.300
8+
before_install:
89

9-
install:
10+
- dotnet restore build.proj
1011

11-
# workaround for missing .net 4.5 targing pack
1212

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

15-
before_install:
16-
- chmod +x build.sh
17-
18-
matrix:
19-
include:
20-
- os: linux # Ubuntu 14.04
21-
dist: trusty
22-
sudo: required
23-
dotnet : 2.1.300
24-
- os: osx # OSX 10.12
25-
osx_image: xcode9.1
26-
dotnet : 2.1.300
27-
dist: trusty
28-
sudo: required
29-
30-
script:
31-
- ./build.sh All
16+
branches:
17+
except:
18+
- gh-pages
19+
- nuget

FSharp.Plotly.sln

+28-27
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,34 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{83F16175
2727
EndProject
2828
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D5255-776D-4B61-85F9-73C37AA1FB9A}"
2929
ProjectSection(SolutionItems) = preProject
30-
docs\content\2d-histograms.fsx = docs\content\2d-histograms.fsx
31-
docs\content\3d-line-plots.fsx = docs\content\3d-line-plots.fsx
32-
docs\content\3d-mesh-plots.fsx = docs\content\3d-mesh-plots.fsx
33-
docs\content\3d-scatter-plots.fsx = docs\content\3d-scatter-plots.fsx
34-
docs\content\3d-surface-plots.fsx = docs\content\3d-surface-plots.fsx
35-
docs\content\area-plots.fsx = docs\content\area-plots.fsx
36-
docs\content\bar-charts.fsx = docs\content\bar-charts.fsx
37-
docs\content\box-plots.fsx = docs\content\box-plots.fsx
38-
docs\content\bubble-charts.fsx = docs\content\bubble-charts.fsx
39-
docs\content\choropleth-map.fsx = docs\content\choropleth-map.fsx
40-
docs\content\contour-plots.fsx = docs\content\contour-plots.fsx
41-
docs\content\errorbars.fsx = docs\content\errorbars.fsx
42-
docs\content\extensions.fsx = docs\content\extensions.fsx
43-
docs\content\getting-started.fsx = docs\content\getting-started.fsx
44-
docs\content\heatmaps.fsx = docs\content\heatmaps.fsx
45-
docs\content\histograms.fsx = docs\content\histograms.fsx
46-
docs\content\index.fsx = docs\content\index.fsx
47-
docs\content\line-scatter-plots.fsx = docs\content\line-scatter-plots.fsx
48-
docs\content\multiple-charts.fsx = docs\content\multiple-charts.fsx
49-
docs\content\parallel-coords.fsx = docs\content\parallel-coords.fsx
50-
docs\content\pie-daughnut-charts.fsx = docs\content\pie-daughnut-charts.fsx
51-
docs\content\plotly-wpf.fsx = docs\content\plotly-wpf.fsx
52-
docs\content\polar-charts.fsx = docs\content\polar-charts.fsx
53-
docs\content\range-plots.fsx = docs\content\range-plots.fsx
54-
docs\content\shapes.fsx = docs\content\shapes.fsx
55-
docs\content\violin-plots.fsx = docs\content\violin-plots.fsx
56-
docs\content\windrose-charts.fsx = docs\content\windrose-charts.fsx
30+
docsrc\content\2d-histograms.fsx = docsrc\content\2d-histograms.fsx
31+
docsrc\content\3d-line-plots.fsx = docsrc\content\3d-line-plots.fsx
32+
docsrc\content\3d-mesh-plots.fsx = docsrc\content\3d-mesh-plots.fsx
33+
docsrc\content\3d-scatter-plots.fsx = docsrc\content\3d-scatter-plots.fsx
34+
docsrc\content\3d-surface-plots.fsx = docsrc\content\3d-surface-plots.fsx
35+
docsrc\content\area-plots.fsx = docsrc\content\area-plots.fsx
36+
docsrc\content\bar-charts.fsx = docsrc\content\bar-charts.fsx
37+
docsrc\content\box-plots.fsx = docsrc\content\box-plots.fsx
38+
docsrc\content\bubble-charts.fsx = docsrc\content\bubble-charts.fsx
39+
docsrc\content\choropleth-map.fsx = docsrc\content\choropleth-map.fsx
40+
docsrc\content\contour-plots.fsx = docsrc\content\contour-plots.fsx
41+
docsrc\content\errorbars.fsx = docsrc\content\errorbars.fsx
42+
docsrc\content\extensions.fsx = docsrc\content\extensions.fsx
43+
docsrc\content\getting-started.fsx = docsrc\content\getting-started.fsx
44+
docsrc\content\heatmaps.fsx = docsrc\content\heatmaps.fsx
45+
docsrc\content\histograms.fsx = docsrc\content\histograms.fsx
46+
docsrc\content\index.fsx = docsrc\content\index.fsx
47+
docsrc\content\line-scatter-plots.fsx = docsrc\content\line-scatter-plots.fsx
48+
docsrc\content\multiple-charts.fsx = docsrc\content\multiple-charts.fsx
49+
docsrc\content\parallel-coords.fsx = docsrc\content\parallel-coords.fsx
50+
docsrc\content\pie-daughnut-charts.fsx = docsrc\content\pie-daughnut-charts.fsx
51+
docsrc\content\plotly-wpf.fsx = docsrc\content\plotly-wpf.fsx
52+
docsrc\content\polar-charts.fsx = docsrc\content\polar-charts.fsx
53+
docsrc\content\range-plots.fsx = docsrc\content\range-plots.fsx
54+
docsrc\content\shapes.fsx = docsrc\content\shapes.fsx
55+
docsrc\content\splom.fsx = docsrc\content\splom.fsx
56+
docsrc\content\violin-plots.fsx = docsrc\content\violin-plots.fsx
57+
docsrc\content\windrose-charts.fsx = docsrc\content\windrose-charts.fsx
5758
EndProjectSection
5859
EndProject
5960
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{ED8079DD-2B06-4030-9F0F-DC548F98E1C4}"

appveyor.yml

+7
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,17 @@ image: Visual Studio 2017
22

33
init:
44
- git config --global core.autocrlf input
5+
- dotnet tool install fake-cli -g
56
build_script:
67
- cmd: build.cmd All
78
test: off
89
version: 0.0.1.{build}
10+
11+
branches:
12+
only:
13+
- master
14+
- developer
15+
916
artifacts:
1017
- path: bin
1118
name: bin

build.fsx

+92-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
// --------------------------------------------------------------------------------------
44

55
#r "paket: groupref FakeBuild //"
6-
open Fake.IO
76

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

@@ -13,10 +12,68 @@ open Fake.Core.TargetOperators
1312
open Fake.DotNet
1413
open Fake.IO
1514
open Fake.IO.FileSystemOperators
15+
open Fake.IO.Globbing
1616
open Fake.IO.Globbing.Operators
1717
open Fake.DotNet.Testing
1818
open Fake.Tools
1919
open Fake.Api
20+
open Fake.Tools.Git
21+
22+
[<AutoOpen>]
23+
module TemporaryDocumentationHelpers =
24+
25+
type LiterateArguments =
26+
{ ToolPath : string
27+
Source : string
28+
OutputDirectory : string
29+
Template : string
30+
ProjectParameters : (string * string) list
31+
LayoutRoots : string list
32+
FsiEval : bool }
33+
34+
35+
let private run toolPath command =
36+
if 0 <> Process.execSimple ((fun info ->
37+
{ info with
38+
FileName = toolPath
39+
Arguments = command }) >> Process.withFramework) System.TimeSpan.MaxValue
40+
41+
then failwithf "FSharp.Formatting %s failed." command
42+
43+
let createDocs p =
44+
let toolPath = Tools.findToolInSubPath "fsformatting.exe" (Directory.GetCurrentDirectory() @@ "lib/Formatting")
45+
46+
let defaultLiterateArguments =
47+
{ ToolPath = toolPath
48+
Source = ""
49+
OutputDirectory = ""
50+
Template = ""
51+
ProjectParameters = []
52+
LayoutRoots = []
53+
FsiEval = false }
54+
55+
let arguments = (p:LiterateArguments->LiterateArguments) defaultLiterateArguments
56+
let layoutroots =
57+
if arguments.LayoutRoots.IsEmpty then []
58+
else [ "--layoutRoots" ] @ arguments.LayoutRoots
59+
let source = arguments.Source
60+
let template = arguments.Template
61+
let outputDir = arguments.OutputDirectory
62+
let fsiEval = if arguments.FsiEval then [ "--fsieval" ] else []
63+
64+
let command =
65+
arguments.ProjectParameters
66+
|> Seq.map (fun (k, v) -> [ k; v ])
67+
|> Seq.concat
68+
|> Seq.append
69+
(["literate"; "--processdirectory" ] @ layoutroots @ [ "--inputdirectory"; source; "--templatefile"; template;
70+
"--outputDirectory"; outputDir] @ fsiEval @ [ "--replacements" ])
71+
|> Seq.map (fun s ->
72+
if s.StartsWith "\"" then s
73+
else sprintf "\"%s\"" s)
74+
|> String.separated " "
75+
run arguments.ToolPath command
76+
printfn "Successfully generated docs for %s" source
2077

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

322-
FSFormatting.createDocs (fun args ->
379+
createDocs (fun args ->
323380
{ args with
324381
Source = content
325382
OutputDirectory = output
326383
LayoutRoots = layoutRoots
327384
ProjectParameters = ("root", root)::info
328-
Template = docTemplate } )
385+
Template = docTemplate
386+
FsiEval = true
387+
} )
329388
)
330389

331390
// --------------------------------------------------------------------------------------
332391
// Release Scripts
333392

393+
334394
//#load "paket-files/fsharp/FAKE/modules/Octokit/Octokit.fsx"
335395
//open Octokit
396+
Target.create "ReleaseDocs" (fun _ ->
397+
let tempDocsDir = "temp/gh-pages"
398+
Shell.cleanDir tempDocsDir |> ignore
399+
Git.Repository.cloneSingleBranch "" (gitHome + "/" + gitName + ".git") "gh-pages" tempDocsDir
400+
Shell.copyRecursive "docs" tempDocsDir true |> printfn "%A"
401+
Git.Staging.stageAll tempDocsDir
402+
Git.Commit.exec tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion)
403+
Git.Branches.push tempDocsDir
404+
)
405+
406+
Target.create "ReleaseLocal" (fun _ ->
407+
let tempDocsDir = "temp/gh-pages"
408+
Shell.cleanDir tempDocsDir |> ignore
409+
Shell.copyRecursive "docs" tempDocsDir true |> printfn "%A"
410+
Shell.replaceInFiles
411+
(seq {
412+
yield "href=\"/" + project + "/","href=\""
413+
yield "src=\"/" + project + "/","src=\""})
414+
(Directory.EnumerateFiles tempDocsDir |> Seq.filter (fun x -> x.EndsWith(".html")))
415+
)
336416

337417
Target.create "Release" (fun _ ->
338418
// not fully converted from FAKE 4
@@ -400,16 +480,16 @@ Target.create "All" ignore
400480
==> "Build"
401481
==> "CopyBinaries"
402482
==> "RunTests"
403-
// ==> "GenerateDocs"
483+
==> "GenerateDocs"
404484
==> "NuGet"
405485
==> "All"
406486

407487
"RunTests" ?=> "CleanDocs"
408488

409489
"CleanDocs"
410490
==>"Docs"
411-
// ==> "ReferenceDocs"
412-
// ==> "GenerateDocs"
491+
==> "ReferenceDocs"
492+
==> "GenerateDocs"
413493

414494
"Clean"
415495
==> "Release"
@@ -418,6 +498,11 @@ Target.create "All" ignore
418498
==> "PublishNuget"
419499
==> "Release"
420500

501+
"GenerateDocs"
502+
==> "ReleaseDocs"
503+
504+
"All"
505+
==> "ReleaseLocal"
421506

422507
"Clean"
423508
==> "AssemblyInfo"
@@ -427,4 +512,4 @@ Target.create "All" ignore
427512
==> "NuGet"
428513
==> "GitReleaseNuget"
429514

430-
Target.runOrDefault "All"
515+
Target.runOrDefaultWithArguments "All"

docs/content/img/github-blue.png

-817 Bytes
Binary file not shown.

docs/content/img/github.png

-806 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)