Skip to content

Commit

Permalink
Version 7.4.0 merged from develop
Browse files Browse the repository at this point in the history
Version 7.4.0
  • Loading branch information
msevestre authored Jan 7, 2019
2 parents 88690a5 + 5c9987e commit 4569f96
Show file tree
Hide file tree
Showing 131 changed files with 1,147 additions and 896 deletions.
4 changes: 2 additions & 2 deletions appveyor-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ configuration: Debug
image: Visual Studio 2017

environment:
app_version: '7.3.0'
app_version: '7.4.0'

version: '%app_version%.{build}'
version: '$(app_version).{build}'

assembly_info:
patch: true
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ configuration: Debug
image: Visual Studio 2017

environment:
app_version: '7.3.0'
app_version: '7.4.0'

version: '%app_version%.{build}'
version: '$(app_version).{build}'

assembly_info:
patch: true
Expand Down
46 changes: 23 additions & 23 deletions src/Common/ChartLayouts/Standard View.xml

Large diffs are not rendered by default.

35 changes: 18 additions & 17 deletions src/Common/ChartLayouts/Tabbed View.xml

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions src/Common/ChartLayouts/TwoTabs View.xml

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions src/Common/ChartLayouts/Variable X-Axis View.xml

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions src/OSPSuite.Assets/ApplicationIcons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public static class ApplicationIcons
public static readonly ApplicationIcon Next = AddNamedIcon(Icons.Next, "Next");
public static readonly ApplicationIcon NonCompetitiveInhibition = AddNamedIcon(Icons.NonCompetitiveInhibition, "NonCompetitiveInhibition");
public static readonly ApplicationIcon ObservedData = AddNamedIcon(Icons.ObservedData, IconNames.OBSERVED_DATA);
public static readonly ApplicationIcon ObservedDataCompound = AddNamedIcon(Icons.ObservedDataCompound, "ObservedDataCompound");
public static readonly ApplicationIcon ObservedDataCompound = AddNamedIcon(Icons.ObservedDataForMolecule, "ObservedDataCompound");
public static readonly ApplicationIcon ObservedDataFolder = AddNamedIcon(Icons.ObservedDataFolder, "ObservedDataFolder");
public static readonly ApplicationIcon Observer = AddNamedIcon(Icons.Observer, IconNames.OBSERVER);
public static readonly ApplicationIcon ObserverFolder = AddNamedIcon(Icons.ObserverFolder, "ObserverFolder");
Expand Down Expand Up @@ -285,7 +285,7 @@ public static class ApplicationIcons
public static readonly ApplicationIcon PopulationSimulationSettings = AddNamedIcon(Icons.SimulationSettings, "PopulationSimulationSettings");
public static readonly ApplicationIcon PortalVein = AddNamedIcon(Icons.PortalVein, "PortalVein");
public static readonly ApplicationIcon Previous = AddNamedIcon(Icons.Previous, "Previous");
public static readonly ApplicationIcon ProjectDescription = AddNamedIcon(Icons.ObservedData, "ProjectDescription");
public static readonly ApplicationIcon ProjectDescription = AddNamedIcon(Icons.Description, "ProjectDescription");
public static readonly ApplicationIcon Protein = AddNamedIcon(Icons.Protein, "Protein");
public static readonly ApplicationIcon ProteinExpression = AddNamedIcon(Icons.ProteinExpression, "ProteinExpression");
public static readonly ApplicationIcon ProteinExpressionError = AddNamedIcon(Icons.ProteinExpressionError, "ProteinExpressionError");
Expand Down Expand Up @@ -478,6 +478,9 @@ public static class ApplicationIcons
public static readonly ApplicationIcon SnapshotImport = AddNamedIcon(Icons.SnapshotImport, "SnapshotImport");
public static readonly ApplicationIcon File = AddNamedIcon(Icons.ProjectNew, "File");
public static readonly ApplicationIcon Redo = AddNamedIcon(Icons.Redo, "Redo");
public static readonly ApplicationIcon ClearHistory = AddNamedIcon(Icons.Delete, "ClearHistory");
public static readonly ApplicationIcon AmountObservedData = AddNamedIcon(Icons.AmountObservedData, "AmountObservedData");
public static readonly ApplicationIcon AmountObservedDataForMolecule = AddNamedIcon(Icons.AmountObservedDataForMolecule, "AmountObservedDataForMolecule");


// All icons should go at the end of the preceding list, before this delimiting icon - EmptyIcon
Expand Down
30 changes: 20 additions & 10 deletions src/OSPSuite.Assets/Icons.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions src/OSPSuite.Assets/Icons.resx
Original file line number Diff line number Diff line change
Expand Up @@ -529,9 +529,6 @@
<data name="ObservedData" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Icons\ObservedData.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ObservedDataCompound" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Icons\ObservedDataCompound.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ObservedDataFolder" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Icons\ObservedDataFolder.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
Expand Down Expand Up @@ -1363,4 +1360,10 @@
<data name="SnapshotImport" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Icons\SnapshotImport.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AmountObservedData" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Icons\AmountObservedData.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="AmountObservedDataForMolecule" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Icons\AmountObservedDataForMolecule.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file added src/OSPSuite.Assets/Icons/AmountObservedData.ico
Binary file not shown.
Binary file not shown.
Binary file removed src/OSPSuite.Assets/Icons/ObservedDataCompound.ico
Binary file not shown.
11 changes: 7 additions & 4 deletions src/OSPSuite.Assets/OSPSuite.Assets.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<PlatformTarget>AnyCPU</PlatformTarget>
<DocumentationFile>bin\Debug\OSPSuite.Assets.xml</DocumentationFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>
Expand Down Expand Up @@ -540,9 +540,6 @@
<ItemGroup>
<None Include="Icons\ObservedData.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Icons\ObservedDataCompound.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Icons\ObservedDataFolder.ico" />
</ItemGroup>
Expand Down Expand Up @@ -1089,6 +1086,12 @@
<ItemGroup>
<None Include="Icons\SnapshotImport.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Icons\AmountObservedData.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Icons\AmountObservedDataForMolecule.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
Expand Down
34 changes: 23 additions & 11 deletions src/OSPSuite.Assets/UIConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ public static class Captions
public static readonly string QualificationPlanFolder = "Qualification Plans";
public static readonly string LLOQ = "LLOQ";
public static readonly string Delete = "Delete";
public static readonly string Clear = "Clear";
public static readonly string SelectSimulations = "Select Simulations";
public const string AddButtonText = "Add";
public const string RemoveButtonText = "Remove";
Expand Down Expand Up @@ -317,6 +318,13 @@ public static string RenameEntityCaption(string type, string name)
return $"New name for {type} '{name}'";
}

public static string ReallyDeleteObservedData(string observedDataName)
{
return $"Really delete observed data '{observedDataName}' from project";
}

public static string ReallyClearHistory= "Really clear command history? This action is irreversible even if the project is not saved afterwards.";

public static class Importer
{
public static readonly string ImportAll = "Import All";
Expand Down Expand Up @@ -410,6 +418,7 @@ public static class Commands
public static readonly string EditComment = "Edit Comment";
public static readonly string Rollback = "Rollback";
public static readonly string ExtendedDescription = "Extended Description";
public static readonly string ClearHistory = "Clear History";

public static string CommentViewCaption(int historyItemState) => $"Edit comments for state '{historyItemState}' ...";
}
Expand Down Expand Up @@ -1016,13 +1025,7 @@ public static string NumberOfSelectedParameters(int numberOfParameters)
{
return $"Number of selected parameters: {numberOfParameters}";
}
}

public static string ReallyDeleteObservedData(string observedDataName)
{
return $"Really delete observed data '{observedDataName}' from project";
}

}

public static class Chart
{
Expand Down Expand Up @@ -1098,6 +1101,7 @@ public static class FontAndSizeSettings
public static class Error
{
public static readonly string NameIsRequired = "Name is required.";
public static readonly string ValueIsRequired = "Value is required.";
public static readonly string DescriptionIsRequired = "Description is required";
public static readonly string RenameSameNameError = "The new name is the same as the original one.";
public static readonly string CanOnlyCompareTwoObjectsAtATime = "Object comparison is only available for two objects at the same time.";
Expand Down Expand Up @@ -1205,7 +1209,7 @@ public static string IdentificationParameterCannotBeFound(string name)
}

public static string EntityIsInvalid(string entityType, string name)
{
{
return $"{entityType} '{name}' is invalid";
}

Expand All @@ -1217,8 +1221,13 @@ public static string CannotFindSimulationResultsForOutput(string fullOutputPath)
public static readonly string InvalidPKValueType = "PK value {0} has invalid type (e.g. complex)";
public static readonly string TableFormulaWithOffsetUsesNonTableFormulaObject = "Object used in table formula with offset must be based an a table formula";
public static readonly string ScaleFactorShouldBeGreaterThanZero = "Scale factor should be greater than 0";
public static readonly string InvalidChecksum = "File might have been tampered with. Checksum is not valid";
public static readonly string TimeNotStrictlyMonotone = "The time column is not strictly monotonically increasing. Ensure that time always increases (e.g. 0.5, 1, 2, 4 hours).";

public static string TimeNotStrictlyMonotone(double valueBefore, double valueAfter, string displayUnit)
{
var hint = Equals(valueAfter, valueBefore) ? $"{valueBefore} {displayUnit} is duplicated" : $"{valueBefore} {displayUnit} is immediately followed by {valueAfter} {displayUnit}";

return $"The time column is not strictly monotonically increasing ({hint}).\nEnsure that time always increases (e.g. 0.5, 1, 2, 4 hours).";
}

public static string UnableToFindEntityWithAlias(string alias) => $"Unable to find entity with alias '{alias}'";

Expand Down Expand Up @@ -1645,6 +1654,8 @@ public static class MenuNames
public static readonly string RunSensitivityAnalysis = "Run";
public static readonly string StopSensitivityanalysis = "Stop";
public static readonly string StartSensitivityanalysis = "Start Sensitivity Analysis...";
public static readonly string ClearHistory = "Clear History";
public static readonly string Help = "Help";

public static string CompareObjects(string objectType)
{
Expand Down Expand Up @@ -1925,6 +1936,7 @@ public static class ToolTips
public static readonly string DefaultLineStyle = string.Format("Sets the line style for each curve added to this axis.{0}Setting 'None' will use the default style for the curve.{0}Default line style has no effect for X axis.", Environment.NewLine);
public static readonly string DefaultLineStyleTitle = "Default Line Style for Curve";
public static readonly string DoNotShowVersionUpdate = "Ignore this update";
public static readonly string ClearHistory = "Clear the project history. This action is irreversible";

public static string ToolTipForLLOQ(string seriesName, string lloq)
{
Expand Down Expand Up @@ -2016,7 +2028,7 @@ public static class Journal
}
}

public class ObservedData
public static class ObservedData
{
public static readonly string ObservedDataOrganDescription = "Organ where the data was measured";
public static readonly string ObservedDataCompartmentDescription = "Compartment where the data was measured";
Expand Down
12 changes: 7 additions & 5 deletions src/OSPSuite.Core/Commands/Core/HistoryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ public class HistoryManager<TExecutionContext> : IHistoryManager<TExecutionConte
private readonly IRollBackCommandFactory _rollBackCommandFactory;
private int _currentState;

private static int DEFAULT_STATE = 1;

public event Action<IHistoryItem> CommandAdded = delegate { };

public HistoryManager(TExecutionContext executionContext, IEventPublisher eventPublisher, IExceptionManager exceptionManager, IHistoryItemFactory historyItemFactory, IRollBackCommandFactory rollBackCommandFactory)
Expand All @@ -90,7 +92,7 @@ internal HistoryManager(TExecutionContext executionContext, IEventPublisher even
_history = history;
_historyItemFactory = historyItemFactory;
_rollBackCommandFactory = rollBackCommandFactory;
_currentState = 1;
resetState();
}

public void AddToHistory(ICommand commandToAddToHistory)
Expand Down Expand Up @@ -124,16 +126,16 @@ private void addToHistory(ICommand commandToAddToHistory, int state)
addToHistory(_historyItemFactory.CreateFor(commandToAddToHistory), state);
}

public IEnumerable<IHistoryItem> History
{
get { return _history; }
}
public IEnumerable<IHistoryItem> History => _history;

public void Clear()
{
_history.Clear();
resetState();
}

private void resetState() => _currentState = DEFAULT_STATE;

public void Undo()
{
if(!CanUndo()) return;
Expand Down
6 changes: 3 additions & 3 deletions src/OSPSuite.Core/Commands/DataRowData.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using OSPSuite.Utility.Collections;
using OSPSuite.Core.Domain.Data;
using OSPSuite.Utility.Collections;
using OSPSuite.Utility.Extensions;
using OSPSuite.Core.Domain.Data;

namespace OSPSuite.Core.Commands
{
Expand All @@ -15,7 +15,7 @@ public DataRowData()
/// This is the cache of the column key-value pairs that must be set by the add
/// Note that it does not include the basegrid column
/// </summary>
public Cache<string, float> Data { get; private set; }
public Cache<string, float> Data { get; }

/// <summary>
/// This is the value to be used for the basegrid column of the data repository
Expand Down
2 changes: 1 addition & 1 deletion src/OSPSuite.Core/Domain/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static class Constants

public static readonly string PRODUCT_SITE = "www.open-systems-pharmacology.org";
public static readonly string PRODUCT_SITE_DOWNLOAD = "http://setup.open-systems-pharmacology.org";
public static readonly string HELP_NAMESPACE = "Open Systems Pharmacology Suite.chm";
public static readonly string HELP_NAMESPACE = "http://docs.open-systems-pharmacology.org";
public static readonly string FORUM_SITE = "forum.open-systems-pharmacology.org";
public static readonly string SUITE_NAME = "Open Systems Pharmacology Suite";

Expand Down
29 changes: 15 additions & 14 deletions src/OSPSuite.Core/Domain/Data/BaseGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,19 @@ public BaseGrid(string id, string name, IDimension dimension) : base(id, name, d

public override IReadOnlyList<float> Values
{
get { return _values; }
get => _values;
set
{
//check strong monotony of values first (values are sorted and unique)
for (int i = 1; i < value.Count; i++)
{
if (value[i] <= value[i - 1])
throw new InvalidArgumentException(Error.TimeNotStrictlyMonotone);
{

var beforeValue =this.ConvertToDisplayUnit(value[i - 1]);
var afterValue = this.ConvertToDisplayUnit(value[i]);
throw new InvalidArgumentException(Error.TimeNotStrictlyMonotone(beforeValue, afterValue, DisplayUnit.Name));
}
}

_values.Clear();
Expand All @@ -49,17 +54,14 @@ public override IReadOnlyList<float> Values

public override List<float> InternalValues
{
get { return _values; }
internal set { _values = value; }
get => _values;
internal set => _values = value;
}

public override bool HasSingleValue
{
get { return false; }
}
public override bool HasSingleValue => false;

/// <summary>
/// Insert the given values and returns the index where the value should be inserted
/// Insert the given values and returns the index where the value should be inserted
/// </summary>
public virtual void Insert(float value)
{
Expand All @@ -77,9 +79,10 @@ internal virtual int InsertOrReplace(float value, out bool replaced)
_values.Insert(index, value);
replaced = false;
}
return index;

return index;
}

public virtual void InsertInterval(float start, float end, int numberOfTimePoints)
{
if (end <= start) throw new InvalidArgumentException("end <= start");
Expand All @@ -90,6 +93,7 @@ public virtual void InsertInterval(float start, float end, int numberOfTimePoint
{
Insert(start + i * timeInterval);
}

Insert(end);
}

Expand All @@ -103,10 +107,7 @@ public virtual void Clear()
_values.Clear();
}

public virtual int Count
{
get { return _values.Count; }
}
public virtual int Count => _values.Count;

public virtual int IndexOf(float value)
{
Expand Down
Loading

0 comments on commit 4569f96

Please sign in to comment.