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

Merge changes in the development branch #53

Merged
merged 55 commits into from
Oct 20, 2021
Merged

Merge changes in the development branch #53

merged 55 commits into from
Oct 20, 2021

Conversation

onurulgen
Copy link
Member

No description provided.

alonsoJASL and others added 30 commits April 27, 2021 12:36
When a PR is created and for each commit of a PR, it will generate static code analysis by using CppCheck and upload the results as a comment
For each commit or PR, it will run tests, and code coverage. It will also upload code coverage results to codecov.io, which can be followed at https://app.codecov.io/gh/CemrgDevelopers/CemrgApp
@github-actions
Copy link

github-actions bot commented Aug 5, 2021

✅ Code Analysis Results - no issues found! ✅

@ericspod
Copy link
Member

ericspod commented Aug 5, 2021

Do we know the issue with the tests? Also looking at the list of code analysis errors many are pure stylistic or about if-conditions related to the verbose code. Duplicate if-conditions can be condensed to one block but there's a number of things flagged that aren't duplicates so these checks maybe should be disabled.

@onurulgen
Copy link
Member Author

Do we know the issue with the tests? Also looking at the list of code analysis errors many are pure stylistic or about if-conditions related to the verbose code. Duplicate if-conditions can be condensed to one block but there's a number of things flagged that aren't duplicates so these checks maybe should be disabled.

No error with the tests, it just can't find the macro definition even though it can find the previous macro definition in the CemrgCommandLineTest.cpp. That's weird for sure.

I can disable the style checking if it's requested.

@alonsoJASL
Copy link
Collaborator

I'm still sifting through the errors in #53 (comment) . But I can say right now that anytime you find a

if(verbose)
    MITK_INFO << "message";

You can change it for

MITK_INFO(verbose) << "message"; 

that should get rid of a lot of those messages. I'll check the others and comment on them.

@ericspod
Copy link
Member

ericspod commented Aug 5, 2021

The test job does indicate it failed though, is that not a concern?

@codecov-commenter
Copy link

codecov-commenter commented Aug 11, 2021

Codecov Report

❗ No coverage uploaded for pull request base (master@73f9973). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##             master     #53   +/-   ##
========================================
  Coverage          ?   9.70%           
========================================
  Files             ?      72           
  Lines             ?   12078           
  Branches          ?       0           
========================================
  Hits              ?    1172           
  Misses            ?   10906           
  Partials          ?       0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73f9973...2b050da. Read the comment docs.

@onurulgen
Copy link
Member Author

Now, I've fixed most of the code analysis problems, only a few important ones are remaining. Please look into them.

@ericspod
Copy link
Member

Many of the code issues above relate to some variable set a static value then used in a condition, I guess these are placeholder for setting the values from a GUI element? Others are about variable shadowing so the variable being flagged should be renamed. Those relating to unsafe types I'm not sure exactly what to do, those that don't have constructors but should probably do need constructors. Other things like using prefix ++/-- are clear about what to change.

CemrgApp/CemrgApp/Modules/CemrgAppModule/src/CemrgAtriaClipper.cpp Lines 444 the complaint is about 1.0 and 1.5 being cast to unsigned long which 1 in both cases, this should be changed to just be one if that was the intent of the ternary operator or changed to not cast to unsigned long.

@alonsoJASL alonsoJASL removed the request for review from ericspod October 18, 2021 18:13
alonsoJASL
alonsoJASL previously approved these changes Oct 19, 2021
Copy link
Collaborator

@alonsoJASL alonsoJASL left a comment

Choose a reason for hiding this comment

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

All looks good 👍

Thanks @onurulgen for an amazing work.

Copy link
Collaborator

@OrodRazeghi OrodRazeghi left a comment

Choose a reason for hiding this comment

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

@alonsoJASL almost everything looks good, only a few comments for you to have a look. Basically:

  1. We need to create new issues for some of the topics mentioned in these comments, so we don't forget to come back to them in future.
  2. Also, we have duplication of code in the cmdapps, which makes keeping track of changes in plugins and matching them with cmdapps difficult. I think we need a new issue for this too, to think about solutions in future.

.github/workflows/build.yml Show resolved Hide resolved
CemrgApp/Applications/MainApp/version.txt Show resolved Hide resolved
CemrgApp/Modules/CemrgAppModule/src/CemrgAtriaClipper.cpp Outdated Show resolved Hide resolved
CemrgApp/Modules/CemrgAppModule/src/CemrgScar3D.cpp Outdated Show resolved Hide resolved
}

#endif // kcl_cemrgapp_renderwindoweditor_Activator_h
constexpr decltype(CemrgTestData::surfacePaths) CemrgTestData::surfacePaths;
Copy link
Collaborator

Choose a reason for hiding this comment

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

No sure what's happening here, is renderwindoweditor removed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Created #55

Copy link
Collaborator

Choose a reason for hiding this comment

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

For some reason, github is taking this CemrgTestCommon.cpp and comparing it to the recently deleted kcl_cemrgapp_renderwindoweditor_Activator.h . I don't know why github decided to do that.

{
BERRY_REGISTER_EXTENSION_CLASS(QmitkCemrgRenderWindowEditor, context)
}
Q_OBJECT
Copy link
Collaborator

Choose a reason for hiding this comment

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

same as the other comment about the renderwindoweditor

Copy link
Collaborator

Choose a reason for hiding this comment

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

#55

Copy link
Collaborator

Choose a reason for hiding this comment

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

Same as the other comment. For some reason, github caught me deleting the kcl_cemrgapp_renderwindoweditor_Activator.h and put that change on this test.hpp.

Not sure why, as they're in very different paths! Do you have any idea about this, @onurulgen ?

For context, I deleted the renderwindow plugin we had in CemrgApp (commit 100fd8), but for some reason, github caught that deletion as a change in this test.hpp file

Copy link
Collaborator

@alonsoJASL alonsoJASL left a comment

Choose a reason for hiding this comment

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

Thanks @OrodRazeghi for your feedback. I think we can merge this one for now. I created #54, #55, and #57 for the things that need to be addressed but not critically.

@OrodRazeghi OrodRazeghi merged commit 69e5e1e into master Oct 20, 2021
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.

5 participants