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
28 changes: 14 additions & 14 deletions WorkshopGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,19 @@ In this workshop, you will:
## Table of Contents
 [Workshop Requirements](#H_34C2FB57)

 [Part 1: Getting the workshop files and configuring GitHub for automated testing and results publishing](#TMP_5736)
 [Part 1: Getting the workshop files and configuring GitHub for automated testing and results publishing](#TMP_1229)

 [Part 2: Generating your first tests](#TMP_133e)
 [Part 2: Generating your first tests](#TMP_4e93)

 [Part 3: Finding existing tests and measuring coverage](#TMP_4f07)
 [Part 3: Finding existing tests and measuring coverage](#TMP_3f21)

 [Part 4: Updating badges, committing our changes, and pushing to GitHub](#TMP_9895)
 [Part 4: Updating badges, committing our changes, and pushing to GitHub](#TMP_11a6)

 [Part 5: Create a pull request, watch GitHub Actions automatically test your changes and publish results](#TMP_162d)
 [Part 5: Create a pull request, watch GitHub Actions automatically test your changes and publish results](#TMP_585c)

 [Part 6: Compile the App in the CI workflow and download the artifact](#TMP_6581)
 [Part 6: Compile the App in the CI workflow and download the artifact](#TMP_03f8)

 [Workshop wrap\-up and additional information](#TMP_0e25)
 [Workshop wrap\-up and additional information](#TMP_8c61)

<!-- End Toc -->
<a id="H_34C2FB57"></a>
Expand All @@ -56,7 +56,7 @@ The following steps cover all of the things you will need to successfully comple
- The workshop leverages the free repository and CI capabilities offered by GitHub and GitHub Actions
- Go to: [**https://github.com/signup**](https://github.com/signup)

<a id="TMP_5736"></a>
<a id="TMP_1229"></a>

# Part 1: Getting the workshop files and configuring GitHub for automated testing and results publishing

Expand Down Expand Up @@ -308,7 +308,7 @@ Click on the 'Run App' shortcut to start the app in MATLAB:
![image_20.png](WorkshopGuide_media/image_20.png)


<a id="TMP_133e"></a>
<a id="TMP_4e93"></a>

# Part 2: Generating your first tests

Expand Down Expand Up @@ -529,7 +529,7 @@ Congratulations! You just created multiple tests for your MATLAB code!

It was easier than you thought, right?

<a id="TMP_4f07"></a>
<a id="TMP_3f21"></a>

# Part 3: Finding existing tests and measuring coverage

Expand Down Expand Up @@ -868,7 +868,7 @@ It looks like we've achieved full statement coverage for [`generateSimFun`](./co
![image_65.png](WorkshopGuide_media/image_65.png)


<a id="TMP_9895"></a>
<a id="TMP_11a6"></a>

# Part 4: Updating badges, committing our changes, and pushing to GitHub

Expand Down Expand Up @@ -1088,7 +1088,7 @@ At this point, all of your changes will be pushed to GitHub.
![image_85.png](WorkshopGuide_media/image_85.png)


<a id="TMP_162d"></a>
<a id="TMP_585c"></a>

# Part 5: Create a pull request, watch GitHub Actions automatically test your changes and publish results

Expand Down Expand Up @@ -1249,7 +1249,7 @@ The code coverage report looks like this:

Now anyone that visits your repository can immediately see the quality of your code, explore your test and code coverage results, and will have more confidence in the code you are writing!

<a id="TMP_6581"></a>
<a id="TMP_03f8"></a>

# Part 6: Compile the App in the CI workflow and download the artifact

Expand Down Expand Up @@ -1350,7 +1350,7 @@ Once the `Deploy/ Release (main)` job is done, a new artifact is available at th

You can now download the CTF file and upload it to your Web App Server!

<a id="TMP_0e25"></a>
<a id="TMP_8c61"></a>

# Workshop wrap\-up and additional information

Expand Down
76 changes: 43 additions & 33 deletions code/NCAView.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
properties ( Access = private )
NCApanel
GridLayout
BackgroundColor = [1,1,1]
Model
end

properties ( Hidden )
Expand All @@ -15,29 +15,28 @@
properties ( Access = public )
FontName (1,1) string = "Helvetica"
NCAoptions % options for NCA calculations
ConcentrationColumnName (1,1) string = "Complex"

end

properties ( Dependent )
Color
properties (SetObservable)
ConcentrationColumnName (1,1) string = "Complex"
BackgroundColor (1,3) double {mustBeBetween(BackgroundColor,0,1)} = [1,1,1]
end

properties( Access = private )
DataListener % listener
end

methods
function obj = NCAView(parent, model)
function obj = NCAView(parent, model, responseName)

arguments
parent
model (1,1) SimulationModel
responseName (1,1) string = "Complex"
end

% Create Panel
ncapanel = uipanel(parent);
ncapanel.Title = "NCA parameters for bound target ('" + ...
obj.ConcentrationColumnName + "')";
ncapanel.BackgroundColor = obj.BackgroundColor;
ncapanel.FontName = obj.FontName;
ncapanel.BorderType = 'none';
Expand All @@ -52,50 +51,61 @@
% Create NCAtable
ncat = uitable(gl);

% save NCA options
% Save NCA options
opt = sbioncaoptions;
opt.concentrationColumnName = obj.ConcentrationColumnName;
opt.concentrationColumnName = responseName;
opt.timeColumnName = 'Time';
opt.IVDoseColumnName = 'Dose';

% instantiate listener
dataListener = event.listener( model, 'DataChanged', ...
@obj.update );

% store listeners
obj.DataListener = dataListener;

% save objects
% Save objects
obj.NCAoptions = opt;
obj.NCApanel = ncapanel;
obj.GridLayout = gl;
obj.NCAtable = ncat;

obj.Model = model;
obj.ConcentrationColumnName = responseName;

% Update Panel title
updateTitle(obj);

% Instantiate listener for model
obj.DataListener = event.listener( model, 'DataChanged', ...
@obj.update );

% Instantiate listeners for properties
addlistener(obj,'ConcentrationColumnName','PostSet',@obj.setColumnName);
addlistener(obj,'BackgroundColor','PostSet',@obj.setColor);

end % constructor

function set.Color(obj,value)
obj.BackgroundColor = value;
obj.NCApanel.BackgroundColor = value;
obj.GridLayout.BackgroundColor = value;
end

function value = get.Color(obj)
value = obj.BackgroundColor;
end

end % public methods

methods ( Access = private )

function update(obj,srcModel,~)

% compute NCA parameters and display them in table
ncaParameters = sbionca(srcModel.SimDataTable, obj.NCAoptions);
obj.NCAtable.ColumnName = ncaParameters.Properties.VariableNames(2:end);
obj.NCAtable.Data = ncaParameters(:,2:end);

obj.NCAtable.Data = ncaParameters(:,2:end);
end % update

function setColor(obj,~,~)
obj.NCApanel.BackgroundColor = obj.BackgroundColor;
obj.GridLayout.BackgroundColor = obj.BackgroundColor;
end % setColor

function setColumnName(obj,~,~)
obj.NCAoptions.concentrationColumnName = obj.ConcentrationColumnName;
update(obj,obj.Model,[]);
updateTitle(obj)
end % setColumnName

function updateTitle(obj)
obj.NCApanel.Title = "NCA parameters for species '" + ...
obj.ConcentrationColumnName + "'";
end % updateTitle

end % private method

end % class

Binary file modified code/TMDDApp.mlapp
Binary file not shown.