Skip to content

Conversation

@jarabroz
Copy link
Member

No description provided.

i = 1
while i <= n-1:
j = (i-1) * 5
Member(int(4*n+i), MemberType.TYPE_BEAM, j+2, j+7, 0.0, 2, 2)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove it. Same comment applies to line 97

Copy link
Contributor

Choose a reason for hiding this comment

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

done

#vertical bracing
# add a question about repeating in every block, one yes one no, only beginning and end

BracingV = input('Would you like to include vertical bracing?\n')
Copy link
Contributor

Choose a reason for hiding this comment

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

Possibly add: 'Would you like to include vertical bracing? (Y/N)' so that the user knows what to input. German user may say, 'ja' for example which won't work

Copy link
Contributor

Choose a reason for hiding this comment

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

done

# add a question about repeating in every block, one yes one no, only beginning and end

BracingV = input('Would you like to include vertical bracing?\n')
if BracingV.lower() == 'yes' or BracingV.lower() == 'y':
Copy link
Contributor

Choose a reason for hiding this comment

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

Clever use of .lower()! :)


BracingV = input('Would you like to include vertical bracing?\n')
if BracingV.lower() == 'yes' or BracingV.lower() == 'y':
BracingV_C1 = input('Would you like to repeat a vertical bracing in every block?\n')
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as line 103 Include: "(Y/N)" at input end

Copy link
Contributor

Choose a reason for hiding this comment

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

done

BracingV = input('Would you like to include vertical bracing?\n')
if BracingV.lower() == 'yes' or BracingV.lower() == 'y':
BracingV_C1 = input('Would you like to repeat a vertical bracing in every block?\n')
if BracingV_C1.lower() == 'yes' or BracingV_C1.lower() == 'y':
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as line 103 Include: "(Y/N)" at input end

Copy link
Contributor

Choose a reason for hiding this comment

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

done

Section (3, 'IPE 80',3)
i = 1
while i <= n-1:
k = int(n*4+(n-1)*2)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

done

i = 1
while i <= n-1:
k = int(n*4+(n-1)*2)
if i == 1 or i == int(n-1):
Copy link
Contributor

Choose a reason for hiding this comment

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

If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

done

Member(k+4+4*(i-1), MemberType.TYPE_TENSION, (i-1)*5+4, (i-1)*5+10, 0.0, 3, 3)
print(k+1+4*(i-1), k+2+4*(i-1), k+3+4*(i-1), k+4+4*(i-1))
i += 1
BracingV_C3 = input('Would you like to repeat a vertical bracing in even/odd blocks?\n') # MAKE IT MORE GENERAL!
Copy link
Contributor

Choose a reason for hiding this comment

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

Include "(Y/N)" guidance for user

Copy link
Contributor

Choose a reason for hiding this comment

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

done

Material (3, 'EN AW-3004 H14')
Section (3, 'IPE 80',3)
i = 1
j = int(4*n + 3*(n-1))
Copy link
Contributor

@bjoernsteinhagen bjoernsteinhagen Sep 28, 2021

Choose a reason for hiding this comment

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

If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

done

j = int(4*n + 3*(n-1))
while i <= n-1:
if i% 2 != 0:
k = int(n*4+(n-1)*2)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

done

#horizontal bracing
# add a question about repeating in every block, one yes one no, only beginning and end

member_count = int(n*4+(n-1)*2)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

done

member_count = int(n*4+(n-1)*2)
BracingH = input('Would you like to include horizontal bracing?\n')
if BracingV.lower() == 'yes' or BracingV.lower() == 'y':
member_count += (int(n)-1)*4
Copy link
Contributor

Choose a reason for hiding this comment

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

If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

done

i = 1
while i <= n-1:
j = (i-1) * 5
Member(int(member_count+1+4*(i-1)), MemberType.TYPE_BEAM, j+2, j+8, 0.0, 3, 3)
Copy link
Contributor

Choose a reason for hiding this comment

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

If we change the "n" input to integer, then the data type conversion here becomes redundant and we can remove it. Applies to all proceeding lines of code

Member(k+4+4*(i-1), MemberType.TYPE_TENSION, (i-1)*5+4, (i-1)*5+10, 0.0, 3, 3)
print(k+1+4*(i-1), k+2+4*(i-1), k+3+4*(i-1), k+4+4*(i-1))
i += 1
BracingV_C2 = input('Would you like to repeat a vertical bracing only in the first and last block?\n')
Copy link
Contributor

Choose a reason for hiding this comment

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

Include "(Y/N)" guidance for user

Copy link
Contributor

Choose a reason for hiding this comment

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

done

# add a question about repeating in every block, one yes one no, only beginning and end

member_count = int(n*4+(n-1)*2)
BracingH = input('Would you like to include horizontal bracing?\n')
Copy link
Contributor

Choose a reason for hiding this comment

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

Include "(Y/N)" guidance for user

Copy link
Contributor

Choose a reason for hiding this comment

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

done

print(int(member_count+1+4*(i-1)),int(member_count+2+4*(i-1)),int(member_count+3+4*(i-1)),int(member_count+4+4*(i-1)))
i += 1

print("Preparing...")
Copy link
Contributor

Choose a reason for hiding this comment

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

Nothing is being executed to RFEM between the two print statements, is the "preparing" necessary?

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking as a sign to the user that the script is being processed..what do you think?


print("Preparing...")
print('Ready!')
clientModel.service.finish_modification()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we run an analysis? Even if it's just self-weight

Copy link
Contributor

Choose a reason for hiding this comment

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

not sure, let's discuss it

i = 1
j = int(4*n + 3*(n-1))
while i <= n-1:
if i% 2 != 0:
Copy link
Contributor

Choose a reason for hiding this comment

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

Clever! :)


if __name__ == '__main__':

l = float(input('Length of the clear span in m: '))
Copy link
Contributor

Choose a reason for hiding this comment

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

Bad indentation. If loop indentation should rearrange.

@jarabroz jarabroz linked an issue Oct 8, 2021 that may be closed by this pull request
@pull-request-quantifier-deprecated

This PR has 363 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       : +362 -1
Percentile : 76.3%

Total files changed: 6

Change summary by file extension:
.py : +362 -1

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 464d2c9 into main Oct 19, 2021
@jarabroz jarabroz deleted the ExamplesAndDocumentation branch October 19, 2021 13:16
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.

Simple parametric example

5 participants