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

Add changes by Michael Stanway (April 2023) #51

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

olexandr-konovalov
Copy link
Collaborator

@olexandr-konovalov olexandr-konovalov commented Feb 6, 2024

Attempt to do PR #50 properly. Submitted this PR using an archive provided to us by @vmjanik via MS Teams for the Dolphin Acoustics VIP.

@olexandr-konovalov
Copy link
Collaborator Author

This looks manageable - 6 files changed and not 55 like it was in #50!

However, we have failed test - needs to be investigated:

  Error occurred in network_test/network_test and it did not run to completion.
      ---------
      Error ID:
      ---------
      'MATLAB:TooManyInputs'
      --------------
      Error Details:
      --------------
      Error using NetworkFactory.new_network
      Too many input arguments.
      
      Error in network_test (line 6)
      network = NetworkFactory.new_network(contours);

@olexandr-konovalov
Copy link
Collaborator Author

Test failed because of

  ================================================================================
  Error occurred in network_test/network_test and it did not run to completion.
      ---------
      Error ID:
      ---------
      'MATLAB:TooManyInputs'
      --------------
      Error Details:
      --------------
      Error using NetworkFactory.new_network
      Too many input arguments.
      
      Error in network_test (line 6)
      network = NetworkFactory.new_network(contours);
  ================================================================================

Seems that some function changed the number of arguments, but the test was not adjusted.

NetworkFactory.m Outdated
% Creates an empty
weights = ones(max([contours.length]), 0);
net = Network(weights);
function net = new_network()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michaelstanway the tests now failed because they expect an argument given to new_network. Do you know how to fix this? We were puzzled that new_network does not require any arguments in your version.

@olexandr-konovalov
Copy link
Collaborator Author

I have rebased this, hoping that we can also see code coverage for this PR - however, the test terminates because of the error prior to uploading results to Codecov.

if length(varargin) == 1
dir_path = varargin{1};
else
dir_path = cd + "/Test_Data"; % temporarily the subdirectory ./Test_Data
dir_path = cd + "/BrazilData"; % temporarily the subdirectory ./Test_Data
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was no BrazilData subdirectory in the archive I have received from @vmjanik. I will switch back to Test_Data next time we meet. Although this will not help with the other problem, this will demonstrate how to edit PRs.

@@ -1,19 +1,62 @@
classdef NetworkFactory
% A factory to initialise the network to be used within an ARTwarp run.
% Summary of this class goes here
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the text in main is newer than suggested change - perhaps @michaelstanway used earlier version of the code, and in the meantime the comment was added? Of course, we have no way to figure out on which revision in the repository @michaelstanway's work was based, since Michael did not use version control. I am starting to suspect that this PR will be closed without merging, and we will have to manually recover ideas or go over text comments and pick up what is salvageable and helpful.

olexandr-konovalov pushed a commit that referenced this pull request Apr 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
This PR tries to apply some changes earlier attempted by Michael Stanway and shown in PR #51 but in a accurate way, and also adding some tests
--------
Co-authored-by: Tate Dunbar
Attempt to do PR dolphin-acoustics-vip#50 properly.
@olexandr-konovalov
Copy link
Collaborator Author

Now part of this was added in PR #64 by @tatedunbar which has been merged. After that Iv'e rebased this PR #51, so we can now see what's left. @tatedunbar please check if there is anything else what we need to salvage, and then make another PR if you want to backport more of Michael's changes. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant