Skip to content

Commit 541fa44

Browse files
author
Paul Joiner
committed
Issue#22 and Issue#23 Fixed formatters to display default values
1 parent ba7ad76 commit 541fa44

File tree

5 files changed

+82
-15
lines changed

5 files changed

+82
-15
lines changed

notebooks/01_Introduction.ipynb

Lines changed: 71 additions & 5 deletions
Large diffs are not rendered by default.

src/DwC-A_dotnet.Interactive/DwC-A_dotnet.Interactive.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,22 @@
1111
<PackageTags>DwC-A darwin-core Biodiversity</PackageTags>
1212
<Authors>Paul Joiner</Authors>
1313
<Company>Paul Joiner</Company>
14-
<Version>0.1.20-Pre</Version>
14+
<Version>0.1.12-Pre</Version>
1515
<Description>.NET Interactive Extensions for Darwin Core Archive file reader</Description>
16-
<AssemblyVersion>0.1.20.0</AssemblyVersion>
17-
<FileVersion>0.1.20.0</FileVersion>
16+
<AssemblyVersion>0.1.12.0</AssemblyVersion>
17+
<FileVersion>0.1.12.0</FileVersion>
1818
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1919
<PackageReadmeFile>README.md</PackageReadmeFile>
2020
</PropertyGroup>
2121

2222
<ItemGroup>
23-
<PackageReference Include="DwC-A_dotnet" Version="0.6.1">
23+
<PackageReference Include="DwC-A_dotnet" Version="0.6.2">
2424
<Aliases>Core</Aliases>
2525
</PackageReference>
2626
<PackageReference Include="DwC-A_dotnet.Mapping" Version="0.6.3" />
27-
<PackageReference Include="System.CommandLine" Version="2.0.0-beta2.22071.1" />
27+
<PackageReference Include="System.CommandLine" Version="2.0.0-beta3.22114.1" />
2828
<PackageReference Include="microsoft.dotnet.interactive" Version="1.0.0-beta.22070.1" />
29+
<PackageReference Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-beta3.22114.1" />
2930
</ItemGroup>
3031

3132
<ItemGroup>

src/DwC-A_dotnet.Interactive/Formatters/FileReaderMetaData.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ public static void Register(IFileReader fileReader, TextWriter writer)
2727
foreach (var field in fileReader.FileMetaData.Fields)
2828
{
2929
var name = span(Terms.ShortName(field.Term));
30-
if(fileReader.FileMetaData.Id.IndexSpecified && fileReader.FileMetaData.Id.Index == field.Index)
30+
if(field.IndexSpecified && fileReader.FileMetaData.Id.Index == field.Index)
3131
{
3232
name = span(name, sup(b("*")));
3333
}
3434
var row = tr(new[]
3535
{
36-
td(field.Index),
36+
td(field.IndexSpecified ? field.Index.ToString() : ""),
3737
td(name),
3838
td(a[href:field.Term](field.Term)),
3939
td(field.Vocabulary),

src/DwC-A_dotnet.Interactive/Formatters/RowFormatter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public static void Register(IEnumerable<IRow> rows, TextWriter writer)
2727
foreach(var row in rows)
2828
{
2929
var cells = new List<dynamic>();
30-
foreach(var field in row.Fields)
30+
foreach(var metaData in fieldMetaData)
3131
{
32-
cells.Add(td(field));
32+
cells.Add(td(row[metaData.Term]));
3333
}
3434
rowList.Add(tr(cells));
3535
}

src/UnitTests/UnitTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net5.0</TargetFramework>
4+
<TargetFramework>net6.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

0 commit comments

Comments
 (0)