CSVW-validator-lib 1.0.3

dotnet add package CSVW-validator-lib --version 1.0.3
NuGet\Install-Package CSVW-validator-lib -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CSVW-validator-lib" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CSVW-validator-lib --version 1.0.3
#r "nuget: CSVW-validator-lib, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install CSVW-validator-lib as a Cake Addin
#addin nuget:?package=CSVW-validator-lib&version=1.0.3

// Install CSVW-validator-lib as a Cake Tool
#tool nuget:?package=CSVW-validator-lib&version=1.0.3

Validate IT

Welcome to Validate IT - your solution for validating CSV tabular data and metadata, adhering to CSV on the Web recommendations.

Features:

  • validate local CSV files
  • validate local metadata files
  • validate remote CSV files
  • validate remote metadata files
  • save the validation results as CSV!
  • save the validation results as RDF!
  • much more to come!

Documentation (Beta)

You can check all types of documentation (user, developer, administrator) here.

You can also check the main repository of this project.

Main repository

You can find the main repository of the code base here.

Examples from documentation

// Create controller
IController controller = ControllerFactory.CreateController();

string remoteMetadataURL = "https://w3c.github.io/csvw/tests/test011/tree-ops.csv-metadata.json";
string remoteTabularURL = "https://w3c.github.io/csvw/tests/test011/tree-ops.csv";
string localMetadaPath = @"/data/my.csv";
string localTabularPath = @"/data/schema.json";

// starts remote tabular validation
IResult result1 = controller.ProcessTabularData(remoteTabularURL);

// start local tabular validation
IResult result2 = controller.ProcessTabularData(localTabularPath);

// start remote metadata validation
IResult result3 = controller.ProcessMetadata(remoteMetadataURL);

// start local metadata validation
IResult result4 = controller.ProcessMetadata(localMetadaPath);

// review validation result
switch (result1.GetValidationResultType)
{
    case ValidationResultType.VALID:
        Console.WriteLine("Validated files were valid!");
        break;
    case ValidationResultType.WARNING:
        Console.WriteLine("Warnings occurred during the validation!");
        break;
    case ValidationResultType.ERROR:
        Console.WriteLine("Errors occurred during the validaiton!");
        break;
}

// iterate through general errors
foreach (var error in result1.GetValidationDetails.GeneralErrors)
{
    Console.WriteLine(error.GetMessage(CultureInfo.CurrentCulture));
}

// foreach errors related to specific table
foreach(var tableDetails in result1.GetValidationDetails.TableValidationDetails)
{
    foreach(var error in tableDetails.Errors)
    {
        Console.WriteLine(error.GetMessage(CultureInfo.CurrentCulture));
    }
}

// write the results to a file
string resultPath = @"/data/result.csv";
IResultWriter csvResultWriter = ResultWriterFactory.CreateResultWriter(ResultFileFormat.CSV);
csvResultWriter.GenerateResult(resultPath, result1.GetValidationDetails);

Student project

This is student bachelor thesis project and we do not MAKE ANY PROFIT as it is fully open-source project.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 39 4/27/2024
1.0.2 94 3/30/2024
1.0.1 97 3/29/2024
1.0.0 106 3/28/2024