Year: 2018

Interpreter–part 7 of n–thank you

In our days you cannot build a project without help from other projects.  So it is your project – it is build on the shoulder of others( https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants )

Add a third party notice and thanks others that contributes with components to your project.

I have discovered https://github.com/KrystianKolad/DotnetThx  – and running it gives me that :

—————————————————————
Package:InterpreterDll
Page:https://github.com/ignatandrei/interpreter
Andrei Ignat
—————————————————————
—————————————————————
Package:McMaster.Extensions.CommandLineUtils
Page:https://github.com/natemcmaster/CommandLineUtils
Nate McMaster
—————————————————————
—————————————————————
Package:McMaster.Extensions.CommandLineUtils-max
Page:https://github.com/natemcmaster/CommandLineUtils-max
Nate McMaster
—————————————————————
—————————————————————
Package:McMaster.Extensions.CommandLineUtils-max2
Page:https://github.com/natemcmaster/CommandLineUtils-max2
Nate McMaster
—————————————————————
—————————————————————
Package:CommandLine.Core.CommandLineUtils
Page:https://github.com/mthamil/CommandLine.Core
Matt Hamilton
—————————————————————
—————————————————————
Package:CommandLineUtils.Extensions
Page:https://github.com/mthamil/CommandLine.Core
Matt Hamilton
—————————————————————
—————————————————————
Package:FormatWith
Page:https://github.com/crozone/FormatWith
Ryan Crosby
—————————————————————
—————————————————————
Package:netfx-System.StringFormatWith
Page:http://netfx.codeplex.com/
Henri Wiechers,  Daniel Cazzulino,  kzu,  Clarius
—————————————————————
—————————————————————
Package:netfx-System.StringFormatWith.Tests
Page:http://netfx.codeplex.com/
Henri Wiechers,  Daniel Cazzulino,  kzu,  Clarius
—————————————————————
—————————————————————
Package:DocumentFormat.OpenXml
Page:https://github.com/OfficeDev/Open-XML-SDK
Microsoft
—————————————————————
—————————————————————
Package:ZXing.Net
Page:https://github.com/micjahn/ZXing.Net/
Michael Jahn
—————————————————————
—————————————————————
Package:Google.Protobuf
Page:https://github.com/google/protobuf
Google Inc.
—————————————————————
—————————————————————
Package:ExcelNumberFormat
Page:https://github.com/andersnm/ExcelNumberFormat
ExcelNumberFormat developers
—————————————————————
—————————————————————
Package:NUnit.Runners
Page:http://nunit.org/
Charlie Poole
—————————————————————
—————————————————————
Package:WebP.Touch
Page:https://github.com/molinch/WebP.Touch
Daniel Luberda, Molinet Fabien, Cosmin Gordea
—————————————————————
—————————————————————
Package:BclContrib-ParseFormat
Page:http://code.google.com/p/bclcontrib-parseformat/
Sky Morey
—————————————————————
—————————————————————
Package:SmartFormat.NET
Page:https://github.com/scottrippey/SmartFormat.NET
Scott Rippey,axuno gGmbH,Bernhard Millauer and other contributors.
—————————————————————
—————————————————————
Package:SFD.StringFormat
Page:
AdamSpeight2008
—————————————————————
—————————————————————
Package:ActionMessageFormat
Page:https://github.com/mntone/Data.Amf
mntone and qwerty
—————————————————————
—————————————————————
Package:FileFormatWavefront
Page:https://github.com/dwmkerr/file-format-wavefront
Dave Kerr
—————————————————————
—————————————————————
Package:String.Format.Js
Page:http://mstr.se/sffjs
Daniel Mester Pirttijärvi
—————————————————————
—————————————————————
Package:ActionMessageFormat.UWP
Page:https://github.com/tor4kichi/Data.Amf
tor4kichi
—————————————————————
—————————————————————
Package:jQuery.dateFormat
Page:https://github.com/phstc/jquery-dateFormat
Pablo Cantero
—————————————————————
—————————————————————
Package:TMU-BioTextMining.i2b2.Format
Page:https://sites.google.com/site/hongjiedai/projects/tmuclinicalnet
Hong-Jie Dai
—————————————————————
—————————————————————
Package:Estat.Sri.Ws.Format.Sdmx
Page:https://webgate.ec.europa.eu/CITnet/stash/projects/SDMXRI/repos/nsiws.net/browse
Eurostat
—————————————————————
—————————————————————
Package:FormatProviders
Page:
AdamSpeight2008
—————————————————————
—————————————————————
Package:Microsoft.CodeAnalysis.CSharp
Page:https://github.com/dotnet/roslyn
Microsoft
—————————————————————
—————————————————————
Package:Microsoft.CodeAnalysis.CSharp.Workspaces
Page:https://github.com/dotnet/roslyn
Microsoft
—————————————————————
—————————————————————
Package:Microsoft.CodeAnalysis.CSharp.Scripting
Page:https://github.com/dotnet/roslyn
Microsoft
—————————————————————
—————————————————————
Package:Microsoft.CodeAnalysis.CSharp.Features
Page:https://github.com/dotnet/roslyn
Microsoft
—————————————————————
—————————————————————
Package:Microsoft.CodeAnalysis.CSharp.Extensions
Page:https://github.com/denis-tsv/Microsoft.CodeAnalysis.CSharp.Extensions
Denis Tsvettsih
—————————————————————
—————————————————————
Package:Sawmill.Microsoft.CodeAnalysis.CSharp
Page:https://github.com/benjamin-hodgson/Sawmill
benjamin.hodgson
—————————————————————
—————————————————————
Package:Forked-MS.CodeAnalysis.CSharp-KeywordAlias
Page:https://github.com/rickardp/roslyn
Rickard
—————————————————————
—————————————————————
Package:Roslynator.CodeFixes
Page:http://github.com/JosefPihrt/Roslynator
Josef Pihrt
—————————————————————
—————————————————————
Package:Roslynator.Analyzers
Page:http://github.com/JosefPihrt/Roslynator
Josef Pihrt
—————————————————————
—————————————————————
Package:Ben.Demystifier-RoslynScriptingCompatibility
Page:https://github.com/molinch/Ben.Demystifier-RoslynScriptingCompatibility
ben_a_adams molinch
—————————————————————
—————————————————————
Package:Microsoft.CodeAnalysis.Compilers
Page:https://github.com/dotnet/roslyn
Microsoft
—————————————————————
—————————————————————
Package:Microsoft.CodeAnalysis
Page:https://github.com/dotnet/roslyn
Microsoft
—————————————————————
—————————————————————
Package:Microsoft.CodeAnalysis.Workspaces.MSBuild
Page:https://github.com/dotnet/roslyn
Microsoft
—————————————————————
—————————————————————
Package:Microsoft.CodeAnalysis.CSharp.Scripting
Page:https://github.com/dotnet/roslyn
Microsoft
—————————————————————
—————————————————————
Package:Ben.Demystifier-RoslynScriptingCompatibility
Page:https://github.com/molinch/Ben.Demystifier-RoslynScriptingCompatibility
ben_a_adams molinch
—————————————————————
—————————————————————
Package:Newtonsoft.Json
Page:https://www.newtonsoft.com/json
James Newton-King
—————————————————————
—————————————————————
Package:Amplified.ValueObjects.Newtonsoft.Json
Page:https://github.com/Nillerr/Amplified.ValueObjects
Nicklas Jensen
—————————————————————
—————————————————————
Package:CommonSerializer.Newtonsoft.Json
Page:https://github.com/BrannonKing/CommonSerializer
Brannon King
—————————————————————
—————————————————————
Package:Remote.Linq.Newtonsoft.Json
Page:https://github.com/6bee/Remote.Linq
Christof Senn
—————————————————————
—————————————————————
Package:aqua-core-newtonsoft-json
Page:https://github.com/6bee/aqua-core
Christof Senn
—————————————————————
—————————————————————
Package:RestSharp.Newtonsoft.Json.NetCore
Page:https://github.com/Alterdata/RestSharp.Newtonsoft.Json.NetCore
Bernardo Esbérard
—————————————————————
—————————————————————
Package:Newtonsoft.Json.FSharp
Page:
Henrik Feldt,  Logibit AB
—————————————————————
—————————————————————
Package:Orleans.Serialization.Newtonsoft.Json
Page:https://github.com/OrleansContrib/orleans.serialization.json
Daniel Marbach
—————————————————————
—————————————————————
Package:Newtonsoft.Json.Net20.dll
Page:
wx1983@gmail.com
—————————————————————
—————————————————————
Package:Sfa.Core.Newtonsoft.Json
Page:https://github.com/SkillsFundingAgency/Core
Skills Funding Agency
—————————————————————
—————————————————————
Package:NServiceBus.Newtonsoft.Json
Page:https://docs.particular.net/nuget/NServiceBus.Newtonsoft.Json
Particular Software
—————————————————————
—————————————————————
Package:RestSharp.Newtonsoft.Json
Page:https://github.com/adamfisher/RestSharp.Serializers.Newtonsoft.Json
Adam Fisher
—————————————————————
—————————————————————
Package:Bridge.Newtonsoft.Json
Page:https://github.com/bridgedotnet/Bridge.Newtonsoft.Json
Object.NET, Inc.
—————————————————————
—————————————————————
Package:Gu.SerializationAsserts.Newtonsoft.Json
Page:https://github.com/JohanLarsson/Gu.SerializationAsserts
Johan Larsson
—————————————————————
—————————————————————
Package:RestSharp.Newtonsoft.Json.Extensions
Page:https://github.com/i4004/RestSharp.Newtonsoft.Json.Extensions
Alexander Krylkov
—————————————————————
—————————————————————
Package:Mgazza.Newtonsoft.Json
Page:https://github.com/mgazza/Optional
Mark Gascoyne
—————————————————————
—————————————————————
Package:Newtonsoft.Json.Akshay
Page:
Akshay.Shingnapurkar, Yuvraj.Repe
—————————————————————
—————————————————————
Package:WampSharp.NewtonsoftJson
Page:https://wampsharp.net/
CodeSharp
—————————————————————
—————————————————————
Package:Pollock.Newtonsoft.Json
Page:
wallymathieu
—————————————————————
—————————————————————
Package:Lykke.WampSharp.NewtonsoftJson
Page:https://github.com/LykkeCity/WampSharp
Lykke
—————————————————————
—————————————————————
Package:coverlet.msbuild
Page:http://github.com/tonerdo/coverlet
tonerdo
—————————————————————
—————————————————————
Package:Microsoft.CodeAnalysis.CSharp.Scripting
Page:https://github.com/dotnet/roslyn
Microsoft
—————————————————————
—————————————————————
Package:Ben.Demystifier-RoslynScriptingCompatibility
Page:https://github.com/molinch/Ben.Demystifier-RoslynScriptingCompatibility
ben_a_adams molinch
—————————————————————
—————————————————————
Package:Microsoft.NET.Test.Sdk
Page:https://github.com/microsoft/vstest/
Microsoft
—————————————————————
—————————————————————
Package:MSTest.TestAdapter
Page:https://github.com/microsoft/testfx
Microsoft
—————————————————————
—————————————————————
Package:MSTestX.TestAdapter
Page:https://github.com/dotMorten/MSTestX
Morten Nielsen
—————————————————————
—————————————————————
Package:MSTest.TestFramework
Page:https://github.com/microsoft/testfx
Microsoft
—————————————————————
—————————————————————
Package:MSTest.TestFramework
Page:https://github.com/microsoft/testfx
Microsoft
—————————————————————
—————————————————————
Package:MSTest.TestAdapter
Page:https://github.com/microsoft/testfx
Microsoft
—————————————————————
—————————————————————
Package:Microsoft.UnitTestFramework.Extensions
Page:https://github.com/Microsoft/mstest-extensions/wiki
Microsoft
—————————————————————
—————————————————————
Package:Nosnitor.TestFramework.Extensions.MSTest
Page:
Nosnitor Corporation
—————————————————————
—————————————————————
Package:Riganti.Selenium.MSTest2Integration
Page:https://github.com/riganti/selenium-utils
Ladislav Šesták
—————————————————————
—————————————————————
Package:LightBDD.MsTest2
Page:https://github.com/LightBDD/LightBDD
Wojciech Kotlarski
—————————————————————
—————————————————————
Package:Shouldly
Page:http://shouldly.github.com/
Shouldly
—————————————————————
—————————————————————
Package:Sollertes.Bdd.Shouldly
Page:https://github.com/Sollertes/BDD
Marcin Markowski
—————————————————————
—————————————————————
Package:ITLibrium.BDD.Shouldly
Page:https://github.com/itlibrium/BDD
Marcin Markowski
—————————————————————
—————————————————————
Package:Mgazza.Shouldly
Page:https://github.com/mgazza/Optional
Mark Gascoyne
—————————————————————
—————————————————————
Package:Shouldly.EqualityExtensions
Page:https://github.com/whortleberrybearer/shouldly
whortleberrybearer
—————————————————————
—————————————————————
Package:NorwegianShouldly
Page:https://github.com/eaardal/norwegian-shouldly
This language wrapper: Eirik Årdal. Original Shouldly: See Shouldly NuGet package

