Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build_nuget_dont_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
10.0.x
9.0.x
8.0.x

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
10.0.x
9.0.x
8.0.x

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish_nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
10.0.x
9.0.x
8.0.x

Expand Down
19 changes: 17 additions & 2 deletions AltaSoft.Simpra.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31903.59
# Visual Studio Version 18
VisualStudioVersion = 18.1.11312.151
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AltaSoft.Simpra", "src\AltaSoft.Simpra\AltaSoft.Simpra.csproj", "{8141457D-F0B4-42C7-8C35-87B1CA94E705}"
EndProject
Expand All @@ -14,9 +14,19 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}"
ProjectSection(SolutionItems) = preProject
Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{C35F7D98-8981-47C6-A4FD-1ECB01BB940C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{A3869290-51B5-4402-95E6-E95D75A72ABA}"
ProjectSection(SolutionItems) = preProject
.github\workflows\build_nuget_dont_publish.yml = .github\workflows\build_nuget_dont_publish.yml
.github\workflows\dotnet.yml = .github\workflows\dotnet.yml
.github\workflows\publish_nuget.yml = .github\workflows\publish_nuget.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -43,6 +53,11 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{BC2F2760-4322-4C79-B476-9882A65491F8} = {C35F7D98-8981-47C6-A4FD-1ECB01BB940C}
{718B360D-CA84-FE14-AEC3-59E8ACBFC78D} = {C35F7D98-8981-47C6-A4FD-1ECB01BB940C}
{A3869290-51B5-4402-95E6-E95D75A72ABA} = {8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D84BAEEA-E226-4291-A9E6-A900751C5004}
EndGlobalSection
Expand Down
10 changes: 9 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
<Project>
<PropertyGroup>
<DefaultTargetFrameworks>net8.0;net9.0;net10.0</DefaultTargetFrameworks>
<OutputType>Library</OutputType>
<Nullable>enable</Nullable>
<LangVersion>Latest</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<AnalysisLevel>latest</AnalysisLevel>

<Authors>ALTA Software llc.</Authors>
<Product>Simpra</Product>
<Company>ALTA Software llc.</Company>
<Copyright>Copyright © 2024 ALTA Software llc.</Copyright>
<Version>1.0.16</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -29,4 +31,10 @@
<ItemGroup>
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<EmbedAllSources>false</EmbedAllSources>
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
</Project>
17 changes: 17 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<!-- Core Dependencies -->
<PackageVersion Include="AltaSoft.DomainPrimitives" Version="7.0.1" />
<PackageVersion Include="AltaSoft.DomainPrimitives.Generator" Version="7.0.1" />
<PackageVersion Include="Antlr4.Runtime.Standard" Version="4.13.1" />
<!-- Testing Dependencies -->
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
<PackageVersion Include="xunit" Version="2.9.3" />
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
<PackageVersion Include="coverlet.collector" Version="6.0.4" />
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
</ItemGroup>
</Project>
13 changes: 9 additions & 4 deletions src/AltaSoft.Simpra.Metadata/AltaSoft.Simpra.Metadata.csproj
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
<LangVersion>Latest</LangVersion>
<Nullable>enable</Nullable>
<TargetFrameworks>$(DefaultTargetFrameworks)</TargetFrameworks>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);CS1591;CS1701;CS1702;NU1507</NoWarn>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Title>AltaSoft.Simpra.Metadata</Title>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AltaSoft.DomainPrimitives" Version="5.1.1" />
<PackageReference Include="AltaSoft.DomainPrimitives" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AltaSoft.Simpra\AltaSoft.Simpra.csproj" />
</ItemGroup>

</Project>
10 changes: 6 additions & 4 deletions src/AltaSoft.Simpra/AltaSoft.Simpra.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net9.0;net8.0</TargetFrameworks>
<Nullable>enable</Nullable>
<TargetFrameworks>$(DefaultTargetFrameworks)</TargetFrameworks>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Title>AltaSoft.Simpra</Title>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AltaSoft.DomainPrimitives" Version="5.1.1" />
<PackageReference Include="Antlr4.Runtime.Standard" Version="4.13.1" />
<PackageReference Include="AltaSoft.DomainPrimitives" />
<PackageReference Include="Antlr4.Runtime.Standard" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
Expand All @@ -9,7 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
<PackageReference Include="BenchmarkDotNet" />
</ItemGroup>

<ItemGroup>
Expand Down
18 changes: 9 additions & 9 deletions tests/AltaSoft.Simpra.tests/AltaSoft.Simpra.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

Expand All @@ -11,23 +11,23 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AltaSoft.DomainPrimitives" Version="5.1.1" />
<PackageReference Include="AltaSoft.DomainPrimitives.Generator" Version="5.1.1" PrivateAssets="all" />
<PackageReference Include="AltaSoft.DomainPrimitives" />
<PackageReference Include="AltaSoft.DomainPrimitives.Generator" PrivateAssets="all" />

<PackageReference Include="coverlet.collector" Version="6.0.4">
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.13.0" />
<PackageReference Include="xunit" Version="2.9.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="3.0.2">
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup>
<DomainPrimitiveGenerator_GenerateSwaggerConverters>false</DomainPrimitiveGenerator_GenerateSwaggerConverters>
<DomainPrimitiveGenerator_GenerateOpenApiHelper>false</DomainPrimitiveGenerator_GenerateOpenApiHelper>
</PropertyGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions tests/AltaSoft.Simpra.tests/Models/TestModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ public class ListModel
}
public interface ICustomerModel
{
public Customer Customer { get; set; }
Customer Customer { get; set; }
}
public interface ITransferModel : ICustomerModel
{
public Transfer? Transfer { get; set; }
Transfer? Transfer { get; set; }

}

Expand All @@ -41,11 +41,11 @@ public class TestModel : BaseModel, ITransferModel
public int? Nint1 { get; set; }
public short Nint2 { get; set; } = 20;
public Xy Xy { get; set; } = new() { X = 1, Y = 2 };
public string Ccy { get; set; } = "GEL";
public string? Ccy { get; set; } = "GEL";
public IEnumerable<short> Values { get; set; } = [1, 2, 3];
public NonNegativeAmount? NullableAmount { get; set; }
public int? NullableIntegerProperty { get; set; }
public List<Customer2> CustomerList { get; set; }
public List<Customer2>? CustomerList { get; set; }

}

Expand Down
6 changes: 3 additions & 3 deletions tests/AltaSoft.Simpra.tests/Models/Transfer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
public class Transfer
{
public decimal Amount { get; set; }
public Customer2 Customer { get; set; }
public Customer2? Customer { get; set; }
public required string Currency { get; set; }
public List<int>? A { get; set; }
public List<TypeWithInnerList>? OuterList { get; set; }
}

public class TypeWithInnerList
{
public List<int> InnerList { get; set; }
public required List<int> InnerList { get; set; }
}
public class Customer2
{
public int Id { get; set; }
public string Name { get; set; }
public required string Name { get; set; }
}
2 changes: 1 addition & 1 deletion tests/AltaSoft.Simpra.tests/SimpraExpressionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public void BuiltInFunction_Substring_StartOnly_NullSource_ShouldBeEmpty()
model.Ccy = null;

var result = simpra.Execute<string, TestModel, IFunctions>(model, new TestFunctions(), "return substring(Ccy,1)");
Assert.Equal(null, result);
Assert.Null(result);
}

[Fact]
Expand Down
10 changes: 5 additions & 5 deletions tests/AltaSoft.Simpra.tests/SimpraMetaDataTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ public class MyChildClass : MyClass
public required string Name { get; set; }
[XmlIgnore]
public int Age { get; set; }
public MyClass1[] CollectionClass1 { get; set; }
public CountryCode[] Countries { get; set; }
public CountryCode Country { get; set; }
public Dictionary<int, int> Dictionary { get; set; }
public required MyClass1[] CollectionClass1 { get; set; }
public required CountryCode[] Countries { get; set; }
public required CountryCode Country { get; set; }
public required Dictionary<int, int> Dictionary { get; set; }

public void Child()
{
Expand All @@ -97,5 +97,5 @@ public void Father()
public class MyClass1
{
public int Info { get; set; }
public List<MyClass> CollectionMyClasses { get; set; }
public required List<MyClass> CollectionMyClasses { get; set; }
}
2 changes: 0 additions & 2 deletions tests/AltaSoft.Simpra.tests/UnitTestsSmartPurposeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ public void SetValue(string key, string? value)

public string GetValue(string key) => P.TryGetValue(key, out var result) ? result : string.Empty;
}


Loading