Skip to content
Snippets Groups Projects
Commit 22fbce8d authored by Petar Hristov's avatar Petar Hristov :speech_balloon:
Browse files

Update: Responsible project organization extension and update Coscine.ApiClient to version 1.9.4

parent a616611e
No related branches found
No related tags found
2 merge requests!43Dev,!41Update: Responsible project organization extension and update Coscine.ApiClient to version 1.9.4
Pipeline #1577953 passed
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<PackageReference Include="AutoMapper" Version="12.0.1" /> <PackageReference Include="AutoMapper" Version="12.0.1" />
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" /> <PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="12.0.1" />
<PackageReference Include="CommandLineParser" Version="2.9.1" /> <PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="Coscine.ApiClient" Version="1.9.3" /> <PackageReference Include="Coscine.ApiClient" Version="1.9.4" />
<PackageReference Include="dotNetRdf.Core" Version="3.1.1" /> <PackageReference Include="dotNetRdf.Core" Version="3.1.1" />
<PackageReference Include="GitLabApiClient" Version="1.8.1-beta.5" /> <PackageReference Include="GitLabApiClient" Version="1.8.1-beta.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
......
...@@ -36,7 +36,6 @@ public class MappingProfiles : Profile ...@@ -36,7 +36,6 @@ public class MappingProfiles : Profile
CreateMap<UserDto, UserReport>() CreateMap<UserDto, UserReport>()
.ForMember(ur => ur.Disciplines, opt => opt.MapFrom(dto => dto.Disciplines)) .ForMember(ur => ur.Disciplines, opt => opt.MapFrom(dto => dto.Disciplines))
.ForMember(ur => ur.Institutes, opt => opt.MapFrom(dto => dto.Institutes))
.ForMember(ur => ur.LatestActivity, opt => opt.MapFrom(dto => dto.LatestActivity)) .ForMember(ur => ur.LatestActivity, opt => opt.MapFrom(dto => dto.LatestActivity))
.ForMember(ur => ur.LoginProviders, opt => opt.MapFrom(dto => dto.Identities)) .ForMember(ur => ur.LoginProviders, opt => opt.MapFrom(dto => dto.Identities))
.ForMember(ur => ur.Organizations, opt => opt.MapFrom(dto => dto.Organizations)) .ForMember(ur => ur.Organizations, opt => opt.MapFrom(dto => dto.Organizations))
...@@ -50,11 +49,6 @@ public class MappingProfiles : Profile ...@@ -50,11 +49,6 @@ public class MappingProfiles : Profile
.ForMember(lp => lp.Id, opt => opt.MapFrom(dto => dto.Id)) .ForMember(lp => lp.Id, opt => opt.MapFrom(dto => dto.Id))
.ForMember(lp => lp.DisplayName, opt => opt.MapFrom(dto => dto.DisplayName)); .ForMember(lp => lp.DisplayName, opt => opt.MapFrom(dto => dto.DisplayName));
CreateMap<UserInstituteDto, Organization>()
.ForMember(o => o.ReadOnly, opt => opt.MapFrom(dto => dto.ReadOnly))
.ForMember(o => o.Name, opt => opt.MapFrom(dto => dto.DisplayName))
.ForMember(o => o.RorUrl, opt => opt.MapFrom(dto => dto.Uri));
CreateMap<UserOrganizationDto, Organization>() CreateMap<UserOrganizationDto, Organization>()
.ForMember(o => o.ReadOnly, opt => opt.MapFrom(dto => dto.ReadOnly)) .ForMember(o => o.ReadOnly, opt => opt.MapFrom(dto => dto.ReadOnly))
.ForMember(o => o.Name, opt => opt.MapFrom(dto => dto.DisplayName)) .ForMember(o => o.Name, opt => opt.MapFrom(dto => dto.DisplayName))
...@@ -64,6 +58,11 @@ public class MappingProfiles : Profile ...@@ -64,6 +58,11 @@ public class MappingProfiles : Profile
.ForMember(o => o.Name, opt => opt.MapFrom(dto => dto.DisplayName)) .ForMember(o => o.Name, opt => opt.MapFrom(dto => dto.DisplayName))
.ForMember(o => o.RorUrl, opt => opt.MapFrom(dto => dto.Uri)); .ForMember(o => o.RorUrl, opt => opt.MapFrom(dto => dto.Uri));
CreateMap<ProjectOrganizationDto, ProjectOrganization>()
.ForMember(po => po.Name, opt => opt.MapFrom(dto => dto.DisplayName))
.ForMember(po => po.RorUrl, opt => opt.MapFrom(dto => dto.Uri))
.ForMember(po => po.Responsible, opt => opt.MapFrom(dto => dto.Responsible));
CreateMap<VisibilityDto, ProjectVisibility>() CreateMap<VisibilityDto, ProjectVisibility>()
.ForMember(pv => pv.Id, opt => opt.MapFrom(dto => dto.Id)) .ForMember(pv => pv.Id, opt => opt.MapFrom(dto => dto.Id))
.ForMember(pv => pv.DisplayName, opt => opt.MapFrom(dto => dto.DisplayName)); .ForMember(pv => pv.DisplayName, opt => opt.MapFrom(dto => dto.DisplayName));
......
using System.Text.Json.Serialization;
namespace Coscine.KpiGenerator.Models;
public record ProjectOrganization
{
/// <summary>
/// Organizaiton name from GitLab project's description
/// </summary>
/// <example>RWTH Aachen University</example>
[JsonPropertyName("Name")]
public string Name { get; init; } = null!;
/// <summary>
/// Organizaiton ROR URL from GitLab project's title
/// </summary>
/// <example>https://ror.org/04xfq0f34</example>
[JsonPropertyName("RorUrl")]
public string RorUrl { get; init; } = null!;
/// <summary>
/// Determines if the organization is Responsible for a given project.
/// </summary>
public bool Responsible { get; set; }
}
\ No newline at end of file
...@@ -6,8 +6,6 @@ public record UserReport ...@@ -6,8 +6,6 @@ public record UserReport
public IReadOnlyList<Organization> Organizations { get; init; } = null!; public IReadOnlyList<Organization> Organizations { get; init; } = null!;
public IReadOnlyList<Organization> Institutes { get; init; } = null!;
public IReadOnlyList<Discipline> Disciplines { get; init; } = null!; public IReadOnlyList<Discipline> Disciplines { get; init; } = null!;
public IReadOnlyList<LoginProvider> LoginProviders { get; init; } = null!; public IReadOnlyList<LoginProvider> LoginProviders { get; init; } = null!;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment