Skip to content

Commit

Permalink
Release of Atmoos.Quantities 1.1 (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
atmoos committed Feb 4, 2024
2 parents 7cda569 + 7d15f41 commit ebf163b
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
env:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_NOLOGO: true
DotNetVersion: 7.0.x
DotNetVersion: 8.0.x

defaults:
run:
Expand All @@ -31,9 +31,9 @@ jobs:
runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DotNetVersion }}
- name: Restore dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ env:
DOTNET_NOLOGO: true
Prefix: 'quantities/serialization/newtonsoft'
Project: 'source/Quantities.Serialization/Newtonsoft/Quantities.Serialization.Newtonsoft.csproj'
DotNetVersion: 7.0.x
DotNetVersion: 8.0.x

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DotNetVersion }}
- uses: tedd/publish-nuget-neo@v1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ env:
DOTNET_NOLOGO: true
Prefix: 'quantities/serialization/text.json'
Project: 'source/Quantities.Serialization/Text.Json/Quantities.Serialization.Text.Json.csproj'
DotNetVersion: 7.0.x
DotNetVersion: 8.0.x

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DotNetVersion }}
- uses: tedd/publish-nuget-neo@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-quantities-units.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ env:
DOTNET_NOLOGO: true
Prefix: 'quantities.units'
Project: 'source/Quantities.Units/Quantities.Units.csproj'
DotNetVersion: 7.0.x
DotNetVersion: 8.0.x

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DotNetVersion }}
- uses: tedd/publish-nuget-neo@v1
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-quantities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ env:
DOTNET_NOLOGO: true
Prefix: 'quantities'
Project: 'source/Quantities/Quantities.csproj'
DotNetVersion: 7.0.x
DotNetVersion: 8.0.x

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DotNetVersion }}
- uses: tedd/publish-nuget-neo@v1
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ Quantities support common operations such as addition, subtraction, multiplicati
```csharp
Time time = Time.Of(3, Metric<Hour>());

Velocity metricVelocity = kilometres / time; // 6 Km/h
Velocity metricVelocity = kilometres / time; // 6 km/h
Velocity imperialVelocity = miles / time; // 4 mi/h
Area metricArea = kilometres * miles; // 347.62 Km²
Area metricArea = kilometres * miles; // 347.62 km²
Area imperialArea = miles * kilometres; // 134.22 mi²
Console.WriteLine($"Equal area: {metricArea.Equals(imperialArea)}"); // Equal area: True
Length metricSum = kilometres + miles - metres; // 37.308 Km
Length metricSum = kilometres + miles - metres; // 37.308 km
Length imperialSum = miles + kilometres - metres; // 23.182 mi
Console.WriteLine($"Equal length: {imperialSum.Equals(metricSum)}"); // Equal length: True
```
Expand Down Expand Up @@ -103,7 +103,7 @@ Different types of prefixes are also supported. This is useful for [IEC binary p

```csharp
Data kibiByte = Data.Of(1, Binary<Kibi, Byte>()); // 1 KiB, binary prefix
Data kiloByte = Data.Of(1.024, Metric<Kilo, Byte>()); // 1 KB, metric prefix
Data kiloByte = Data.Of(1.024, Metric<Kilo, Byte>()); // 1 kB, metric prefix
Console.WriteLine($"Equal amount of data: {kiloByte.Equals(kibiByte)}"); // Equal amount of data: True
```

Expand Down
5 changes: 3 additions & 2 deletions source/Quantities.Benchmark/Quantities.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
Expand All @@ -19,14 +20,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Quantities\Quantities.csproj" />
<ProjectReference Include="..\Quantities.Units\Quantities.Units.csproj" />
<ProjectReference Include="..\Quantities.Serialization\Text.Json\Quantities.Serialization.Text.Json.csproj" />
<ProjectReference Include="..\Quantities.Serialization\Newtonsoft\Quantities.Serialization.Newtonsoft.csproj" />
<ProjectReference Include="..\Quantities.Units\Quantities.Units.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion source/Quantities.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<PropertyGroup>
<AssemblyName>Atmoos.$(RootNamespace)</AssemblyName>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
5 changes: 4 additions & 1 deletion source/Quantities.Pack.targets
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<Authors>Thomas Kägi</Authors>
<Copyright>Thomas Kägi</Copyright>
<PackageProjectUrl>https://github.com/atmoos/Quantities</PackageProjectUrl>
<RepositoryUrl>https://github.com/atmoos/Quantities</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>units, quantities, measures, measurements, unitsofmeasure, units-of-measure, units-of-measurement, conversion, unit-conversion, units-measures-converter</PackageTags>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand All @@ -17,4 +16,8 @@
<None Include="readme.md" Pack="true" PackagePath="\"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="DotNet.ReproducibleBuilds" Version="1.1.1" PrivateAssets="All"/>
</ItemGroup>

</Project>
10 changes: 7 additions & 3 deletions source/Quantities.Test.targets
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<Project>
<!-- Test info common to all test projects within the quantities project -->

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
3 changes: 2 additions & 1 deletion source/Quantities/Quantities.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
<Import Project="../Quantities.Pack.targets"/>

<PropertyGroup>
<Version>1.0.0</Version>
<Version>1.1.0</Version>
<RootNamespace>Quantities</RootNamespace>
<TargetFramework>net8.0</TargetFramework>
<Description>Type-safe and efficent handling of physical quantities.</Description>
</PropertyGroup>

Expand Down

0 comments on commit ebf163b

Please sign in to comment.