diff --git a/.appveyor.yml b/.appveyor.yml index ef2f396..9f5e7a3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,24 +1,28 @@ image: Visual Studio 2022 -# Adds "+build.XXX" to MinVer's build metadata environment: + # Adds "+build.XXX" to MinVer's build metadata MINVERBUILDMETADATA: build.%APPVEYOR_BUILD_NUMBER% + DOTNET_CLI_TELEMETRY_OPTOUT: true + DOTNET_NOLOGO: true + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # AppVeyor's displayed version, will get updated by MSBuild target version: '{build}' before_build: +- choco install dotnet-sdk --version 8.0.100 - dotnet restore build_script: -- dotnet build --no-restore --configuration Release +- dotnet build --no-restore --configuration Release -p:GeneratePackageOnBuild=true -p:ContinuousIntegrationBuild=true test_script: - dotnet test --no-build --configuration Release -p:CollectCoverage=true after_test: - choco install codecov -- pwsh: codecov --file @(ls ./testresults/*.opencover.xml) +- pwsh: codecov --file @(Get-ChildItem -Path artifacts/coverage/*opencover*.xml -Recurse) artifacts: -- path: ./**/*.nupkg +- path: artifacts/package/**/*.nupkg diff --git a/.gitignore b/.gitignore index d8e25c3..d687a58 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ .vs/ -bin/ -obj/ -testresults/ +artifacts/ *.user diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..93d5ad5 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,5 @@ + + + $(MSBuildThisFileDirectory)artifacts + + diff --git a/global.json b/global.json index 49d2255..391ba3c 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.300", + "version": "8.0.100", "rollForward": "latestFeature" } } diff --git a/src/Rationals/Properties/AssemblyInfo.cs b/src/Rationals/Properties/AssemblyInfo.cs deleted file mode 100644 index abde5ed..0000000 --- a/src/Rationals/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,6 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -[assembly: CLSCompliant(true)] -[assembly: ComVisible(false)] -[assembly: Guid("64844312-c711-4e37-ac63-65bcb449afb7")] diff --git a/src/Rationals/Rationals.csproj b/src/Rationals/Rationals.csproj index 5cef70d..7cac8af 100644 --- a/src/Rationals/Rationals.csproj +++ b/src/Rationals/Rationals.csproj @@ -1,18 +1,21 @@ - + - netstandard1.3;netstandard2.0;net40;net6.0 + netstandard1.3;netstandard2.0;net40;net6.0;net8.0 7.3 - true + + true - true - true - $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - true + .pdb;$(AllowedOutputExtensionsInPackageBuildOutputFolder) + true + + true $(MSBuildThisFileDirectory)../../rationals.snk + + Tomáš Pažourek $(Authors) - $(Copyright) + Copyright $([System.DateTime]::Now.Year) $(Company) MIT https://github.com/tompazourek/Rationals git @@ -21,38 +24,24 @@ $(RepositoryUrl)/releases logo_64.png arbitrary-precision biginteger bigrational c-sharp coefficients continued-fractions fraction fractional rational-numbers rational-number-arithmetic rationals - - Implementation of rational number arithmetic for .NET with arbitrary precision. - - Supported features: - - - implicit conversions - rationals integrate seamlessly with other number types - - unlimited precision - rationals use BigInteger inside - - canonical form - each rational can have its canonical form (irreducible fraction where denominator is always positive) - - separate whole and fractional part - any rational number can be separated into a whole part (integer quotient aka result of integer division) and fractional part (reminder of the integral division aka result of modulo operation) - - comparison &amp; equality - - multiple formatting options - ToString("C") (canonical form), ToString("W") (whole + fractional part), or normal fraction format - - continued fraction expansion - expand rational numbers to continued fraction (sequence of coefficients), construct rational numbers from sequence of continued fraction coefficients - - rational number approximation - approximate floating point numbers (decimal, double, float) as rational numbers with customizable tolerance - - Example usage: - - Rational left = (Rational) 1 / 2; - - Rational right = (Rational) 1 / 4; - - Rational sum = left + right; // equals to: 3 / 4 - + Implementation of rational number arithmetic for .NET with arbitrary precision. + + + <_Parameter1>true + + + <_Parameter1>false + + + <_Parameter1>64844312-c711-4e37-ac63-65bcb449afb7 + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - all - runtime; build; native; contentfiles; analyzers - all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -62,7 +51,7 @@ - + diff --git a/tests/Rationals.Tests/Rationals.Tests.csproj b/tests/Rationals.Tests/Rationals.Tests.csproj index 4e73098..6a591c7 100644 --- a/tests/Rationals.Tests/Rationals.Tests.csproj +++ b/tests/Rationals.Tests/Rationals.Tests.csproj @@ -1,9 +1,11 @@ - + - net6.0 + net8.0 false + + opencover - $(MSBuildThisFileDirectory)../../testresults/$(MSBuildProjectName).opencover.xml + $(ArtifactsPath)/coverage/$(MSBuildProjectName)/opencover.xml @@ -11,9 +13,8 @@ all - - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive