This repository was archived by the owner on Jan 19, 2025. It is now read-only.
Tags: Safe-DS/API-Editor
Tags
feat: bug fixes and improvements for migration (#1235) Closes #1259. ### Summary of Changes Some Improvements to the migrate command: - include documentation similarity to similarity between two functions - include function similarity and documentation similarity to similarity between two classes - add hash function to Function and FunctionDocumentation - handle duplicated annotations - mark annotations with same type and target as unsure and generate a comment where they differ - improved output for migration by not printing each line separately - fix detection of global function in StrictDiffer - fix weighted levenshtein distance: now higher level changes should have increased costs ### Testing Instructions run `test_base_differ.py` and `test_mapping.py` --------- Co-authored-by: Aclrian <Aclrian@users.noreply.github.com> Co-authored-by: Lars Reimann <mail@larsreimann.com>
fix: add `@getter`, `@setter` and `@deleter` to ID of parameters (#1276) Closes #1277. ### Summary of Changes If the parent has a postfix like `@getter`, `@setter` or `@deleter`, the parameter will have it, too. ### Testing Instructions review created api_data.json and verify that every ID is unique. --------- Co-authored-by: Aclrian <Aclrian@users.noreply.github.com> Co-authored-by: Lars Reimann <mail@larsreimann.com>
feat: Creation of test files for migration of annotations (#1182) Closes #1181. ### Summary of Changes - Add two versions of an api, its api data and (migrated) annotation data - Improve detection of instance attributes ### Testing Instructions run the parse-package commands for the apis and the annotations and verify that the json files are correct generated or use the script in `migration_test_data` --------- Co-authored-by: Aclrian <Aclrian@users.noreply.github.com>
feat: support inheritance while migrating (#1234) 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`
feat: new additional strict differ (#1190) Closes #1230. ### Summary of Changes - new additional differ that filters mappings of api elements out whose parents are not mapped together. - `__repr__` method for api elements with only the id of the element. ### Testing Instructions run the `migrate` command before and after applying these improvements
feat: improve duration time of migration (#1232) Closes #1231. ### Summary of Changes add cache for compute_function_similarity and previous_function_similarity use enhanced levenshtein distance from api wherever possible ### Testing Instructions run the migrate command and enjoy the shorter runtime
feat: Improve Detection of Similarity (#1187) Closes #1186. ### Summary of Changes Enhance the detection of similarity by: - Format the code before measure similarity - Consider documentation and default value for detecting similarity between parameters - Consider id for detecting similarity for detecting similarity between classes, functions, or parameters. ### Testing Instructions run the `migrate` command with and without this additional code and compare the mappings.
PreviousNext