diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7ff73f4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,26 @@ +# Auto detect text files +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp text=auto eol=lf +*.vb diff=csharp text=auto eol=lf +*.fs diff=csharp text=auto eol=lf +*.fsi diff=csharp text=auto eol=lf +*.fsx diff=csharp text=auto eol=lf +*.sln text eol=crlf merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..86eed43 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,30 @@ +### Description + +Please provide a succinct description of your issue. + +### Repro steps + +Please provide the steps required to reproduce the problem + +1. Step A + +2. Step B + +### Expected behavior + +Please provide a description of the behavior you expect. + +### Actual behavior + +Please provide a description of the actual behavior you observe. + +### Known workarounds + +Please provide a description of any known workarounds. + +### Related information + +* Operating system +* Branch +* .NET Runtime, CoreCLR or Mono Version +* Performance information, links to performance testing scripts diff --git a/.gitignore b/.gitignore index f1e3d20..94fc64f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,49 +4,28 @@ # User-specific files *.suo *.user -*.userosscache *.sln.docstates -# User-specific files (MonoDevelop/Xamarin Studio) +# Xamarin Studio / monodevelop user-specific *.userprefs +*.dll.mdb +*.exe.mdb # Build results + [Dd]ebug/ -[Dd]ebugPublic/ [Rr]elease/ -[Rr]eleases/ x64/ -x86/ -bld/ +build/ [Bb]in/ [Oo]bj/ -[Ll]og/ - -# Visual Studio 2015 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* -# NUNIT -*.VisualState.xml -TestResult.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# DNX -project.lock.json -artifacts/ - *_i.c *_p.c -*_i.h *.ilk *.meta *.obj @@ -66,31 +45,24 @@ artifacts/ *.vssscc .builds *.pidb -*.svclog +*.log *.scc -# Chutzpah Test files -_Chutzpah* - # Visual C++ cache files ipch/ *.aps *.ncb -*.opendb *.opensdf *.sdf *.cachefile -*.VC.db -*.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx -*.sap -# TFS 2012 Local Workspace -$tf/ +# Other Visual Studio data +.vs/ # Guidance Automation Toolkit *.gpState @@ -98,10 +70,6 @@ $tf/ # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper -*.DotSettings.user - -# JustCode is a .NET coding add-in -.JustCode # TeamCity is a build add-in _TeamCity* @@ -110,16 +78,8 @@ _TeamCity* *.dotCover # NCrunch -_NCrunch_* +*.ncrunch* .*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ # Installshield output folder [Ee]xpress/ @@ -138,115 +98,95 @@ DocProject/Help/html publish/ # Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# TODO: Comment the next line if you want to checkin your web deploy settings -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# The packages folder can be ignored because of Package Restore -**/packages/* -# except build/, which is used as an MSBuild target. -!**/packages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/packages/repositories.config -# NuGet v3's project.json files produces more ignoreable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef +*.Publish.xml + +# Enable nuget.exe in the .nuget folder (though normally executables are not tracked) +!.nuget/NuGet.exe -# Microsoft Azure Emulator -ecf/ -rcf/ +# Windows Azure Build Output +csx +*.build.csdef -# Windows Store app package directories and files +# Windows Store app package directory AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!*.[Cc]ache/ +# VSCode +.vscode/ # Others +sql/ +*.Cache ClientBin/ +[Ss]tyle[Cc]op.* ~$* *~ *.dbmdl -*.dbproj.schemaview +*.[Pp]ublish.xml *.pfx *.publishsettings -node_modules/ -orleans.codegen.cs - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ # RIA/Silverlight projects Generated_Code/ -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) +# Backup & report files from converting an old project file to a newer +# Visual Studio version. Backup files are not needed, because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm # SQL Server files -*.mdf -*.ldf +App_Data/*.mdf +App_Data/*.ldf -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -# Microsoft Fakes -FakesAssemblies/ +#LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml -# GhostDoc plugin setting file -*.GhostDoc.xml +# ========================= +# Windows detritus +# ========================= -# Node.js Tools for Visual Studio -.ntvs_analysis.dat +# Windows image file caches +Thumbs.db +ehthumbs.db -# Visual Studio 6 build log -*.plg +# Folder config file +Desktop.ini -# Visual Studio 6 workspace options file -*.opt +# Recycle Bin used on file shares +$RECYCLE.BIN/ -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions +# Mac desktop service store files +.DS_Store -# Paket dependency manager -.paket/paket.exe -paket-files/ +# =================================================== +# Exclude F# project specific directories and files +# =================================================== + +# NuGet Packages Directory +packages/ + +# Generated documentation folder +docs/output/ -# FAKE - F# Make -.fake/ +# Temp folder used for publishing docs +temp/ -# JetBrains Rider -.idea/ -*.sln.iml +# Test results produced by build +TestResults.xml + +# Nuget outputs +nuget/*.nupkg +release.cmd +release.sh +localpackages/ +paket-files +*.orig +.paket/paket.exe +docs/content/license.md +docs/content/release-notes.md +.fake +docs/tools/FSharp.Formatting.svclog diff --git a/.paket/paket.bootstrapper.exe b/.paket/paket.bootstrapper.exe new file mode 100644 index 0000000..84cfeb9 Binary files /dev/null and b/.paket/paket.bootstrapper.exe differ diff --git a/.paket/paket.targets b/.paket/paket.targets new file mode 100644 index 0000000..2557fb9 --- /dev/null +++ b/.paket/paket.targets @@ -0,0 +1,36 @@ + + + + + true + + true + $(MSBuildThisFileDirectory) + $(MSBuildThisFileDirectory)..\ + + + + $(PaketToolsPath)paket.exe + $(PaketToolsPath)paket.bootstrapper.exe + "$(PaketExePath)" + mono --runtime=v4.0.30319 "$(PaketExePath)" + "$(PaketBootStrapperExePath)" + mono --runtime=v4.0.30319 $(PaketBootStrapperExePath) + + $(PaketCommand) restore + $(PaketBootStrapperCommand) + + RestorePackages; $(BuildDependsOn); + + + + + + + + + + + + + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..5152d90 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: csharp + +sudo: false # use the new container-based Travis infrastructure + +before_install: + - chmod +x build.sh + +script: + - ./build.sh All diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md new file mode 100644 index 0000000..b26cb06 --- /dev/null +++ b/RELEASE_NOTES.md @@ -0,0 +1,2 @@ +#### 0.0.1-beta - unreleased +* Initial release diff --git a/YC.QuickGraph.Query.sln b/YC.QuickGraph.Query.sln new file mode 100644 index 0000000..6ccb91f --- /dev/null +++ b/YC.QuickGraph.Query.sln @@ -0,0 +1,60 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".paket", ".paket", "{63297B98-5CED-492C-A5B7-A5B4F73CF142}" + ProjectSection(SolutionItems) = preProject + paket.dependencies = paket.dependencies + paket.lock = paket.lock + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "YC.QuickGraph.Query", "src\YC.QuickGraph.Query\YC.QuickGraph.Query.fsproj", "{3528CA82-4F2C-4624-942D-69B6E5652442}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{BF60BC93-E09B-4E5F-9D85-95A519479D54}" + ProjectSection(SolutionItems) = preProject + build.fsx = build.fsx + README.md = README.md + RELEASE_NOTES.md = RELEASE_NOTES.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{83F16175-43B1-4C90-A1EE-8E351C33435D}" + ProjectSection(SolutionItems) = preProject + docs\tools\generate.fsx = docs\tools\generate.fsx + docs\tools\templates\template.cshtml = docs\tools\templates\template.cshtml + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{8E6D5255-776D-4B61-85F9-73C37AA1FB9A}" + ProjectSection(SolutionItems) = preProject + docs\content\index.fsx = docs\content\index.fsx + docs\content\tutorial.fsx = docs\content\tutorial.fsx + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{ED8079DD-2B06-4030-9F0F-DC548F98E1C4}" +EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "YC.QuickGraph.Query.Tests", "tests\YC.QuickGraph.Query.Tests\YC.QuickGraph.Query.Tests.fsproj", "{8CCA72D8-30EE-4D7C-BC31-D6AF789547C0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3528CA82-4F2C-4624-942D-69B6E5652442}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3528CA82-4F2C-4624-942D-69B6E5652442}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3528CA82-4F2C-4624-942D-69B6E5652442}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3528CA82-4F2C-4624-942D-69B6E5652442}.Release|Any CPU.Build.0 = Release|Any CPU + {8CCA72D8-30EE-4D7C-BC31-D6AF789547C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8CCA72D8-30EE-4D7C-BC31-D6AF789547C0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8CCA72D8-30EE-4D7C-BC31-D6AF789547C0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8CCA72D8-30EE-4D7C-BC31-D6AF789547C0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {83F16175-43B1-4C90-A1EE-8E351C33435D} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1} + {8E6D5255-776D-4B61-85F9-73C37AA1FB9A} = {A6A6AF7D-D6E3-442D-9B1E-58CC91879BE1} + {8CCA72D8-30EE-4D7C-BC31-D6AF789547C0} = {ED8079DD-2B06-4030-9F0F-DC548F98E1C4} + EndGlobalSection +EndGlobal diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..0198468 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,9 @@ +init: + - git config --global core.autocrlf input +build_script: + - cmd: build.cmd +test: off +version: 0.0.1.{build} +artifacts: + - path: bin + name: bin diff --git a/build.cmd b/build.cmd new file mode 100644 index 0000000..09b44ff --- /dev/null +++ b/build.cmd @@ -0,0 +1,18 @@ +@echo off +cls + +.paket\paket.bootstrapper.exe +if errorlevel 1 ( + exit /b %errorlevel% +) + +.paket\paket.exe restore +if errorlevel 1 ( + exit /b %errorlevel% +) + +IF NOT EXIST build.fsx ( + .paket\paket.exe update + packages\build\FAKE\tools\FAKE.exe init.fsx +) +packages\build\FAKE\tools\FAKE.exe build.fsx %* diff --git a/build.fsx b/build.fsx new file mode 100644 index 0000000..eb0a0c5 --- /dev/null +++ b/build.fsx @@ -0,0 +1,409 @@ +// -------------------------------------------------------------------------------------- +// FAKE build script +// -------------------------------------------------------------------------------------- + +#r @"packages/build/FAKE/tools/FakeLib.dll" +open Fake +open Fake.Git +open Fake.AssemblyInfoFile +open Fake.ReleaseNotesHelper +open Fake.UserInputHelper +open System +open System.IO +#if MONO +#else +#load "packages/build/SourceLink.Fake/tools/Fake.fsx" +open SourceLink +#endif + +// -------------------------------------------------------------------------------------- +// START TODO: Provide project-specific details below +// -------------------------------------------------------------------------------------- + +// Information about the project are used +// - for version and project name in generated AssemblyInfo file +// - by the generated NuGet package +// - to run tests and to publish documentation on GitHub gh-pages +// - for documentation, you also need to edit info in "docs/tools/generate.fsx" + +// The name of the project +// (used by attributes in AssemblyInfo, name of a NuGet package and directory in 'src') +let project = "YC.QuickGraph.Query" + +// Short summary of the project +// (used as description in AssemblyInfo and as a short summary for NuGet package) +let summary = "Path query engine for QuickGraph" + +// Longer description of the project +// (used as a description for NuGet package; line breaks are automatically cleaned up) +let description = "Path query engine for QuickGraph library. This library contains the set of extensions which allow you to use context-free constraints for path quering." + +// List of author names (for NuGet package) +let authors = [ "YaccConstructor" ] + +// Tags for your project (for NuGet package) +let tags = "graph path quering context-free subgraph grammar QuickGraph .NET YC" + +// File system information +let solutionFile = "YC.QuickGraph.Query.sln" + +// Pattern specifying assemblies to be tested using NUnit +let testAssemblies = "tests/**/bin/Release/*Tests*.dll" + +// Git configuration (used for publishing documentation in gh-pages branch) +// The profile where the project is posted +let gitOwner = "YaccConstructor" +let gitHome = sprintf "%s/%s" "https://github.com" gitOwner + +// The name of the project on GitHub +let gitName = "YC.QuickGraph.Query" + +// The url for the raw files hosted +let gitRaw = environVarOrDefault "gitRaw" "https://raw.githubusercontent.com/YaccConstructor" + +// -------------------------------------------------------------------------------------- +// END TODO: The rest of the file includes standard build steps +// -------------------------------------------------------------------------------------- + +// Read additional information from the release notes document +let release = LoadReleaseNotes "RELEASE_NOTES.md" + +// Helper active pattern for project types +let (|Fsproj|Csproj|Vbproj|Shproj|) (projFileName:string) = + match projFileName with + | f when f.EndsWith("fsproj") -> Fsproj + | f when f.EndsWith("csproj") -> Csproj + | f when f.EndsWith("vbproj") -> Vbproj + | f when f.EndsWith("shproj") -> Shproj + | _ -> failwith (sprintf "Project file %s not supported. Unknown project type." projFileName) + +// Generate assembly info files with the right version & up-to-date information +Target "AssemblyInfo" (fun _ -> + let getAssemblyInfoAttributes projectName = + [ Attribute.Title (projectName) + Attribute.Product project + Attribute.Description summary + Attribute.Version release.AssemblyVersion + Attribute.FileVersion release.AssemblyVersion ] + + let getProjectDetails projectPath = + let projectName = System.IO.Path.GetFileNameWithoutExtension(projectPath) + ( projectPath, + projectName, + System.IO.Path.GetDirectoryName(projectPath), + (getAssemblyInfoAttributes projectName) + ) + + !! "src/**/*.??proj" + |> Seq.map getProjectDetails + |> Seq.iter (fun (projFileName, projectName, folderName, attributes) -> + match projFileName with + | Fsproj -> CreateFSharpAssemblyInfo (folderName "AssemblyInfo.fs") attributes + | Csproj -> CreateCSharpAssemblyInfo ((folderName "Properties") "AssemblyInfo.cs") attributes + | Vbproj -> CreateVisualBasicAssemblyInfo ((folderName "My Project") "AssemblyInfo.vb") attributes + | Shproj -> () + ) +) + +// Copies binaries from default VS location to expected bin folder +// But keeps a subdirectory structure for each project in the +// src folder to support multiple project outputs +Target "CopyBinaries" (fun _ -> + !! "src/**/*.??proj" + -- "src/**/*.shproj" + |> Seq.map (fun f -> ((System.IO.Path.GetDirectoryName f) "bin/Release", "bin" (System.IO.Path.GetFileNameWithoutExtension f))) + |> Seq.iter (fun (fromDir, toDir) -> CopyDir toDir fromDir (fun _ -> true)) +) + +// -------------------------------------------------------------------------------------- +// Clean build results + +Target "Clean" (fun _ -> + CleanDirs ["bin"; "temp"] +) + +Target "CleanDocs" (fun _ -> + CleanDirs ["docs/output"] +) + +// -------------------------------------------------------------------------------------- +// Build library & test project + +Target "Build" (fun _ -> + !! solutionFile +#if MONO + |> MSBuildReleaseExt "" [ ("DefineConstants","MONO") ] "Rebuild" +#else + |> MSBuildRelease "" "Rebuild" +#endif + |> ignore +) + +// -------------------------------------------------------------------------------------- +// Run the unit tests using test runner + +Target "RunTests" (fun _ -> + !! testAssemblies + |> NUnit (fun p -> + { p with + DisableShadowCopy = true + TimeOut = TimeSpan.FromMinutes 20. + OutputFile = "TestResults.xml" }) +) + +#if MONO +#else +// -------------------------------------------------------------------------------------- +// SourceLink allows Source Indexing on the PDB generated by the compiler, this allows +// the ability to step through the source code of external libraries http://ctaggart.github.io/SourceLink/ + +Target "SourceLink" (fun _ -> + let baseUrl = sprintf "%s/%s/{0}/%%var2%%" gitRaw project + !! "src/**/*.??proj" + -- "src/**/*.shproj" + |> Seq.iter (fun projFile -> + let proj = VsProj.LoadRelease projFile + SourceLink.Index proj.CompilesNotLinked proj.OutputFilePdb __SOURCE_DIRECTORY__ baseUrl + ) +) + +#endif + +// -------------------------------------------------------------------------------------- +// Build a NuGet package + +Target "NuGet" (fun _ -> + Paket.Pack(fun p -> + { p with + OutputPath = "bin" + Version = release.NugetVersion + ReleaseNotes = toLines release.Notes}) +) + +Target "PublishNuget" (fun _ -> + Paket.Push(fun p -> + { p with + WorkingDir = "bin" }) +) + + +// -------------------------------------------------------------------------------------- +// Generate the documentation + + +let fakePath = "packages" "build" "FAKE" "tools" "FAKE.exe" +let fakeStartInfo script workingDirectory args fsiargs environmentVars = + (fun (info: System.Diagnostics.ProcessStartInfo) -> + info.FileName <- System.IO.Path.GetFullPath fakePath + info.Arguments <- sprintf "%s --fsiargs -d:FAKE %s \"%s\"" args fsiargs script + info.WorkingDirectory <- workingDirectory + let setVar k v = + info.EnvironmentVariables.[k] <- v + for (k, v) in environmentVars do + setVar k v + setVar "MSBuild" msBuildExe + setVar "GIT" Git.CommandHelper.gitPath + setVar "FSI" fsiPath) + +/// Run the given buildscript with FAKE.exe +let executeFAKEWithOutput workingDirectory script fsiargs envArgs = + let exitCode = + ExecProcessWithLambdas + (fakeStartInfo script workingDirectory "" fsiargs envArgs) + TimeSpan.MaxValue false ignore ignore + System.Threading.Thread.Sleep 1000 + exitCode + +// Documentation +let buildDocumentationTarget fsiargs target = + trace (sprintf "Building documentation (%s), this could take some time, please wait..." target) + let exit = executeFAKEWithOutput "docs/tools" "generate.fsx" fsiargs ["target", target] + if exit <> 0 then + failwith "generating reference documentation failed" + () + +Target "GenerateReferenceDocs" (fun _ -> + buildDocumentationTarget "-d:RELEASE -d:REFERENCE" "Default" +) + +let generateHelp' fail debug = + let args = + if debug then "--define:HELP" + else "--define:RELEASE --define:HELP" + try + buildDocumentationTarget args "Default" + traceImportant "Help generated" + with + | e when not fail -> + traceImportant "generating help documentation failed" + +let generateHelp fail = + generateHelp' fail false + +Target "GenerateHelp" (fun _ -> + DeleteFile "docs/content/release-notes.md" + CopyFile "docs/content/" "RELEASE_NOTES.md" + Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" + + DeleteFile "docs/content/license.md" + CopyFile "docs/content/" "LICENSE.txt" + Rename "docs/content/license.md" "docs/content/LICENSE.txt" + + generateHelp true +) + +Target "GenerateHelpDebug" (fun _ -> + DeleteFile "docs/content/release-notes.md" + CopyFile "docs/content/" "RELEASE_NOTES.md" + Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md" + + DeleteFile "docs/content/license.md" + CopyFile "docs/content/" "LICENSE.txt" + Rename "docs/content/license.md" "docs/content/LICENSE.txt" + + generateHelp' true true +) + +Target "KeepRunning" (fun _ -> + use watcher = !! "docs/content/**/*.*" |> WatchChanges (fun changes -> + generateHelp' true true + ) + + traceImportant "Waiting for help edits. Press any key to stop." + + System.Console.ReadKey() |> ignore + + watcher.Dispose() +) + +Target "GenerateDocs" DoNothing + +let createIndexFsx lang = + let content = """(*** hide ***) +// This block of code is omitted in the generated HTML documentation. Use +// it to define helpers that you do not want to show in the documentation. +#I "../../../bin" + +(** +F# Project Scaffold ({0}) +========================= +*) +""" + let targetDir = "docs/content" lang + let targetFile = targetDir "index.fsx" + ensureDirectory targetDir + System.IO.File.WriteAllText(targetFile, System.String.Format(content, lang)) + +Target "AddLangDocs" (fun _ -> + let args = System.Environment.GetCommandLineArgs() + if args.Length < 4 then + failwith "Language not specified." + + args.[3..] + |> Seq.iter (fun lang -> + if lang.Length <> 2 && lang.Length <> 3 then + failwithf "Language must be 2 or 3 characters (ex. 'de', 'fr', 'ja', 'gsw', etc.): %s" lang + + let templateFileName = "template.cshtml" + let templateDir = "docs/tools/templates" + let langTemplateDir = templateDir lang + let langTemplateFileName = langTemplateDir templateFileName + + if System.IO.File.Exists(langTemplateFileName) then + failwithf "Documents for specified language '%s' have already been added." lang + + ensureDirectory langTemplateDir + Copy langTemplateDir [ templateDir templateFileName ] + + createIndexFsx lang) +) + +// -------------------------------------------------------------------------------------- +// Release Scripts + +Target "ReleaseDocs" (fun _ -> + let tempDocsDir = "temp/gh-pages" + CleanDir tempDocsDir + Repository.cloneSingleBranch "" (gitHome + "/" + gitName + ".git") "gh-pages" tempDocsDir + + CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A" + StageAll tempDocsDir + Git.Commit.Commit tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion) + Branches.push tempDocsDir +) + +#load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx" +open Octokit + +Target "Release" (fun _ -> + let user = + match getBuildParam "github-user" with + | s when not (String.IsNullOrWhiteSpace s) -> s + | _ -> getUserInput "Username: " + let pw = + match getBuildParam "github-pw" with + | s when not (String.IsNullOrWhiteSpace s) -> s + | _ -> getUserPassword "Password: " + let remote = + Git.CommandHelper.getGitResult "" "remote -v" + |> Seq.filter (fun (s: string) -> s.EndsWith("(push)")) + |> Seq.tryFind (fun (s: string) -> s.Contains(gitOwner + "/" + gitName)) + |> function None -> gitHome + "/" + gitName | Some (s: string) -> s.Split().[0] + + StageAll "" + Git.Commit.Commit "" (sprintf "Bump version to %s" release.NugetVersion) + Branches.pushBranch "" remote (Information.getBranchName "") + + Branches.tag "" release.NugetVersion + Branches.pushTag "" remote release.NugetVersion + + // release on github + createClient user pw + |> createDraft gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes + // TODO: |> uploadFile "PATH_TO_FILE" + |> releaseDraft + |> Async.RunSynchronously +) + +Target "BuildPackage" DoNothing + +// -------------------------------------------------------------------------------------- +// Run all targets by default. Invoke 'build ' to override + +Target "All" DoNothing + +"Clean" + ==> "AssemblyInfo" + ==> "Build" + ==> "CopyBinaries" + ==> "RunTests" + ==> "GenerateReferenceDocs" + ==> "GenerateDocs" +#if MONO +#else + =?> ("SourceLink", Pdbstr.tryFind().IsSome ) +#endif + ==> "NuGet" + ==> "BuildPackage" + ==> "All" + =?> ("ReleaseDocs",isLocalBuild) + +"CleanDocs" + ==> "GenerateHelp" + ==> "GenerateReferenceDocs" + ==> "GenerateDocs" + +"CleanDocs" + ==> "GenerateHelpDebug" + +"GenerateHelpDebug" + ==> "KeepRunning" + +"BuildPackage" + ==> "PublishNuget" + ==> "Release" + +"ReleaseDocs" + ==> "Release" + +RunTargetOrDefault "All" diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..c5de482 --- /dev/null +++ b/build.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash + +set -eu + +cd "$(dirname "$0")" + +PAKET_BOOTSTRAPPER_EXE=.paket/paket.bootstrapper.exe +PAKET_EXE=.paket/paket.exe +FAKE_EXE=packages/build/FAKE/tools/FAKE.exe + +FSIARGS="" +FSIARGS2="" +OS=${OS:-"unknown"} +if [ "$OS" != "Windows_NT" ] +then + # Can't use FSIARGS="--fsiargs -d:MONO" in zsh, so split it up + # (Can't use arrays since dash can't handle them) + FSIARGS="--fsiargs" + FSIARGS2="-d:MONO" +fi + +run() { + if [ "$OS" != "Windows_NT" ] + then + mono "$@" + else + "$@" + fi +} + +yesno() { + # NOTE: Defaults to NO + read -p "$1 [y/N] " ynresult + case "$ynresult" in + [yY]*) true ;; + *) false ;; + esac +} + +set +e +run $PAKET_BOOTSTRAPPER_EXE +bootstrapper_exitcode=$? +set -e + +if [ "$OS" != "Windows_NT" ] && + [ $bootstrapper_exitcode -ne 0 ] && + [ $(certmgr -list -c Trust | grep X.509 | wc -l) -le 1 ] && + [ $(certmgr -list -c -m Trust | grep X.509 | wc -l) -le 1 ] +then + echo "Your Mono installation has no trusted SSL root certificates set up." + echo "This may result in the Paket bootstrapper failing to download Paket" + echo "because Github's SSL certificate can't be verified. One way to fix" + echo "this issue would be to download the list of SSL root certificates" + echo "from the Mozilla project by running the following command:" + echo "" + echo " mozroots --import --sync" + echo "" + echo "This will import over 100 SSL root certificates into your Mono" + echo "certificate repository." + echo "" + if yesno "Run 'mozroots --import --sync' now?" + then + mozroots --import --sync + else + echo "Attempting to continue without running mozroots. This might fail." + fi + # Re-run bootstrapper whether or not the user ran mozroots, because maybe + # they fixed the problem in a separate terminal window. + run $PAKET_BOOTSTRAPPER_EXE +fi + +run $PAKET_EXE restore + +[ ! -e build.fsx ] && run $PAKET_EXE update +[ ! -e build.fsx ] && run $FAKE_EXE init.fsx +run $FAKE_EXE "$@" $FSIARGS $FSIARGS2 build.fsx + diff --git a/docs/content/index.fsx b/docs/content/index.fsx new file mode 100644 index 0000000..68c75ef --- /dev/null +++ b/docs/content/index.fsx @@ -0,0 +1,67 @@ +(*** hide ***) +// This block of code is omitted in the generated HTML documentation. Use +// it to define helpers that you do not want to show in the documentation. +#I "../../bin" + +(** +YC.QuickGraph.Query +====================== + +Documentation + +
+
+
+
+ The YC.QuickGraph.Query library can be installed from NuGet: +
PM> Install-Package YC.QuickGraph.Query
+
+
+
+
+ +Example +------- + +This example demonstrates using a function defined in this sample library. + +*) +#r "YC.QuickGraph.Query.dll" +open YC.QuickGraph.Query + +printfn "hello = %i" <| Library.hello 0 + +(** +Some more info + +Samples & documentation +----------------------- + +The library comes with comprehensible documentation. +It can include tutorials automatically generated from `*.fsx` files in [the content folder][content]. +The API reference is automatically generated from Markdown comments in the library implementation. + + * [Tutorial](tutorial.html) contains a further explanation of this sample library. + + * [API Reference](reference/index.html) contains automatically generated documentation for all types, modules + and functions in the library. This includes additional brief samples on using most of the + functions. + +Contributing and copyright +-------------------------- + +The project is hosted on [GitHub][gh] where you can [report issues][issues], fork +the project and submit pull requests. If you're adding a new public API, please also +consider adding [samples][content] that can be turned into a documentation. You might +also want to read the [library design notes][readme] to understand how it works. + +The library is available under Public Domain license, which allows modification and +redistribution for both commercial and non-commercial purposes. For more information see the +[License file][license] in the GitHub repository. + + [content]: https://github.com/fsprojects/YC.QuickGraph.Query/tree/master/docs/content + [gh]: https://github.com/fsprojects/YC.QuickGraph.Query + [issues]: https://github.com/fsprojects/YC.QuickGraph.Query/issues + [readme]: https://github.com/fsprojects/YC.QuickGraph.Query/blob/master/README.md + [license]: https://github.com/fsprojects/YC.QuickGraph.Query/blob/master/LICENSE.txt +*) diff --git a/docs/content/tutorial.fsx b/docs/content/tutorial.fsx new file mode 100644 index 0000000..62fb0ad --- /dev/null +++ b/docs/content/tutorial.fsx @@ -0,0 +1,19 @@ +(*** hide ***) +// This block of code is omitted in the generated HTML documentation. Use +// it to define helpers that you do not want to show in the documentation. +#I "../../bin" + +(** +Introducing your project +======================== + +Say more + +*) +#r "YC.QuickGraph.Query.dll" +open YC.QuickGraph.Query + +Library.hello 0 +(** +Some more info +*) diff --git a/docs/files/img/logo-template.pdn b/docs/files/img/logo-template.pdn new file mode 100644 index 0000000..52606f5 Binary files /dev/null and b/docs/files/img/logo-template.pdn differ diff --git a/docs/files/img/logo.png b/docs/files/img/logo.png new file mode 100644 index 0000000..8a2b81b Binary files /dev/null and b/docs/files/img/logo.png differ diff --git a/docs/tools/generate.fsx b/docs/tools/generate.fsx new file mode 100644 index 0000000..18dc8f2 --- /dev/null +++ b/docs/tools/generate.fsx @@ -0,0 +1,145 @@ +// -------------------------------------------------------------------------------------- +// Builds the documentation from `.fsx` and `.md` files in the 'docs/content' directory +// (the generated documentation is stored in the 'docs/output' directory) +// -------------------------------------------------------------------------------------- + +// Binaries that have XML documentation (in a corresponding generated XML file) +// Any binary output / copied to bin/projectName/projectName.dll will +// automatically be added as a binary to generate API docs for. +// for binaries output to root bin folder please add the filename only to the +// referenceBinaries list below in order to generate documentation for the binaries. +// (This is the original behaviour of ProjectScaffold prior to multi project support) +let referenceBinaries = [] +// Web site location for the generated documentation +let website = "/YC.QuickGraph.Query" + +let githubLink = "https://github.com/YaccConstructor/YC.QuickGraph.Query" + +// Specify more information about your project +let info = + [ "project-name", "YC.QuickGraph.Query" + "project-author", "YaccConstructor" + "project-summary", "Path query engine for QuickGraph" + "project-github", githubLink + "project-nuget", "http://nuget.org/packages/YC.QuickGraph.Query" ] + +// -------------------------------------------------------------------------------------- +// For typical project, no changes are needed below +// -------------------------------------------------------------------------------------- + +#load "../../packages/build/FSharp.Formatting/FSharp.Formatting.fsx" +#I "../../packages/build/FAKE/tools/" +#r "FakeLib.dll" +open Fake +open System.IO +open Fake.FileHelper +open FSharp.Literate +open FSharp.MetadataFormat + +// When called from 'build.fsx', use the public project URL as +// otherwise, use the current 'output' directory. +#if RELEASE +let root = website +#else +let root = "file://" + (__SOURCE_DIRECTORY__ @@ "../output") +#endif + +// Paths with template/source/output locations +let bin = __SOURCE_DIRECTORY__ @@ "../../bin" +let content = __SOURCE_DIRECTORY__ @@ "../content" +let output = __SOURCE_DIRECTORY__ @@ "../output" +let files = __SOURCE_DIRECTORY__ @@ "../files" +let templates = __SOURCE_DIRECTORY__ @@ "templates" +let formatting = __SOURCE_DIRECTORY__ @@ "../../packages/build/FSharp.Formatting/" +let docTemplate = "docpage.cshtml" + +// Where to look for *.csproj templates (in this order) +let layoutRootsAll = new System.Collections.Generic.Dictionary() +layoutRootsAll.Add("en",[ templates; formatting @@ "templates" + formatting @@ "templates/reference" ]) +subDirectories (directoryInfo templates) +|> Seq.iter (fun d -> + let name = d.Name + if name.Length = 2 || name.Length = 3 then + layoutRootsAll.Add( + name, [templates @@ name + formatting @@ "templates" + formatting @@ "templates/reference" ])) + +// Copy static files and CSS + JS from F# Formatting +let copyFiles () = + CopyRecursive files output true |> Log "Copying file: " + ensureDirectory (output @@ "content") + CopyRecursive (formatting @@ "styles") (output @@ "content") true + |> Log "Copying styles and scripts: " + +let binaries = + let manuallyAdded = + referenceBinaries + |> List.map (fun b -> bin @@ b) + + let conventionBased = + directoryInfo bin + |> subDirectories + |> Array.map (fun d -> d.FullName @@ (sprintf "%s.dll" d.Name)) + |> List.ofArray + + conventionBased @ manuallyAdded + +let libDirs = + let conventionBasedbinDirs = + directoryInfo bin + |> subDirectories + |> Array.map (fun d -> d.FullName) + |> List.ofArray + + conventionBasedbinDirs @ [bin] + +// Build API reference from XML comments +let buildReference () = + CleanDir (output @@ "reference") + MetadataFormat.Generate + ( binaries, output @@ "reference", layoutRootsAll.["en"], + parameters = ("root", root)::info, + sourceRepo = githubLink @@ "tree/master", + sourceFolder = __SOURCE_DIRECTORY__ @@ ".." @@ "..", + publicOnly = true,libDirs = libDirs ) + +// Build documentation from `fsx` and `md` files in `docs/content` +let buildDocumentation () = + + // First, process files which are placed in the content root directory. + + Literate.ProcessDirectory + ( content, docTemplate, output, replacements = ("root", root)::info, + layoutRoots = layoutRootsAll.["en"], + generateAnchors = true, + processRecursive = false) + + // And then process files which are placed in the sub directories + // (some sub directories might be for specific language). + + let subdirs = Directory.EnumerateDirectories(content, "*", SearchOption.TopDirectoryOnly) + for dir in subdirs do + let dirname = (new DirectoryInfo(dir)).Name + let layoutRoots = + // Check whether this directory name is for specific language + let key = layoutRootsAll.Keys + |> Seq.tryFind (fun i -> i = dirname) + match key with + | Some lang -> layoutRootsAll.[lang] + | None -> layoutRootsAll.["en"] // "en" is the default language + + Literate.ProcessDirectory + ( dir, docTemplate, output @@ dirname, replacements = ("root", root)::info, + layoutRoots = layoutRoots, + generateAnchors = true ) + +// Generate +copyFiles() +#if HELP +buildDocumentation() +#endif +#if REFERENCE +buildReference() +#endif diff --git a/docs/tools/templates/template.cshtml b/docs/tools/templates/template.cshtml new file mode 100644 index 0000000..1ae4a1b --- /dev/null +++ b/docs/tools/templates/template.cshtml @@ -0,0 +1,58 @@ + + + + + @Title + + + + + + + + + + + + + + + +
+ +
+
+
+ @RenderBody() +
+
+ F# Project + +
+
+
+ Fork me on GitHub + + diff --git a/lib/README.md b/lib/README.md new file mode 100644 index 0000000..11cdd7a --- /dev/null +++ b/lib/README.md @@ -0,0 +1,11 @@ +This file is in the `lib` directory. + +Any **libraries** on which your project depends and which are **NOT managed via NuGet** should be kept **in this directory**. +This typically includes custom builds of third-party software, private (i.e. to a company) codebases, and native libraries. + +--- +NOTE: + +This file is a placeholder, used to preserve directory structure in Git. + +This file does not need to be edited. diff --git a/paket.dependencies b/paket.dependencies new file mode 100644 index 0000000..c0c79d7 --- /dev/null +++ b/paket.dependencies @@ -0,0 +1,18 @@ +source https://nuget.org/api/v2 + +nuget FSharp.Core redirects: force + +group Build + source https://nuget.org/api/v2 + + nuget SourceLink.Fake + nuget FAKE + nuget FSharp.Formatting + + github fsharp/FAKE modules/Octokit/Octokit.fsx + +group Test + source https://nuget.org/api/v2 + + nuget NUnit ~> 2 + nuget NUnit.Runners ~> 2 \ No newline at end of file diff --git a/paket.lock b/paket.lock new file mode 100644 index 0000000..f14b179 --- /dev/null +++ b/paket.lock @@ -0,0 +1,32 @@ +NUGET + remote: https://www.nuget.org/api/v2 + FSharp.Core (4.0.0.1) - redirects: force + +GROUP Build +NUGET + remote: https://www.nuget.org/api/v2 + FAKE (4.40) + FSharp.Compiler.Service (2.0.0.6) + FSharp.Formatting (2.14.4) + FSharp.Compiler.Service (2.0.0.6) + FSharpVSPowerTools.Core (>= 2.3 < 2.4) + FSharpVSPowerTools.Core (2.3) + FSharp.Compiler.Service (>= 2.0.0.3) + Microsoft.Bcl (1.1.10) - framework: net10, net11, net20, net30, net35, net40, net40-full + Microsoft.Bcl.Build (>= 1.0.14) + Microsoft.Bcl.Build (1.0.21) - import_targets: false, framework: net10, net11, net20, net30, net35, net40, net40-full + Microsoft.Net.Http (2.2.29) - framework: net10, net11, net20, net30, net35, net40, net40-full + Microsoft.Bcl (>= 1.1.10) + Microsoft.Bcl.Build (>= 1.0.14) + Octokit (0.22) + Microsoft.Net.Http - framework: net10, net11, net20, net30, net35, net40, net40-full + SourceLink.Fake (1.1) +GITHUB + remote: fsharp/FAKE + modules/Octokit/Octokit.fsx (dab7b5aea40c0855cf35fc7d6e67fa4f411fb24b) + Octokit (>= 0.20) +GROUP Test +NUGET + remote: https://www.nuget.org/api/v2 + NUnit (2.6.4) + NUnit.Runners (2.6.4) diff --git a/src/YC.QuickGraph.Query/App.config b/src/YC.QuickGraph.Query/App.config new file mode 100644 index 0000000..f1710c3 --- /dev/null +++ b/src/YC.QuickGraph.Query/App.config @@ -0,0 +1,10 @@ + + + + + + True + + + + diff --git a/src/YC.QuickGraph.Query/AssemblyInfo.fs b/src/YC.QuickGraph.Query/AssemblyInfo.fs new file mode 100644 index 0000000..e9d536e --- /dev/null +++ b/src/YC.QuickGraph.Query/AssemblyInfo.fs @@ -0,0 +1,14 @@ +// Auto-Generated by FAKE; do not edit +namespace System +open System.Reflection + +[] +[] +[] +[] +[] +do () + +module internal AssemblyVersionInformation = + let [] Version = "1.0" + let [] InformationalVersion = "1.0" diff --git a/src/YC.QuickGraph.Query/Library.fs b/src/YC.QuickGraph.Query/Library.fs new file mode 100644 index 0000000..ed8c809 --- /dev/null +++ b/src/YC.QuickGraph.Query/Library.fs @@ -0,0 +1,16 @@ +namespace YC.QuickGraph.Query + +/// Documentation for my library +/// +/// ## Example +/// +/// let h = Library.hello 1 +/// printfn "%d" h +/// +module Library = + + /// Returns 42 + /// + /// ## Parameters + /// - `num` - whatever + let hello num = 42 diff --git a/src/YC.QuickGraph.Query/Script.fsx b/src/YC.QuickGraph.Query/Script.fsx new file mode 100644 index 0000000..5b3dce1 --- /dev/null +++ b/src/YC.QuickGraph.Query/Script.fsx @@ -0,0 +1,8 @@ +// Learn more about F# at http://fsharp.org. See the 'F# Tutorial' project +// for more guidance on F# programming. + +#load "Library.fs" +open YC.QuickGraph.Query + +let num = Library.hello 42 +printfn "%i" num diff --git a/src/YC.QuickGraph.Query/YC.QuickGraph.Query.fsproj b/src/YC.QuickGraph.Query/YC.QuickGraph.Query.fsproj new file mode 100644 index 0000000..65ca451 --- /dev/null +++ b/src/YC.QuickGraph.Query/YC.QuickGraph.Query.fsproj @@ -0,0 +1,140 @@ + + + + + Debug + AnyCPU + 2.0 + 3528ca82-4f2c-4624-942d-69b6e5652442 + Library + YC.QuickGraph.Query + YC.QuickGraph.Query + v4.0 + 4.3.0.0 + YC.QuickGraph.Query + + + + true + full + false + false + .\bin\Debug + DEBUG;TRACE + 3 + .\bin\$(Configuration)\$(AssemblyName).xml + --warnon:1182 + + + pdbonly + true + true + .\bin\Release + TRACE + 3 + .\bin\$(Configuration)\$(AssemblyName).xml + --warnon:1182 + + + 11 + + + + + $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets + + + + + + + + + + + + + + + + + + + + + + + + ..\..\packages\FSharp.Core\lib\net20\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\portable-net45+netcore45\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\portable-net45+netcore45+wp8\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\portable-net45+sl5+netcore45\FSharp.Core.dll + True + True + + + + + diff --git a/src/YC.QuickGraph.Query/paket.references b/src/YC.QuickGraph.Query/paket.references new file mode 100644 index 0000000..640cf91 --- /dev/null +++ b/src/YC.QuickGraph.Query/paket.references @@ -0,0 +1 @@ +FSharp.Core \ No newline at end of file diff --git a/src/YC.QuickGraph.Query/paket.template b/src/YC.QuickGraph.Query/paket.template new file mode 100644 index 0000000..bb01a3d --- /dev/null +++ b/src/YC.QuickGraph.Query/paket.template @@ -0,0 +1,25 @@ +type project +title + YC.QuickGraph.Query +owners + YaccConstructor +authors + YaccConstructor +projectUrl + https://github.com/YaccConstructor/YC.QuickGraph.Query +iconUrl + https://raw.githubusercontent.com/YaccConstructor/YC.QuickGraph.Query/master/docs/files/img/logo.png +licenseUrl + https://github.com/YaccConstructor/YC.QuickGraph.Query/blob/master/LICENSE.txt +requireLicenseAcceptance + false +copyright + Copyright 2015 +tags + graph path quering context-free subgraph grammar QuickGraph .NET YC +summary + Path query engine for QuickGraph +description + Path query engine for QuickGraph library. This library contains the set of extensions which allow you to use context-free constraints for path quering. + + diff --git a/tests/YC.QuickGraph.Query.Tests/App.config b/tests/YC.QuickGraph.Query.Tests/App.config new file mode 100644 index 0000000..f1710c3 --- /dev/null +++ b/tests/YC.QuickGraph.Query.Tests/App.config @@ -0,0 +1,10 @@ + + + + + + True + + + + diff --git a/tests/YC.QuickGraph.Query.Tests/Tests.fs b/tests/YC.QuickGraph.Query.Tests/Tests.fs new file mode 100644 index 0000000..76f1ef9 --- /dev/null +++ b/tests/YC.QuickGraph.Query.Tests/Tests.fs @@ -0,0 +1,10 @@ +module YC.QuickGraph.Query.Tests + +open YC.QuickGraph.Query +open NUnit.Framework + +[] +let ``hello returns 42`` () = + let result = Library.hello 42 + printfn "%i" result + Assert.AreEqual(42,result) diff --git a/tests/YC.QuickGraph.Query.Tests/YC.QuickGraph.Query.Tests.fsproj b/tests/YC.QuickGraph.Query.Tests/YC.QuickGraph.Query.Tests.fsproj new file mode 100644 index 0000000..3a8780e --- /dev/null +++ b/tests/YC.QuickGraph.Query.Tests/YC.QuickGraph.Query.Tests.fsproj @@ -0,0 +1,153 @@ + + + + + Debug + AnyCPU + 2.0 + 8cca72d8-30ee-4d7c-bc31-d6af789547c0 + Library + YC.QuickGraph.Query.Tests + YC.QuickGraph.Query.Tests + v4.0 + 4.3.0.0 + YC.QuickGraph.Query.Tests + + ..\..\ + + + true + full + false + false + bin\Debug\ + DEBUG;TRACE + 3 + Project + + + + + + + pdbonly + true + true + bin\Release\ + TRACE + 3 + + + 11 + + + + + $(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets + + + + + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\FSharp\Microsoft.FSharp.Targets + + + + + + + + + + + + + + + + + + + YC.QuickGraph.Query + {3528ca82-4f2c-4624-942d-69b6e5652442} + True + + + + + + + ..\..\packages\FSharp.Core\lib\net20\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\net40\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\portable-net45+monoandroid10+monotouch10+xamarinios10\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\portable-net45+netcore45\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\portable-net45+netcore45+wp8\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\portable-net45+netcore45+wpa81+wp8\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\FSharp.Core\lib\portable-net45+sl5+netcore45\FSharp.Core.dll + True + True + + + + + + + ..\..\packages\test\NUnit\lib\nunit.framework.dll + True + True + + + diff --git a/tests/YC.QuickGraph.Query.Tests/paket.references b/tests/YC.QuickGraph.Query.Tests/paket.references new file mode 100644 index 0000000..cdeac42 --- /dev/null +++ b/tests/YC.QuickGraph.Query.Tests/paket.references @@ -0,0 +1,4 @@ +FSharp.Core +group Test +NUnit +NUnit.Runners \ No newline at end of file