Skip to content

Conversation

@dogukankaratas
Copy link
Contributor

-Plausibility Check added
-Plausibility Check Test added

  • Model Check added
  • Model Check Test added
  • New Folder 'Tools'

Copy link
Contributor

@OndraMichal OndraMichal left a comment

Choose a reason for hiding this comment

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

Please run these files through Pylint. You will see following issues:

Module PlausibilityCheck
RFEM\Tools\PlausibilityCheck.py:26:0: C0303: Trailing whitespace (trailing-whitespace)
RFEM\Tools\PlausibilityCheck.py:38:0: C0304: Final newline missing (missing-final-newline)
RFEM\Tools\PlausibilityCheck.py:12:0: W1405: Quote delimiter ' is inconsistent with the rest of the file (inconsistent-quotes)
RFEM\Tools\PlausibilityCheck.py:1:0: C0103: Module name "PlausibilityCheck" doesn't conform to '^(?[a-z][a-z0-9]*|init)$' pattern (invalid-name)
RFEM\Tools\PlausibilityCheck.py:22:8: R1703: The if statement can be replaced with 'return bool(test)' (simplifiable-if-statement) or ternary operator for simplyfication.
RFEM\Tools\PlausibilityCheck.py:2:0: W0611: Unused Message imported from suds.wsdl (unused-import)

Module ModelCheck
RFEM\Tools\ModelCheck.py:1:0: C0103: Module name "ModelCheck" doesn't conform to '^(?[a-z][a-z0-9]*|init)$' pattern (invalid-name)
RFEM\Tools\ModelCheck.py:2:0: W0611: Unused Message imported from suds.wsdl (unused-import)
RFEM\Tools\ModelCheck.py:3:0: W0611: Unused Member imported from RFEM.BasicObjects.member (unused-import)

Module test_ModelCheck
UnitTests\test_ModelCheck.py:40:0: C0303: Trailing whitespace (trailing-whitespace)
UnitTests\test_ModelCheck.py:56:0: C0303: Trailing whitespace (trailing-whitespace)
UnitTests\test_ModelCheck.py:89:0: C0304: Final newline missing (missing-final-newline)
UnitTests\test_ModelCheck.py:4:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
UnitTests\test_ModelCheck.py:1:0: C0103: Module name "test_ModelCheck" doesn't conform to '^(?[a-z][a-z0-9]*|init)$' pattern (invalid-name)
UnitTests\test_ModelCheck.py:3:0: W0611: Unused coroutine imported from types (unused-import)

Module test_plausiblityCheck
UnitTests\test_plausiblityCheck.py:56:0: C0303: Trailing whitespace (trailing-whitespace)
UnitTests\test_plausiblityCheck.py:3:0: W1405: Quote delimiter " is inconsistent with the rest of the file (inconsistent-quotes)
UnitTests\test_plausiblityCheck.py:1:0: C0103: Module name "test_plausiblityCheck" doesn't conform to '^(?[a-z][a-z0-9]*|init)$' pattern (invalid-name)


Runnig tests directly from files return following messages. Tesed on RFEM versions US-8137_b124910_8db61b3d75f and master_b124924_d961bfd4145.

test_plausiblityCheck.py
Connecting to server...
Resetting model...
Ready!
Web service reported a SOAP processing fault using an unexpected HTTP status code 200. Reporting as an internal server error.
<suds.sax.document.Document object at 0x0000023099329208>
Traceback (most recent call last):
File "d:\Sources\RFEM_Python_Client_5\UnitTests\test_plausiblityCheck.py", line 52, in
check = PlausiblityCheck()
File ".\RFEM\Tools\PlausibilityCheck.py", line 9, in init
response = clientModel.service.plausibility_check()
File "C:\Users\MichalO\AppData\Roaming\Python\Python36\site-packages\suds\client.py", line 521, in call
return client.invoke(args, kwargs)
File "C:\Users\MichalO\AppData\Roaming\Python\Python36\site-packages\suds\client.py", line 581, in invoke
result = self.send(soapenv)
File "C:\Users\MichalO\AppData\Roaming\Python\Python36\site-packages\suds\client.py", line 621, in send
original_soapenv=original_soapenv)
File "C:\Users\MichalO\AppData\Roaming\Python\Python36\site-packages\suds\client.py", line 670, in process_reply
raise WebFault(fault, replyroot)
suds.WebFault: Server raised fault: 'The value '' is not of the type Boolean.'

test_ModelCheck.py
Connecting to server...
Resetting model...
Ready!
Traceback (most recent call last):
File "d:\Sources\RFEM_Python_Client_5\UnitTests\test_ModelCheck.py", line 72, in
identical_nodes = ModelCheck.GetIdenticalNodes(0, 0.0005)
File ".\RFEM\Tools\ModelCheck.py", line 21, in GetIdenticalNodes
object_groups = clientModel.service.model_check__get_object_groups_operation(operation, tolerance)
File "C:\Users\MichalO\AppData\Roaming\Python\Python36\site-packages\suds\client.py", line 283, in getattr
return getattr(port, name)
File "C:\Users\MichalO\AppData\Roaming\Python\Python36\site-packages\suds\client.py", line 387, in getattr
return getattr(m, name)
File "C:\Users\MichalO\AppData\Roaming\Python\Python36\site-packages\suds\client.py", line 478, in getattr
return self[name]
File "C:\Users\MichalO\AppData\Roaming\Python\Python36\site-packages\suds\client.py", line 491, in getitem
raise MethodNotFound(qn)
suds.MethodNotFound: Method not found: 'RfemModel.RfemModelPort.model_check__get_object_groups_operation'

@dogukankaratas
Copy link
Contributor Author

Pylint issues resolved.

MichalO added 2 commits February 2, 2022 09:37
PlausibilityCheck() updated
@pull-request-quantifier-deprecated

This PR has 218 quantified lines of changes. In general, a change size of upto 200 lines is ideal for the best PR experience!


Quantification details

Label      : Large
Size       : +216 -2
Percentile : 61.8%

Total files changed: 7

Change summary by file extension:
.py : +216 -2

Change counts above are quantified counts, based on the PullRequestQuantifier customizations.

Why proper sizing of changes matters

Optimal pull request sizes drive a better predictable PR flow as they strike a
balance between between PR complexity and PR review overhead. PRs within the
optimal size (typical small, or medium sized PRs) mean:

  • Fast and predictable releases to production:
    • Optimal size changes are more likely to be reviewed faster with fewer
      iterations.
    • Similarity in low PR complexity drives similar review times.
  • Review quality is likely higher as complexity is lower:
    • Bugs are more likely to be detected.
    • Code inconsistencies are more likely to be detetcted.
  • Knowledge sharing is improved within the participants:
    • Small portions can be assimilated better.
  • Better engineering practices are exercised:
    • Solving big problems by dividing them in well contained, smaller problems.
    • Exercising separation of concerns within the code changes.

What can I do to optimize my changes

  • Use the PullRequestQuantifier to quantify your PR accurately
    • Create a context profile for your repo using the context generator
    • Exclude files that are not necessary to be reviewed or do not increase the review complexity. Example: Autogenerated code, docs, project IDE setting files, binaries, etc. Check out the Excluded section from your prquantifier.yaml context profile.
    • Understand your typical change complexity, drive towards the desired complexity by adjusting the label mapping in your prquantifier.yaml context profile.
    • Only use the labels that matter to you, see context specification to customize your prquantifier.yaml context profile.
  • Change your engineering behaviors
    • For PRs that fall outside of the desired spectrum, review the details and check if:
      • Your PR could be split in smaller, self-contained PRs instead
      • Your PR only solves one particular issue. (For example, don't refactor and code new features in the same PR).

How to interpret the change counts in git diff output

  • One line was added: +1 -0
  • One line was deleted: +0 -1
  • One line was modified: +1 -1 (git diff doesn't know about modified, it will
    interpret that line like one addition plus one deletion)
  • Change percentiles: Change characteristics (addition, deletion, modification)
    of this PR in relation to all other PRs within the repository.


Was this comment helpful? 👍  :ok_hand:  :thumbsdown: (Email)
Customize PullRequestQuantifier for this repository.

@jarabroz jarabroz merged commit a6bebd4 into main Feb 2, 2022
@OndraMichal OndraMichal deleted the dogukaratas-plausibility branch February 2, 2022 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants