Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1928 do not export psv #1929

Merged
merged 22 commits into from
Mar 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1ccded3
1822 impor observed data crash fixed (#1823)
georgeDaskalakis Dec 9, 2022
edaca64
#1837 fixed (#1838)
georgeDaskalakis Dec 16, 2022
267e795
1836 simulation error not propagated (#1835)
rwmcintosh Dec 16, 2022
8d9d6f4
Fixes #1821 comma decimal separator (#1840)
rwmcintosh Dec 17, 2022
765c715
1843 no icon overlay (#1844)
msevestre Dec 17, 2022
ec39acb
Fixes #1845 show relevant formula (#1846)
msevestre Dec 17, 2022
1ebaf7b
Fixes #1853 default visibility (#1854)
msevestre Jan 3, 2023
4b487b8
1858 LLOQ unit case sensitive fixed (#1859)
georgeDaskalakis Jan 9, 2023
cb885cb
1848 vague invalid file error description fixed (#1849)
georgeDaskalakis Jan 9, 2023
20edf28
1860 fixed (#1861)
georgeDaskalakis Jan 9, 2023
c035e3d
Fixes #1864 Scaling for resizable views (#1865)
rwmcintosh Jan 10, 2023
dc07c11
1851 unnecessary message (#1857)
georgeDaskalakis Jan 12, 2023
2529fd7
1781 chart grouping inconsistent (#1868)
georgeDaskalakis Jan 12, 2023
6ef98c4
1872 fixed (#1873)
georgeDaskalakis Jan 25, 2023
7a95db8
Updated SimModel (#1875)
Yuri05 Jan 25, 2023
91aef0a
1886 importer unit for fraction not recognized (#1892)
georgeDaskalakis Feb 9, 2023
3a9d11c
Fixes #1925 (#1926)
msevestre Mar 18, 2023
e07b79d
Fixes #1925 (#1927)
msevestre Mar 18, 2023
e4dc2de
Merge remote-tracking branch 'upstream/develop' into 1928-do-not-expo…
msevestre Mar 19, 2023
571cc46
Fixes #1928 do not export PSV
msevestre Mar 19, 2023
03ae808
Update tests to account for the fact that PSV are not created automat…
msevestre Mar 19, 2023
aba985e
Ensure that serializer is available for eveyrone
msevestre Mar 19, 2023
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
52 changes: 26 additions & 26 deletions src/Common/ChartLayouts/Standard View.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Common/ChartLayouts/Tabbed View.xml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Common/ChartLayouts/TwoTabs View.xml

Large diffs are not rendered by default.

10 changes: 2 additions & 8 deletions src/OSPSuite.Assets.Images/ApplicationIcon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,14 @@ private static SvgImage bytesToImage(byte[] bytes)

public static implicit operator SvgImage(ApplicationIcon icon) => icon.ToSvgImage();

public static implicit operator Image(ApplicationIcon icon) => icon.ToImage();

public virtual Image ToImage() => ToImage(IconSizes.Size16x16);

public virtual Image ToImage(IconSize imageSize)
{
return _bitmap?.Render(imageSize, null)
?? new Bitmap(imageSize.Width, imageSize.Height);
/*Bitmap target = new Bitmap(
(int)imageSize.Width,
(int)imageSize.Height);
using (Graphics g = Graphics.FromImage(target))
{
_bitmap.RenderToGraphics(g,
SvgPaletteHelper.GetSvgPalette(LookAndFeel, ObjectState.Normal));
}*/
}

public virtual SvgImage ToSvgImage() => _image;
Expand Down
25 changes: 24 additions & 1 deletion src/OSPSuite.Assets.Images/Icons/ResidualVsTimeAnalysisGreen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 15 additions & 1 deletion src/OSPSuite.Assets/UIConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ public static class Captions
public static readonly string No = "No";
public static readonly string Yes = "Yes";
public static readonly string ReallyRemoveObservedDataFromSimulation = $"Really remove {ObjectTypes.ObservedData} from the simulation?\nHint: {ObjectTypes.ObservedData} will not be deleted from the project";
public static readonly string SimulationWasCanceled = "Simulation was canceled";

public static string ShouldWatermarkBeUsedForChartExportToClipboard(string applicationName, string optionLocation)
{
Expand Down Expand Up @@ -457,8 +458,11 @@ public static class Importer
public static readonly string NewDataStetsWillBeImported = "New datasets that will be imported";
public static readonly string ReloadData = "Reload Data";
public static readonly string SeparatorSelection = "Separator Selection";
public static readonly string DecimalSeparator = "Decimal Separator";
public static readonly string ColumnSeparator = "Column Separator";

public static string LLOQInconsistentValuesAt(string dataRepositoryName) => $"There were different LLOQ values detected for the data from a single source. Please check data under name {dataRepositoryName}. Are you sure you want to continue with import?";
public static string CsvSeparatorDescription(string fileName) => $"Please select the separator for the file \r\n'{fileName}':";
public static string CsvSeparatorInstructions(string fileName) => $"Please select the separators for '{fileName}':";

public static readonly string SheetFormatNotSupported =
"The format of the sheet you are trying to use is not supported.You can find a documentation of the supported formats<href =https://docs.open-systems-pharmacology.org/shared-tools-and-example-workflows/import-edit-observed-data#supported-formats > here </href>";
Expand Down Expand Up @@ -1361,12 +1365,22 @@ public static class Error
public static readonly string CannotRemoveBaseGridColumnStillInUse = "Cannot remove base grid column still used by other columns";
public static readonly string SimpleParseErrorMessage = "There were errors while parsing your data. Navigate to the sheets to read the concrete error.";
public static readonly string FoldValueMustBeGreaterThanOne = "Fold value must be a number greater than one.";
public static readonly string ImporterEmptyFile = "The file you are trying to load is empty.";

public static string NoUnitColumnValues(string mappingName) => $"No values for the unit were found in the excel column mapped for '{mappingName}' \n";

public static string ParseErrorMessage(IEnumerable<string> errors) => $"There were errors while parsing your data: {string.Join(". ", errors)}";

public static string ErrorWhenPlottingDataRepository(int sheetName, string exceptionMessage) =>
$"It was not possible to plot the data sets. Please, check your configuration for any missing grouping or meta data parameter. An error occur while plotting data set number:{sheetName + 1} produced the following error: {exceptionMessage}";

public static string SheetWithDuplicateHeader(string sheetName, IEnumerable<string> duplicateHeaders)
{
var sb = new StringBuilder();
sb.AppendLine($"In sheet {sheetName} the headers \n \n{string.Join("\n", duplicateHeaders)} \nare duplicated.");
return sb.ToString();
}

public static string InvalidObservedDataFile(string exceptionMessage)
{
var sb = new StringBuilder();
Expand Down
4 changes: 2 additions & 2 deletions src/OSPSuite.Core/Comparison/BuildingBlockDiffBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ private string startValueDisplayFor(TStartValue startValue)
}
}

public class MoleculeStartValueBuildingBlockDiffBuilder : StartValueBuildingBlockDiffBuilder<IMoleculeStartValuesBuildingBlock, MoleculeStartValue>
public class MoleculeStartValueBuildingBlockDiffBuilder : StartValueBuildingBlockDiffBuilder<MoleculeStartValuesBuildingBlock, MoleculeStartValue>
{
public MoleculeStartValueBuildingBlockDiffBuilder(ObjectBaseDiffBuilder objectBaseDiffBuilder, EnumerableComparer enumerableComparer) : base(objectBaseDiffBuilder, enumerableComparer)
{
}
}

public class ParameterStartValueBuildingBlockDiffBuilder : StartValueBuildingBlockDiffBuilder<IParameterStartValuesBuildingBlock, ParameterStartValue>
public class ParameterStartValueBuildingBlockDiffBuilder : StartValueBuildingBlockDiffBuilder<ParameterStartValuesBuildingBlock, ParameterStartValue>
{
public ParameterStartValueBuildingBlockDiffBuilder(ObjectBaseDiffBuilder objectBaseDiffBuilder, EnumerableComparer enumerableComparer) : base(objectBaseDiffBuilder, enumerableComparer)
{
Expand Down
2 changes: 1 addition & 1 deletion src/OSPSuite.Core/Comparison/ComparerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class ComparerSettings
public FormulaComparison FormulaComparison { get; set; }

/// <summary>
/// Specifies if hidden entities for PKSim (such as hidden parameters or constant formula) should be part of the comparison. This settings is application dependant (default is <c>false</c>)
/// Specifies if hidden entities for PKSim (such as hidden parameters or constant formula) should be part of the comparison. This settings is application dependent (default is <c>false</c>)
/// </summary>
public bool CompareHiddenEntities { get; set; }

Expand Down
4 changes: 2 additions & 2 deletions src/OSPSuite.Core/Converters/v6_1/Converter60To61.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class Converter60To61 : IObjectConverter,
IVisitor<IBuildConfiguration>,
IVisitor<IModelCoreSimulation>,
IVisitor<IEventGroupBuildingBlock>,
IVisitor<IMoleculeStartValuesBuildingBlock>
IVisitor<MoleculeStartValuesBuildingBlock>

{
private readonly IIdGenerator _idGenerator;
Expand Down Expand Up @@ -77,7 +77,7 @@ public void Visit(IEventGroupBuildingBlock eventGroupBuildingBlock)
_converted = false;
}

public void Visit(IMoleculeStartValuesBuildingBlock moleculeStartValuesBuilding)
public void Visit(MoleculeStartValuesBuildingBlock moleculeStartValuesBuilding)
{
Visit(moleculeStartValuesBuilding.DowncastTo<IBuildingBlock>());
moleculeStartValuesBuilding.Each(msv => msv.NegativeValuesAllowed = true);
Expand Down
4 changes: 2 additions & 2 deletions src/OSPSuite.Core/Converters/v7_3/Converter710To730.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace OSPSuite.Core.Converters.v7_3
{
public class Converter710To730 : IObjectConverter,
IVisitor<IParameterStartValuesBuildingBlock>,
IVisitor<ParameterStartValuesBuildingBlock>,
IVisitor<IPassiveTransportBuildingBlock>,
IVisitor<ISimulationSettings>,
IVisitor<IEventGroupBuildingBlock>,
Expand Down Expand Up @@ -63,7 +63,7 @@ public void Visit(ISimulation simulation)
ConvertAllParametersIn(simulation.Model.Root);
}

public void Visit(IParameterStartValuesBuildingBlock parameterStartValuesBuildingBlock)
public void Visit(ParameterStartValuesBuildingBlock parameterStartValuesBuildingBlock)
{
parameterStartValuesBuildingBlock.Each(ConvertWithDefaultStateObjectToDefault);
}
Expand Down
8 changes: 4 additions & 4 deletions src/OSPSuite.Core/Domain/Builder/BuildConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public interface IBuildConfiguration : IVisitable<IVisitor>
IReactionBuildingBlock Reactions { set; get; }
IPassiveTransportBuildingBlock PassiveTransports { set; get; }
ISpatialStructure SpatialStructure { set; get; }
IMoleculeStartValuesBuildingBlock MoleculeStartValues { set; get; }
IParameterStartValuesBuildingBlock ParameterStartValues { set; get; }
MoleculeStartValuesBuildingBlock MoleculeStartValues { set; get; }
ParameterStartValuesBuildingBlock ParameterStartValues { set; get; }
IObserverBuildingBlock Observers { get; set; }
IEventGroupBuildingBlock EventGroups { get; set; }
ISimulationSettings SimulationSettings { get; set; }
Expand Down Expand Up @@ -135,8 +135,8 @@ public class BuildConfiguration : IBuildConfiguration
private readonly List<ICoreCalculationMethod> _allCalculationMethods;
private readonly ICache<IObjectBase, IObjectBase> _builderCache;
public virtual ISpatialStructure SpatialStructure { get; set; }
public virtual IMoleculeStartValuesBuildingBlock MoleculeStartValues { get; set; }
public virtual IParameterStartValuesBuildingBlock ParameterStartValues { get; set; }
public virtual MoleculeStartValuesBuildingBlock MoleculeStartValues { get; set; }
public virtual ParameterStartValuesBuildingBlock ParameterStartValues { get; set; }
public virtual IObserverBuildingBlock Observers { get; set; }
public virtual IMoleculeBuildingBlock Molecules { get; set; }
public virtual IReactionBuildingBlock Reactions { get; set; }
Expand Down
4 changes: 2 additions & 2 deletions src/OSPSuite.Core/Domain/Builder/MoleculeBuildingBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public interface IMoleculeBuildingBlock : IBuildingBlock<IMoleculeBuilder>
{
IMoleculeBuilder this[string moleculeName] { get; }
IEnumerable<IMoleculeBuilder> AllFloating();
IEnumerable<IMoleculeBuilder> AllPresentFor(IMoleculeStartValuesBuildingBlock moleculesStartValues);
IEnumerable<IMoleculeBuilder> AllPresentFor(MoleculeStartValuesBuildingBlock moleculesStartValues);
}

public class MoleculeBuildingBlock : BuildingBlock<IMoleculeBuilder>, IMoleculeBuildingBlock
Expand All @@ -27,7 +27,7 @@ public IEnumerable<IMoleculeBuilder> AllFloating()
return this.Where(x => x.IsFloating);
}

public IEnumerable<IMoleculeBuilder> AllPresentFor(IMoleculeStartValuesBuildingBlock moleculesStartValues)
public IEnumerable<IMoleculeBuilder> AllPresentFor(MoleculeStartValuesBuildingBlock moleculesStartValues)
{
var moleculeNames = (from moleculeStartValue in moleculesStartValues
where moleculeStartValue.IsPresent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,44 @@
using OSPSuite.Assets;
using OSPSuite.Core.Domain.Services;

namespace OSPSuite.Core.Domain.Builder
{
public interface IMoleculeStartValuesBuildingBlock : IStartValuesBuildingBlock<MoleculeStartValue>
{
}

public class MoleculeStartValuesBuildingBlock : StartValueBuildingBlock<MoleculeStartValue>, IMoleculeStartValuesBuildingBlock
public class MoleculeStartValuesBuildingBlock : StartValueBuildingBlock<MoleculeStartValue>
{
public MoleculeStartValuesBuildingBlock()
{
Icon = IconNames.MOLECULE_START_VALUES;
}

/// <summary>
/// Id of the spatial structure used to create the parameter start values.
/// </summary>
public string SpatialStructureId { get; set; }

/// <summary>
/// Id of the molecule building block used to create the parameter start values
/// </summary>
public string MoleculeBuildingBlockId { get; set; }

public bool Uses(IBuildingBlock buildingBlock)
{
return refersTo(buildingBlock, SpatialStructureId)
|| refersTo(buildingBlock, MoleculeBuildingBlockId);
}

private bool refersTo(IBuildingBlock buildingBlock, string idToCheck)
{
return string.Equals(idToCheck, buildingBlock.Id);
}

public override void UpdatePropertiesFrom(IUpdatable source, ICloneManager cloneManager)
{
base.UpdatePropertiesFrom(source, cloneManager);
var sourceMoleculeStartValueBuildingBlock = source as MoleculeStartValuesBuildingBlock;
if (sourceMoleculeStartValueBuildingBlock == null) return;

MoleculeBuildingBlockId = sourceMoleculeStartValueBuildingBlock.MoleculeBuildingBlockId;
SpatialStructureId = sourceMoleculeStartValueBuildingBlock.SpatialStructureId;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@

namespace OSPSuite.Core.Domain.Builder
{
public interface IParameterStartValuesBuildingBlock : IStartValuesBuildingBlock<ParameterStartValue>
{
}

public class ParameterStartValuesBuildingBlock : StartValueBuildingBlock<ParameterStartValue>, IParameterStartValuesBuildingBlock
public class ParameterStartValuesBuildingBlock : StartValueBuildingBlock<ParameterStartValue>
{
public ParameterStartValuesBuildingBlock()
{
Expand Down
40 changes: 0 additions & 40 deletions src/OSPSuite.Core/Domain/Builder/StartValueBuildingBlock.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using OSPSuite.Utility.Collections;
using OSPSuite.Utility.Extensions;
using OSPSuite.Utility.Visitor;
using OSPSuite.Core.Domain.Services;

namespace OSPSuite.Core.Domain.Builder
{
Expand All @@ -14,22 +13,6 @@ public interface IStartValuesBuildingBlock<T> : IBuildingBlock<T> where T : clas
/// <returns></returns>
T this[ObjectPath objectPath] { get; set; }

/// <summary>
/// Id of the spatial structure used to create the parameter start values.
/// </summary>
string SpatialStructureId { get; set; }

/// <summary>
/// Id of the molecule building block used to create the parameter start values
/// </summary>
string MoleculeBuildingBlockId { get; set; }

/// <summary>
/// Checks whether the given building block is used as a reference
/// </summary>
/// <param name="buildingBlock">The building block being checked for reference</param>
/// <returns>true if the building block is referred to by the start value building block</returns>
bool Uses(IBuildingBlock buildingBlock);

/// <summary>
/// Removes the start value with path <paramref name="objectPath" /> if available. Does nothing otherwise
Expand All @@ -39,35 +22,12 @@ public interface IStartValuesBuildingBlock<T> : IBuildingBlock<T> where T : clas

public abstract class StartValueBuildingBlock<T> : PathAndValueEntityBuildingBlock<T>, IStartValuesBuildingBlock<T> where T : class, IStartValue
{
public string SpatialStructureId { get; set; }
public string MoleculeBuildingBlockId { get; set; }

public bool Uses(IBuildingBlock buildingBlock)
{
return refersTo(buildingBlock, SpatialStructureId)
|| refersTo(buildingBlock, MoleculeBuildingBlockId);
}

private bool refersTo(IBuildingBlock buildingBlock, string idToCheck)
{
return string.Equals(idToCheck, buildingBlock.Id);
}

protected StartValueBuildingBlock()
{
_allValues = new Cache<ObjectPath, T>(x => x.Path, x => null);
}

public override void UpdatePropertiesFrom(IUpdatable source, ICloneManager cloneManager)
{
base.UpdatePropertiesFrom(source, cloneManager);
var sourceStartValeBuidlingBlock = source as IStartValuesBuildingBlock<T>;
if (sourceStartValeBuidlingBlock == null) return;

MoleculeBuildingBlockId = sourceStartValeBuidlingBlock.MoleculeBuildingBlockId;
SpatialStructureId = sourceStartValeBuidlingBlock.SpatialStructureId;
}

public override void AcceptVisitor(IVisitor visitor)
{
base.AcceptVisitor(visitor);
Expand Down
Loading