<commit_before>Properties {
	$root_dir = Split-Path $psake.build_script_file
	$artifacts_dir = "$root_dir\bin"
	$source_dir = "$root_dir\src"
	$log_dir = "$root_dir\log"
	
	$testdll_dir = "$artifacts_dir\NesZord.Tests.dll"
	
	$solution_dir = "$source_dir\NesZord.sln"

	$nspec_dir_pattern = "^nspec(\.\d){3}"
	$nspec_dir = (Get-ChildItem "$source_dir\packages\" -Directory | ?{ $_.Name -match $nspec_dir_pattern } | select -First 1).FullName
	$nspecrunner_dir = "$nspec_dir\tools\nspecrunner.exe"
	
	$isAppVeyor = $env:APPVEYOR -eq $true
}

FormatTaskName (("-"*25) + "[{0}]" + ("-"*25))

Task Default -Depends Setup, Clean, Build, Test

Task Setup {
	CreateCleanDir "build artifacts" $artifacts_dir
	CreateCleanDir "logs" $log_dir
}

Task Clean {
	Print "Cleaning NesZord.sln"
	Exec { msbuild $solution_dir /t:Clean /p:Configuration=Debug /v:quiet } 
}

Task RestorePackages -Depends Clean {
	Exec { $source_dir\.nuget\NuGet restore -PackagesDirectory $source_dir\packages }
}

Task Build -Depends RestorePackages {	
	Print "Building NesZord.sln"<commit_msg>Add restore nuget packages task to default pipeline<commit_after>Properties {
	$root_dir = Split-Path $psake.build_script_file
	$artifacts_dir = "$root_dir\bin"
	$source_dir = "$root_dir\src"
	$log_dir = "$root_dir\log"
	
	$testdll_dir = "$artifacts_dir\NesZord.Tests.dll"
	
	$solution_dir = "$source_dir\NesZord.sln"

	$nspec_dir_pattern = "^nspec(\.\d){3}"
	$nspec_dir = (Get-ChildItem "$source_dir\packages\" -Directory | ?{ $_.Name -match $nspec_dir_pattern } | select -First 1).FullName
	$nspecrunner_dir = "$nspec_dir\tools\nspecrunner.exe"
	
	$isAppVeyor = $env:APPVEYOR -eq $true
}

FormatTaskName (("-"*25) + "[{0}]" + ("-"*25))

Task Default -Depends Setup, Clean, RestorePackages, Build, Test

Task Setup {
	CreateCleanDir "build artifacts" $artifacts_dir
	CreateCleanDir "logs" $log_dir
}

Task Clean {
	Print "Cleaning NesZord.sln"
	Exec { msbuild $solution_dir /t:Clean /p:Configuration=Debug /v:quiet } 
}

Task RestorePackages -Depends Clean {
	Exec { $source_dir\.nuget\NuGet restore -PackagesDirectory $source_dir\packages }
}

Task Build -Depends RestorePackages {	
	Print "Building NesZord.sln"
{'fraction_non_alphanumeric': 0.14496088357109987, 'fraction_numerical': 0.006442705936493327, 'mean_word_length': 4.956164383561644, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '759796', 'n_tokens_mistral': 878, 'n_tokens_neox': 831, 'n_words': 165}