Skip to content

Conversation

@OndraMichal
Copy link
Contributor

@OndraMichal OndraMichal commented Apr 7, 2022

The aim is to add multi-model editing capability to our Client while holding to the original idea. Complete instructions are added to Wiki together with code snippets. There are 3 options:

  1. Default option is the same as it was from beginning. Initialize Model() once and you don't have to care about it at all during execution. That is how Mr.Dlubal wanted it. This is tested by 99% of all unit tests and examples.
  2. If you want to do tens or hundreds of operations to one model and then switch to another, you can do it easily by calling Model(bool, str) before switching it. The same way it is tested in UnitTests\test_multipleModels.py test test_multiple_models_calling_class. This should be executed in one session i.e. much faster than correct version.
  3. Create instance of a Model() and use this in method parameter to apply changes to correct model (UnitTests\test_multipleModels.py, test test_multiple_models_with_parameter). This comes handy when making small amount of changes between a lot of stwitching.

There is also a lot of minor fixes, that doesn't relate to this update.
Unit tests: 126 passed, 9 skipped in 174.54s
This effort was inspired by issue #103

MichalO added 4 commits April 6, 2022 14:58
unite tests: 125 passed, 9 skipped in 163.23s
corrected: '= [],' to ': list = None,'
MichalO added 2 commits April 13, 2022 15:15
…enable_editing_of_multiple_models

unit tests: 129 passed, 9 skipped in 221.96s
@pull-request-quantifier-deprecated

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


Quantification details

Label      : Extra Large
Size       : +1359 -1062
Percentile : 100%

Total files changed: 90

Change summary by file extension:
.json : +5 -2
.py : +1354 -1060

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.

@OndraMichal OndraMichal merged commit 93076d0 into main Apr 22, 2022
@OndraMichal OndraMichal deleted the OndrejMichal_enable_editing_of_multiple_models branch April 22, 2022 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants