Skip to content
This repository was archived by the owner on Nov 23, 2024. It is now read-only.
This repository was archived by the owner on Nov 23, 2024. It is now read-only.

Migrate @pure annotations #7

Open
@Aclrian

Description

@Aclrian

Is your feature request related to a problem?

After changes to an API, we still want to use most of the @pure annotations.

Desired solution

Migrate the @pure annotations from apiv1 elements to apiv2 elements that are mapped together. If a mapped apiv2 element is a function and has no side effects and whose return value is the same if the parameters passed in the calls are the same, create a @pure annotation for that element.
Otherwise, mark the api element with a @todo annotation, or do not migrate the annotation if the mapped function is not pure.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

The code attribute of functions should be useful.

Create the file package_parser/processing/migration/annotations/_migrate_pure_annotation.py with a function to migrate an annotation with the related mapping.
See Safe-DS/API-Editor#1151 for an example of how to migrate annotations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @pureRelated to the @pure annotationenhancement 💡New feature or requestmigrationMigration of annotation to a new API version

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions