Skip to content

Commit 90464cf

Browse files
committed
port project from core
1 parent 0cdecce commit 90464cf

File tree

15 files changed

+340
-67
lines changed

15 files changed

+340
-67
lines changed

BioFSharp.XYZ.sln renamed to BioFSharp.Interactive.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ VisualStudioVersion = 17.0.31903.59
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7501C4DF-A844-40A0-8742-3343E48E55F1}"
77
EndProject
8-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "BioFSharp.XYZ", "src\BioFSharp.XYZ\BioFSharp.XYZ.fsproj", "{BAC97B5C-B9A6-40D6-B533-0A07E12939ED}"
8+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "BioFSharp.Interactive", "src\BioFSharp.Interactive\BioFSharp.Interactive.fsproj", "{BAC97B5C-B9A6-40D6-B533-0A07E12939ED}"
99
EndProject
1010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{D152DA0B-8F60-4611-B613-642379E2B17C}"
1111
EndProject
12-
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "BioFSharp.XYZ.Tests", "tests\BioFSharp.XYZ.Tests\BioFSharp.XYZ.Tests.fsproj", "{CB9E38BC-EE86-44EB-AFF5-91D1AF713ADC}"
12+
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "BioFSharp.Interactive.Tests", "tests\BioFSharp.Interactive.Tests\BioFSharp.Interactive.Tests.fsproj", "{CB9E38BC-EE86-44EB-AFF5-91D1AF713ADC}"
1313
EndProject
1414
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{77A50576-9359-44E5-B2F9-95318AB3DAEA}"
1515
ProjectSection(SolutionItems) = preProject

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# BioFSharp.XYZ
1+
# BioFSharp.Interactive
22

33
![Logo](docs/img/Logo_large.png)
44

55
A template repository for creating an extension package for BioFSharp.
66

77
## Content
88

9-
- `src/BioFSharp.XYZ`: The main project folder. Contains a library with BioFSharp core dependency.
10-
- `tests/BioFSharp.XYZ.Tests`: The test project folder. Contains a XUnit test project
9+
- `src/BioFSharp.Interactive`: The main project folder. Contains a library with BioFSharp core dependency.
10+
- `tests/BioFSharp.Interactive.Tests`: The test project folder. Contains a XUnit test project
1111
- `build/build.fsproj`: A FAKE build project that handles building, testing, packaging, publishing, etc.
1212
- `docs`: the docs folder contains an example index.fsx file with simple documentation boilerplate.
1313

@@ -20,16 +20,16 @@ Here is a list of things you should/might want to do after setting up a repo wit
2020
2121
- Rename some things: Replace `XYZ` with the name of your package
2222
- `PackageTemplate.sln`
23-
- `src/BioFSharp.XYZ`
24-
- `src/BioFSharp.XYZ/BioFSharp.XYZ.fsproj`
23+
- `src/BioFSharp.Interactive`
24+
- `src/BioFSharp.Interactive/BioFSharp.Interactive.fsproj`
2525
- Rename and add nuget package metadata
26-
- `tests/BioFSharp.XYZ`
27-
- `tests/BioFSharp.XYZ.Tests/BioFSharp.XYZ.Tests.fsproj`
28-
- Also make sure to fix the project reference to BioFSharp.XYZ when renamed
26+
- `tests/BioFSharp.Interactive`
27+
- `tests/BioFSharp.Interactive.Tests/BioFSharp.Interactive.Tests.fsproj`
28+
- Also make sure to fix the project reference to BioFSharp.Interactive when renamed
2929
- in `build/ProjectInfo.fs`:
3030
- Set project name:
3131
```fsharp
32-
let project = "BioFSharp.XYZ" // replace with the name of your project
32+
let project = "BioFSharp.Interactive" // replace with the name of your project
3333
```
3434
- Set git owner:
3535
```fsharp
@@ -39,7 +39,7 @@ Here is a list of things you should/might want to do after setting up a repo wit
3939
```fsharp
4040
let testProjects =
4141
[
42-
"tests/BioFSharp.XYZ.Tests/BioFSharp.XYZ.Tests.fsproj" // replace with the name of your test project
42+
"tests/BioFSharp.Interactive.Tests/BioFSharp.Interactive.Tests.fsproj" // replace with the name of your test project
4343
]
4444
```
4545
- in `.github/workflows/build-and-test.yml`: change codecov slug

build/ProjectInfo.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
open Fake.Core
44

55

6-
let project = "BioFSharp.XYZ"
6+
let project = "BioFSharp.Interactive"
77

88
let testProjects =
99
[
10-
"tests/BioFSharp.XYZ.Tests/BioFSharp.XYZ.Tests.fsproj"
10+
"tests/BioFSharp.Interactive.Tests/BioFSharp.Interactive.Tests.fsproj"
1111
]
1212

1313
let solutionFile = $"{project}.sln"

docs/index.fsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(**
2-
# BioFSharp.XYZ
2+
# BioFSharp.Interactive
33
44
![Logo](./img/Logo_large.png)
55
@@ -20,10 +20,10 @@ Include the compiled binaries of your project to use in the docs like this.
2020
Make sure to load any external references via nuget.
2121
*)
2222
#r "nuget: BioFSharp, 2.0.0-preview.3"
23-
#I @"..\src\BioFSharp.XYZ\bin\Release\netstandard2.0"
24-
#r "BioFSharp.XYZ.dll"
23+
#I @"..\src\BioFSharp.Interactive\bin\Release\netstandard2.0"
24+
#r "BioFSharp.Interactive.dll"
2525

26-
open BioFSharp.XYZ
26+
open BioFSharp.Interactive
2727

2828
let o = BioTalk.helloBio "Kev"
2929

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6+
<IncludeSymbols>true</IncludeSymbols>
7+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
8+
</PropertyGroup>
9+
10+
<PropertyGroup>
11+
<Authors>Kevin Schneider, F# open source contributors</Authors>
12+
<Description>BioFSharp Formatting extensions for .NET Interactive.</Description>
13+
<Summary>
14+
BioFSharp Formatting extensions for .NET Interactive.
15+
</Summary>
16+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
17+
<PackageProjectUrl>https://BioFSharp.github.io/BioFSharp.Interactive/</PackageProjectUrl>
18+
<PackageIcon>icon.png</PackageIcon>
19+
<PackageTags>bioinformatics F# fsharp statistic biostatistics datascience</PackageTags>
20+
<RepositoryUrl>https://github.com/BioFSharp/BioFSharp.Interactive</RepositoryUrl>
21+
<RepositoryType>git</RepositoryType>
22+
<FsDocsLicenseLink>https://github.com/BioFSharp/BioFSharp.Interactive/blob/main/LICENSE</FsDocsLicenseLink>
23+
<FsDocsReleaseNotesLink>https://github.com/BioFSharp/BioFSharp.Interactive/blob/main/RELEASE_NOTES.md</FsDocsReleaseNotesLink>
24+
</PropertyGroup>
25+
26+
<ItemGroup>
27+
<Compile Remove="bin\**" />
28+
<EmbeddedResource Remove="bin\**" />
29+
<None Remove="bin\**" />
30+
</ItemGroup>
31+
32+
<ItemGroup>
33+
<Compile Include="Formatters.fs" />
34+
<Compile Include="Extension.fs" />
35+
</ItemGroup>
36+
37+
<ItemGroup>
38+
<None Include="..\..\docs\img\icon.png" Pack="true" PackagePath=""/>
39+
<PackageReference Include="BioFSharp" Version="2.0.0-preview.3" />
40+
<PackageReference Include="BioFSharp.IO" Version="2.0.0-preview.3" />
41+
<PackageReference Include="Microsoft.DotNet.Interactive" Version="1.0.0-beta.24208.1" />
42+
<PackageReference Include="Microsoft.DotNet.Interactive.Formatting" Version="1.0.0-beta.24208.1" />
43+
</ItemGroup>
44+
45+
<ItemGroup>
46+
<None Include="$(OutputPath)/BioFSharp.Interactive.dll" Pack="true" PackagePath="interactive-extensions/dotnet" />
47+
</ItemGroup>
48+
</Project>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace BioFSharp.Interactive
2+
3+
open System
4+
open System.Threading.Tasks
5+
open Microsoft.DotNet.Interactive
6+
open Microsoft.DotNet.Interactive.Formatting
7+
open BioFSharp
8+
open BioFSharp.IO
9+
10+
type FormatterKernelExtension() =
11+
12+
interface IKernelExtension with
13+
member _.OnLoadAsync _ =
14+
Formatters.registerAll()
15+
Task.CompletedTask
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
namespace BioFSharp.Interactive
2+
3+
module Formatters =
4+
5+
open System
6+
open Microsoft.DotNet.Interactive.Formatting
7+
open BioFSharp
8+
open BioFSharp.IO
9+
10+
let formatAminoAcid (item: AminoAcids.AminoAcid) (writer: IO.TextWriter) =
11+
let pretty = FSIPrinters.prettyPrintBioItem item
12+
writer.Write(pretty)
13+
14+
let formatBioCollection (bioCollection: seq<IBioItem>) (writer: IO.TextWriter) =
15+
let pretty = $"<pre>{FSIPrinters.prettyPrintBioCollection bioCollection}</pre>"
16+
writer.Write(pretty)
17+
18+
let registerAll() =
19+
Formatter.Register<AminoAcids.AminoAcid>(
20+
formatAminoAcid,
21+
"text/html"
22+
)
23+
Formatter.Register<seq<IBioItem>>(
24+
formatBioCollection,
25+
"text/html"
26+
)

src/BioFSharp.XYZ/Library.fs renamed to src/BioFSharp.Interactive/Library.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace BioFSharp.XYZ
1+
namespace BioFSharp.Interactive
22

33
open BioFSharp
44

src/BioFSharp.Interactive/Repack.ps1

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Clean up the previously-cached NuGet packages.
2+
# Lower-case is intentional (that's how nuget stores those packages).
3+
Remove-Item -Recurse ~\.nuget\packages\biofsharp.interactive* -Force
4+
Remove-Item -Recurse ~\.nuget\packages\biofsharp* -Force
5+
6+
# build and pack Plotly.NET.Interactive
7+
cd ../../
8+
dotnet restore
9+
dotnet build
10+
dotnet pack -c Release -p:PackageVersion=0.0.0-dev -o "./pkg"
11+
cd src/BioFSharp.Interactive

0 commit comments

Comments
 (0)