Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Support inheritance for migration #1233

Closed
Aclrian opened this issue Feb 9, 2023 · 1 comment · Fixed by #1234
Closed

Support inheritance for migration #1233

Aclrian opened this issue Feb 9, 2023 · 1 comment · Fixed by #1234
Assignees
Labels
enhancement 💡 New feature or request migration Migration of annotation to a new API version released Included in a release

Comments

@Aclrian
Copy link
Contributor

Aclrian commented Feb 9, 2023

Is your feature request related to a problem?

Right now (#1190), the migration removes mappings in the 2nd interation (StrictDiffer) if the elements such as functions, attributes, … are moved to the related apiv2 sub-/super-class.

Desired solution

Create for a new (3rd) iteration a new differ. It should look for elements that are moved to a sub- or super-class and only compare those elements so that the api-mapper includes them in its mappings.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

No response

@Aclrian Aclrian added enhancement 💡 New feature or request migration Migration of annotation to a new API version labels Feb 9, 2023
@github-project-automation github-project-automation bot moved this to Backlog in API Editor Feb 9, 2023
@Aclrian Aclrian self-assigned this Feb 9, 2023
@Aclrian Aclrian linked a pull request Feb 9, 2023 that will close this issue
Aclrian added a commit that referenced this issue Feb 16, 2023
Closes #1233.

### Summary of Changes

- new additional differ, that compares only api elements whose parent
classes are mapped onto each other or with a super- or subclass
- improve flexibility for adding and changing and deleting differs in
`run_migrate.py` by adding a constructor to AbstractDiffer
- new methods for getting all the results or attributes of one api
- remove distance_elements and used edit distance from levenshtein-api
instead
    - hash function for subclasses of AbctractType and Parameter
- fix possible runtime errors (RecursionError, NoneError)

### Testing Instructions
run `migrate` command or `test_inheritance_differ.py`
@github-project-automation github-project-automation bot moved this from Backlog to ✔️ Done in API Editor Feb 16, 2023
@github-actions
Copy link

🎉 This issue has been resolved in version 1.90.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Included in a release label Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement 💡 New feature or request migration Migration of annotation to a new API version released Included in a release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant