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

feat: Improve Performance at Migration #62

Merged
merged 14 commits into from
Mar 20, 2023
Merged

Conversation

Aclrian
Copy link
Contributor

@Aclrian Aclrian commented Mar 19, 2023

Closes #25.

Summary of Changes

Improved Performance of the migrate command:

  • add UnchangedDiffer that maps unchanged api-elements to its newer/older version.
  • rewritten weighted levenshtein distance
  • improve performance of StrictDiffer and its way to check if the parents of two api-elements are mapped to each other.

and some smaller changes:

  • remove documentation before calculating the similarity of two codes
  • move annotations that are migrated by ManyToManyMappings to the unsure annotation store

Testing Instructions

migrate a package with a lot of api-elements and measure the time of the migration.

@lars-reimann
Copy link
Member

lars-reimann commented Mar 19, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ JSON eslint-plugin-jsonc 3 0 0 1.36s
✅ JSON jsonlint 3 0 0.2s
✅ JSON npm-package-json-lint yes no 0.44s
✅ JSON prettier 3 0 0 0.79s
✅ JSON v8r 3 0 2.12s
✅ PYTHON black 27 0 0 2.37s
✅ PYTHON flake8 27 0 1.16s
✅ PYTHON isort 27 0 0 0.31s
✅ PYTHON mypy 27 0 3.64s
✅ PYTHON pylint 27 0 9.01s
✅ REPOSITORY git_diff yes no 0.03s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@lars-reimann
Copy link
Member

@Aclrian Thanks for the port, please pull from remote.

@codecov
Copy link

codecov bot commented Mar 19, 2023

Codecov Report

Merging #62 (d01b39c) into main (0062000) will increase coverage by 0.08%.
The diff coverage is 93.97%.

❗ Current head d01b39c differs from pull request most recent head d72ab1f. Consider uploading reports for the commit d72ab1f to get more accurate results

@@            Coverage Diff             @@
##             main      #62      +/-   ##
==========================================
+ Coverage   88.46%   88.54%   +0.08%     
==========================================
  Files          81       83       +2     
  Lines        3719     3834     +115     
==========================================
+ Hits         3290     3395     +105     
- Misses        429      439      +10     
Impacted Files Coverage Δ
...lyzer/processing/annotations/model/_annotations.py 97.66% <0.00%> (-0.05%) ⬇️
...rc/library_analyzer/processing/api/_ast_visitor.py 93.33% <ø> (ø)
...rc/library_analyzer/processing/api/model/_types.py 93.65% <69.23%> (-0.71%) ⬇️
...lyzer/processing/migration/model/_strict_differ.py 94.04% <88.09%> (-5.96%) ⬇️
...er/processing/migration/model/_unchanged_differ.py 88.46% <88.46%> (ø)
...ary_analyzer/processing/migration/model/_differ.py 92.12% <96.72%> (+0.64%) ⬆️
src/library_analyzer/cli/_run_migrate.py 100.00% <100.00%> (ø)
src/library_analyzer/processing/api/model/_api.py 93.72% <100.00%> (+3.24%) ⬆️
...ry_analyzer/processing/api/model/_documentation.py 100.00% <100.00%> (+2.85%) ⬆️
...brary_analyzer/processing/api/model/_parameters.py 94.28% <100.00%> (+2.85%) ⬆️
... and 4 more

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@Aclrian Aclrian marked this pull request as ready for review March 20, 2023 14:59
@Aclrian Aclrian merged commit 6d55306 into main Mar 20, 2023
@Aclrian Aclrian deleted the skip-unchanged-api-elements branch March 20, 2023 15:00
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.

Migration is too slow
2 participants