From ebdcb46c5e099bea1cc513e452f71b05ed9a482a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Aug 2024 11:28:50 +0000 Subject: [PATCH 1/3] Bump csharpier from 0.28.2 to 0.29.1 Bumps [csharpier](https://github.com/belav/csharpier) from 0.28.2 to 0.29.1. - [Release notes](https://github.com/belav/csharpier/releases) - [Changelog](https://github.com/belav/csharpier/blob/main/CHANGELOG.md) - [Commits](https://github.com/belav/csharpier/compare/0.28.2...0.29.1) --- updated-dependencies: - dependency-name: csharpier dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .config/dotnet-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index a271784..33e923c 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "csharpier": { - "version": "0.28.2", + "version": "0.29.1", "commands": [ "dotnet-csharpier" ] From b9138b1e39a74e022797705b80a40b867f70565a Mon Sep 17 00:00:00 2001 From: Vladimir Portyanikhin <86243191+portyanikhin@users.noreply.github.com> Date: Thu, 29 Aug 2024 15:04:34 +0300 Subject: [PATCH 2/3] Update formatting --- src/SharpProp/Enums/FluidsList.cs | 2 +- src/SharpProp/Enums/InputPairs.cs | 2 +- src/SharpProp/Enums/Mix.cs | 2 +- src/SharpProp/Enums/Parameters.cs | 2 +- src/SharpProp/Enums/Phases.cs | 2 +- src/SharpProp/Extensions/JsonExtensions.cs | 4 +- src/SharpProp/HumidAir/HumidAir.cs | 2 +- tests/SharpProp.Tests/Fluids/FluidTests.cs | 8 ++-- tests/SharpProp.Tests/Fluids/MixtureTests.cs | 16 +++---- .../SharpProp.Tests/HumidAir/HumidAirTests.cs | 8 ++-- .../SharpProp.Tests/IO/InputHumidAirTests.cs | 42 +++++++++---------- tests/SharpProp.Tests/IO/InputTests.cs | 22 +++++----- 12 files changed, 56 insertions(+), 56 deletions(-) diff --git a/src/SharpProp/Enums/FluidsList.cs b/src/SharpProp/Enums/FluidsList.cs index 5af3ed9..8dc26be 100644 --- a/src/SharpProp/Enums/FluidsList.cs +++ b/src/SharpProp/Enums/FluidsList.cs @@ -1088,5 +1088,5 @@ public enum FluidsList R513A, [FluidInfo("TypicalNaturalGas.mix")] - TypicalNaturalGas + TypicalNaturalGas, } diff --git a/src/SharpProp/Enums/InputPairs.cs b/src/SharpProp/Enums/InputPairs.cs index bdc04ab..a8753ac 100644 --- a/src/SharpProp/Enums/InputPairs.cs +++ b/src/SharpProp/Enums/InputPairs.cs @@ -42,5 +42,5 @@ public enum InputPairs DmassSmass_INPUTS, DmolarSmolar_INPUTS, DmassUmass_INPUTS, - DmolarUmolar_INPUTS + DmolarUmolar_INPUTS, } diff --git a/src/SharpProp/Enums/Mix.cs b/src/SharpProp/Enums/Mix.cs index e0fc6d1..f8d09ca 100644 --- a/src/SharpProp/Enums/Mix.cs +++ b/src/SharpProp/Enums/Mix.cs @@ -13,5 +13,5 @@ public enum Mix /// /// Volume-based mixture. /// - Volume + Volume, } diff --git a/src/SharpProp/Enums/Parameters.cs b/src/SharpProp/Enums/Parameters.cs index 791f2c1..dfa2702 100644 --- a/src/SharpProp/Enums/Parameters.cs +++ b/src/SharpProp/Enums/Parameters.cs @@ -86,5 +86,5 @@ public enum Parameters iPH, iODP, iPhase, - iundefined_parameter + iundefined_parameter, } diff --git a/src/SharpProp/Enums/Phases.cs b/src/SharpProp/Enums/Phases.cs index 1afab47..7a3d723 100644 --- a/src/SharpProp/Enums/Phases.cs +++ b/src/SharpProp/Enums/Phases.cs @@ -15,5 +15,5 @@ public enum Phases Gas, TwoPhase, Unknown, - NotImposed + NotImposed, } diff --git a/src/SharpProp/Extensions/JsonExtensions.cs b/src/SharpProp/Extensions/JsonExtensions.cs index a882555..14c1210 100644 --- a/src/SharpProp/Extensions/JsonExtensions.cs +++ b/src/SharpProp/Extensions/JsonExtensions.cs @@ -8,8 +8,8 @@ internal static class JsonExtensions Converters = new List { new StringEnumConverter(), - new UnitsNetIQuantityJsonConverter() - } + new UnitsNetIQuantityJsonConverter(), + }, }; public static string ConvertToJson(this object? instance, bool indented) diff --git a/src/SharpProp/HumidAir/HumidAir.cs b/src/SharpProp/HumidAir/HumidAir.cs index 77d6bc4..d2a083f 100644 --- a/src/SharpProp/HumidAir/HumidAir.cs +++ b/src/SharpProp/HumidAir/HumidAir.cs @@ -18,7 +18,7 @@ IKeyedInput thirdInput { firstInput, secondInput, - thirdInput + thirdInput, }; CheckInputs(); } diff --git a/tests/SharpProp.Tests/Fluids/FluidTests.cs b/tests/SharpProp.Tests/Fluids/FluidTests.cs index 97904eb..ada9536 100644 --- a/tests/SharpProp.Tests/Fluids/FluidTests.cs +++ b/tests/SharpProp.Tests/Fluids/FluidTests.cs @@ -107,7 +107,7 @@ public void Update_VariousFluids_MatchesWithCoolProp(FluidsList name) fluid.SurfaceTension?.NewtonsPerMeter, fluid.Temperature.Kelvins, fluid.TriplePressure?.Pascals, - fluid.TripleTemperature?.Kelvins + fluid.TripleTemperature?.Kelvins, }; var expected = new[] { @@ -134,7 +134,7 @@ public void Update_VariousFluids_MatchesWithCoolProp(FluidsList name) "I", "T", "p_triple", - "T_triple" + "T_triple", } .Select(CoolPropInterface) .ToList(); @@ -260,11 +260,11 @@ public void AsJson_IndentedOrNot_ReturnsProperlyFormattedJson(bool indented) Converters = new List { new StringEnumConverter(), - new UnitsNetIQuantityJsonConverter() + new UnitsNetIQuantityJsonConverter(), }, Formatting = indented ? Formatting.Indented - : Formatting.None + : Formatting.None, } ) ); diff --git a/tests/SharpProp.Tests/Fluids/MixtureTests.cs b/tests/SharpProp.Tests/Fluids/MixtureTests.cs index 676a19c..bba69ba 100644 --- a/tests/SharpProp.Tests/Fluids/MixtureTests.cs +++ b/tests/SharpProp.Tests/Fluids/MixtureTests.cs @@ -122,11 +122,11 @@ public void AsJson_IndentedOrNot_ReturnsProperlyFormattedJson(bool indented) Converters = new List { new StringEnumConverter(), - new UnitsNetIQuantityJsonConverter() + new UnitsNetIQuantityJsonConverter(), }, Formatting = indented ? Formatting.Indented - : Formatting.None + : Formatting.None, } ) ); @@ -201,35 +201,35 @@ public static IEnumerable WrongFluidsOrFractions() => new List { FluidsList.Water }, new List { 60.Percent(), 40.Percent() }, "Invalid input! Fluids and Fractions " - + "should be of the same length." + + "should be of the same length.", }, new object[] { new List { FluidsList.MPG, FluidsList.MEG }, new List { 60.Percent(), 40.Percent() }, "Invalid components! All of them " - + "should be a pure fluid with HEOS backend." + + "should be a pure fluid with HEOS backend.", }, new object[] { new List { FluidsList.Water, FluidsList.Ethanol }, new List { -200.Percent(), 40.Percent() }, "Invalid component mass fractions! " - + "All of them should be in (0;100) %." + + "All of them should be in (0;100) %.", }, new object[] { new List { FluidsList.Water, FluidsList.Ethanol }, new List { 60.Percent(), 200.Percent() }, "Invalid component mass fractions! " - + "All of them should be in (0;100) %." + + "All of them should be in (0;100) %.", }, new object[] { new List { FluidsList.Water, FluidsList.Ethanol }, new List { 80.Percent(), 80.Percent() }, "Invalid component mass fractions! " - + "Their sum should be equal to 100 %." - } + + "Their sum should be equal to 100 %.", + }, }; } diff --git a/tests/SharpProp.Tests/HumidAir/HumidAirTests.cs b/tests/SharpProp.Tests/HumidAir/HumidAirTests.cs index f5dd8d2..40b42c1 100644 --- a/tests/SharpProp.Tests/HumidAir/HumidAirTests.cs +++ b/tests/SharpProp.Tests/HumidAir/HumidAirTests.cs @@ -90,7 +90,7 @@ public void Update_VariousConditions_MatchesWithCoolProp( _humidAir.SpecificHeat.JoulesPerKilogramKelvin, _humidAir.SpecificVolume.CubicMetersPerKilogram, _humidAir.Temperature.Kelvins, - _humidAir.WetBulbTemperature.Kelvins + _humidAir.WetBulbTemperature.Kelvins, }; var expected = new[] { @@ -107,7 +107,7 @@ public void Update_VariousConditions_MatchesWithCoolProp( "Cha", "Vha", "T", - "B" + "B", } .Select(CoolPropInterface) .ToList(); @@ -229,11 +229,11 @@ public void AsJson_IndentedOrNot_ReturnsProperlyFormattedJson(bool indented) Converters = new List { new StringEnumConverter(), - new UnitsNetIQuantityJsonConverter() + new UnitsNetIQuantityJsonConverter(), }, Formatting = indented ? Formatting.Indented - : Formatting.None + : Formatting.None, } ) ); diff --git a/tests/SharpProp.Tests/IO/InputHumidAirTests.cs b/tests/SharpProp.Tests/IO/InputHumidAirTests.cs index 56bd939..d09ce77 100644 --- a/tests/SharpProp.Tests/IO/InputHumidAirTests.cs +++ b/tests/SharpProp.Tests/IO/InputHumidAirTests.cs @@ -56,28 +56,28 @@ public static IEnumerable CoolPropKeys() => new object[] { InputHumidAir.Density(1.25.KilogramsPerCubicMeter()), - "Vha" + "Vha", }, new object[] { InputHumidAir.DewTemperature(10.DegreesCelsius()), - "D" + "D", }, new object[] { InputHumidAir.Enthalpy(20.KilojoulesPerKilogram()), - "Hha" + "Hha", }, new object[] { InputHumidAir.Entropy(10.KilojoulesPerKilogramKelvin()), - "Sha" + "Sha", }, new object[] { InputHumidAir.Humidity(5.PartsPerThousand()), "W" }, new object[] { InputHumidAir.PartialPressure(1.Kilopascals()), - "P_w" + "P_w", }, new object[] { InputHumidAir.Pressure(1.Atmospheres()), "P" }, new object[] @@ -85,23 +85,23 @@ public static IEnumerable CoolPropKeys() => InputHumidAir.RelativeHumidity( RelativeHumidity.FromPercent(50) ), - "R" + "R", }, new object[] { InputHumidAir.SpecificVolume(0.8.CubicMetersPerKilogram()), - "Vha" + "Vha", }, new object[] { InputHumidAir.Temperature(20.DegreesCelsius()), - "T" + "T", }, new object[] { InputHumidAir.WetBulbTemperature(15.DegreesCelsius()), - "B" - } + "B", + }, }; public static IEnumerable Values() => @@ -110,33 +110,33 @@ public static IEnumerable Values() => new object[] { InputHumidAir.Altitude(300.Meters()), - 97772.56060611102 + 97772.56060611102, }, new object[] { InputHumidAir.Density(1.25.KilogramsPerCubicMeter()), - 0.8 + 0.8, }, new object[] { InputHumidAir.DewTemperature(10.DegreesCelsius()), - 283.15 + 283.15, }, new object[] { InputHumidAir.Enthalpy(20.KilojoulesPerKilogram()), - 2e4 + 2e4, }, new object[] { InputHumidAir.Entropy(10.KilojoulesPerKilogramKelvin()), - 1e4 + 1e4, }, new object[] { InputHumidAir.Humidity(5.PartsPerThousand()), 5e-3 }, new object[] { InputHumidAir.PartialPressure(1.Kilopascals()), - 1e3 + 1e3, }, new object[] { InputHumidAir.Pressure(1.Atmospheres()), 101325 }, new object[] @@ -144,22 +144,22 @@ public static IEnumerable Values() => InputHumidAir.RelativeHumidity( RelativeHumidity.FromPercent(50) ), - 0.5 + 0.5, }, new object[] { InputHumidAir.SpecificVolume(0.8.CubicMetersPerKilogram()), - 0.8 + 0.8, }, new object[] { InputHumidAir.Temperature(20.DegreesCelsius()), - 293.15 + 293.15, }, new object[] { InputHumidAir.WetBulbTemperature(15.DegreesCelsius()), - 288.15 - } + 288.15, + }, }; } diff --git a/tests/SharpProp.Tests/IO/InputTests.cs b/tests/SharpProp.Tests/IO/InputTests.cs index d8821dd..5d3c841 100644 --- a/tests/SharpProp.Tests/IO/InputTests.cs +++ b/tests/SharpProp.Tests/IO/InputTests.cs @@ -38,35 +38,35 @@ public static IEnumerable CoolPropKeys() => new object[] { Input.Density(999.KilogramsPerCubicMeter()), - Parameters.iDmass + Parameters.iDmass, }, new object[] { Input.Enthalpy(1.KilojoulesPerKilogram()), - Parameters.iHmass + Parameters.iHmass, }, new object[] { Input.Entropy(5.KilojoulesPerKilogramKelvin()), - Parameters.iSmass + Parameters.iSmass, }, new object[] { Input.InternalEnergy(10.KilojoulesPerKilogram()), - Parameters.iUmass + Parameters.iUmass, }, new object[] { Input.Pressure(1.Atmospheres()), Parameters.iP }, new object[] { Input.Quality(50.Percent()), Parameters.iQ }, new object[] { Input.SpecificVolume((1.0 / 999).CubicMetersPerKilogram()), - Parameters.iDmass + Parameters.iDmass, }, new object[] { Input.Temperature(20.DegreesCelsius()), - Parameters.iT - } + Parameters.iT, + }, }; public static IEnumerable Values() => @@ -77,20 +77,20 @@ public static IEnumerable Values() => new object[] { Input.Entropy(5.KilojoulesPerKilogramKelvin()), - 5e3 + 5e3, }, new object[] { Input.InternalEnergy(10.KilojoulesPerKilogram()), - 1e4 + 1e4, }, new object[] { Input.Pressure(1.Atmospheres()), 101325 }, new object[] { Input.Quality(50.Percent()), 0.5 }, new object[] { Input.SpecificVolume((1.0 / 999).CubicMetersPerKilogram()), - 999 + 999, }, - new object[] { Input.Temperature(20.DegreesCelsius()), 293.15 } + new object[] { Input.Temperature(20.DegreesCelsius()), 293.15 }, }; } From 84891aaa86c7456a419f2876e23acb1d35b2ae74 Mon Sep 17 00:00:00 2001 From: Vladimir Portyanikhin <86243191+portyanikhin@users.noreply.github.com> Date: Thu, 29 Aug 2024 15:12:01 +0300 Subject: [PATCH 3/3] Fix typos --- src/SharpProp/Fluids/IFluid.cs | 22 +++++++++++----------- src/SharpProp/Fluids/IMixture.cs | 2 +- src/SharpProp/Fluids/Mixture.cs | 2 +- src/SharpProp/SharpProp.csproj | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/SharpProp/Fluids/IFluid.cs b/src/SharpProp/Fluids/IFluid.cs index a8fc38e..220fbc1 100644 --- a/src/SharpProp/Fluids/IFluid.cs +++ b/src/SharpProp/Fluids/IFluid.cs @@ -36,7 +36,7 @@ IKeyedInput secondInput ); /// - /// The process of isentropic compression to a given pressure. + /// The process of isentropic compression to given pressure. /// /// Pressure. /// @@ -48,7 +48,7 @@ IKeyedInput secondInput IFluid IsentropicCompressionTo(Pressure pressure); /// - /// The process of compression to a given pressure. + /// The process of compression to given pressure. /// /// Pressure. /// @@ -64,7 +64,7 @@ IKeyedInput secondInput IFluid CompressionTo(Pressure pressure, Ratio isentropicEfficiency); /// - /// The process of isenthalpic expansion to a given pressure. + /// The process of isenthalpic expansion to given pressure. /// /// Pressure. /// The state of the fluid at the end of the process. @@ -74,7 +74,7 @@ IKeyedInput secondInput IFluid IsenthalpicExpansionTo(Pressure pressure); /// - /// The process of isentropic expansion to a given pressure. + /// The process of isentropic expansion to given pressure. /// /// Pressure. /// The state of the fluid at the end of the process. @@ -84,7 +84,7 @@ IKeyedInput secondInput IFluid IsentropicExpansionTo(Pressure pressure); /// - /// The process of expansion to a given pressure. + /// The process of expansion to given pressure. /// /// Pressure. /// @@ -164,10 +164,10 @@ IKeyedInput secondInput IFluid HeatingTo(SpecificEnergy enthalpy, Pressure? pressureDrop = null); /// - /// Returns a bubble point at a given pressure. + /// Returns a bubble point at given pressure. /// /// Pressure. - /// A bubble point at a given pressure. + /// A bubble point at given pressure. IFluid BubblePointAt(Pressure pressure); /// @@ -178,10 +178,10 @@ IKeyedInput secondInput IFluid BubblePointAt(Temperature temperature); /// - /// Returns a dew point at a given pressure. + /// Returns a dew point at given pressure. /// /// Pressure. - /// A dew point at a given pressure. + /// A dew point at given pressure. IFluid DewPointAt(Pressure pressure); /// @@ -192,11 +192,11 @@ IKeyedInput secondInput IFluid DewPointAt(Temperature temperature); /// - /// Returns a two-phase point at a given pressure. + /// Returns a two-phase point at given pressure. /// /// Pressure. /// Vapor quality. - /// Two-phase point at a given pressure. + /// Two-phase point at given pressure. IFluid TwoPhasePointAt(Pressure pressure, Ratio quality); /// diff --git a/src/SharpProp/Fluids/IMixture.cs b/src/SharpProp/Fluids/IMixture.cs index d85aabb..7e33b81 100644 --- a/src/SharpProp/Fluids/IMixture.cs +++ b/src/SharpProp/Fluids/IMixture.cs @@ -11,7 +11,7 @@ public interface IMixture IJsonable { /// - /// List of selected names of pure fluids. + /// List of selected pure fluid names. /// IReadOnlyList Fluids { get; } diff --git a/src/SharpProp/Fluids/Mixture.cs b/src/SharpProp/Fluids/Mixture.cs index 46a26b2..2d6e3c9 100644 --- a/src/SharpProp/Fluids/Mixture.cs +++ b/src/SharpProp/Fluids/Mixture.cs @@ -6,7 +6,7 @@ public class Mixture : AbstractFluid, IMixture private const string AvailableBackend = "HEOS"; /// - /// List of selected names of pure fluids. + /// List of selected pure fluid names. /// List of mass-based fractions. /// /// Invalid input! Fluids and Fractions should be of the same length. diff --git a/src/SharpProp/SharpProp.csproj b/src/SharpProp/SharpProp.csproj index 382ca28..3032df4 100644 --- a/src/SharpProp/SharpProp.csproj +++ b/src/SharpProp/SharpProp.csproj @@ -1,9 +1,9 @@ - A simple, full-featured, lightweight, cross-platform CoolProp wrapper for C# + Simple, full-featured, lightweight, cross-platform CoolProp wrapper for C# $(NoWarn);1591;NU5129;CA2101;SYSLIB1054 - A simple, full-featured, lightweight, cross-platform CoolProp wrapper for C# + Simple, full-featured, lightweight, cross-platform CoolProp wrapper for C# SharpProp