A whole bunch of packages – that it is clear that helps my project.

Interpreter–part 6 of n–Ecosystem/usage

Series:

  1. http://msprogrammer.serviciipeweb.ro/2018/07/16/interpreterpart-1-of-n/ – Idea
  2. http://msprogrammer.serviciipeweb.ro/2018/07/23/interpreterpart-2-of-n/ – Coding
  3. http://msprogrammer.serviciipeweb.ro/2018/07/30/interpreterpart-3-of-n/ – Testing
  4. http://msprogrammer.serviciipeweb.ro/2018/08/06/interpreterpart-4-of-n/  – Deploy
  5. http://msprogrammer.serviciipeweb.ro/2018/08/13/interpreterpart-5-of-n/ – Documentation
  6. http://msprogrammer.serviciipeweb.ro/2018/08/20/interpreterpart-6-of-n/ – Ecosystem / usage

 

 

This is the latest – how do you use the component. In this case, the Interpreter is part of 2 separate projects : Stankins and AOP with Roslyn . Both uses this in order to interpret json files at runtimes.

For example, AOP with Roslyn wants to run in the current folder – not in the dotnet  folder wher it belongs.

So , for this, it has

“FolderName”: “@static:Environment.CurrentDirectory@”,

in the processme.,txt file.

The processme.txt is taken from

var pathDll = Assembly.GetEntryAssembly().Location;
path = Path.GetDirectoryName(pathDll);

But it processes files on the current directory – and it has the full name of the folder.

 

Interpreter–part 5 of n–Documentation

Series:

  1. http://msprogrammer.serviciipeweb.ro/2018/07/16/interpreterpart-1-of-n/ – Idea
  2. http://msprogrammer.serviciipeweb.ro/2018/07/23/interpreterpart-2-of-n/ – Coding
  3. http://msprogrammer.serviciipeweb.ro/2018/07/30/interpreterpart-3-of-n/ – Testing
  4. http://msprogrammer.serviciipeweb.ro/2018/08/06/interpreterpart-4-of-n/  – Deploy
  5. http://msprogrammer.serviciipeweb.ro/2018/08/13/interpreterpart-5-of-n/ – Documentation
  6. http://msprogrammer.serviciipeweb.ro/2018/08/20/interpreterpart-6-of-n/ – Ecosystem / usage

 

 

After all this steps, now it is the moment to have Documentation. Basically, if nothing have changed, is the same as the idea –  http://msprogrammer.serviciipeweb.ro/2018/07/16/interpreterpart-1-of-n/  .

However , there are some points to add:

  1. Clear use of the software ( examples, tutorials, videos, others)
  2. Added badge/link to the software  (nuget,  see https://github.com/ignatandrei/Interpreter  )
  3. Added badge to  build ( see https://github.com/ignatandrei/Interpreter  )
  4. Added badge to license ( see https://github.com/ignatandrei/Interpreter  )
  5. Add reference to any third party software that you are using( any other nuget components / dot net tools – https://github.com/ignatandrei/Interpreter/blob/master/application/Interpreter/thirdParty.md )

But the most important part is to show how you use it in a real project…

Interpreter–part 4 of n – Deploy

Series:

  1. http://msprogrammer.serviciipeweb.ro/2018/07/16/interpreterpart-1-of-n/ – Idea
  2. http://msprogrammer.serviciipeweb.ro/2018/07/23/interpreterpart-2-of-n/ – Coding
  3. http://msprogrammer.serviciipeweb.ro/2018/07/30/interpreterpart-3-of-n/ – Testing
  4. http://msprogrammer.serviciipeweb.ro/2018/08/06/interpreterpart-4-of-n/  – Deploy
  5. http://msprogrammer.serviciipeweb.ro/2018/08/13/interpreterpart-5-of-n/ – Documentation
  6. http://msprogrammer.serviciipeweb.ro/2018/08/20/interpreterpart-6-of-n/ – Ecosystem / usage

 

 

After done the testing part, we can deploy the Interpreter . That means uploading to some package sources, as Nuget.org or myget.org. I choose Nuget.org .

For this, first we should package the applicatiuon. We right click the project, select properties, and then package tab.

Enter the details ,. save , then right click the project again and click “Publish” and fisnish.

In the folder “bin\Debug\netcoreapp2.1\publish” you will find the InterpreterDll.1.0.0.nupkg file. This file you will upload to nuget.org. For this, you have to login to nuget.rog and go to https://www.nuget.org/account/Packages

After submitting , you will find the package at https://www.nuget.org/packages/InterpreterDll/ .

From this, you can testit by downloading directly  from nuget feed .

First deploy was simple  – but we want to do this with a button click.

 

But we want more – every time a new code is pushed to github  -the tests should run automatically and a new interpreter package will be created. For this we can choose VisualStudio.com site , integrate with our github repository and create a build release.

I am going to https://ignatandrei.visualstudio.com/ and create a new project.  For this , I will integrate with GitHub and push a new build. Also,  in this definition of build have a publish task that allows to publish as an artifacty the .nupkg that next we will put on github / nuget

Interpreter–part 3 of n -Testing

Series:

  1. http://msprogrammer.serviciipeweb.ro/2018/07/16/interpreterpart-1-of-n/ – Idea
  2. http://msprogrammer.serviciipeweb.ro/2018/07/23/interpreterpart-2-of-n/ – Coding
  3. http://msprogrammer.serviciipeweb.ro/2018/07/30/interpreterpart-3-of-n/ – Testing
  4. http://msprogrammer.serviciipeweb.ro/2018/08/06/interpreterpart-4-of-n/  – Deploy
  5. http://msprogrammer.serviciipeweb.ro/2018/08/13/interpreterpart-5-of-n/ – Documentation
  6. http://msprogrammer.serviciipeweb.ro/2018/08/20/interpreterpart-6-of-n/ – Ecosystem / usage

 

 

Now that we do not have just the interpreter part 1 idea, but also interpreter part 2 coding , we can test the application.

For this we should write test for everything that we wrote in the interpreter part 1  idea  .

That gives us a bunch of tests functions:

void InterpretDateTime();
void InterpretDateTimeUtcNow();
void InterpretEnv();
void InterpretGuid();
void InterpretSettingsFile();
void InterpretStaticOneParameter();
void InterpretStaticParameterString();
void InterpretStaticTwoParameterString();

 

We run those test with VS or

dotnet test

and we think that is ok.

Nope. We should , to be sure,to have the code coverage – means that we verify what we have tested . You can start from here : https://dotnetthoughts.net/code-coverage-in-netcore-with-coverlet/

The first iteration for my project gives to me

Assemblies: 1
Classes: 2
Files: 2
Covered lines: 196
Uncovered lines: 17
Coverable lines: 213
Total lines: 313
Line coverage: 92%
Branch coverage: 84.60%

That it is pretty solid.

Andrei Ignat weekly software news(mostly .NET)

* indicates required

Please select all the ways you would like to hear from me:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices here.