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

doc: migrate User Story from Robot to pytest #359

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

tarilabs
Copy link
Member

@tarilabs tarilabs commented Sep 7, 2024

Description

migrate User Story from RobotFramework:

As a MLOps engineer I would like to store some labels
# A custom property of type string, with empty string value, shall be considered a Label; this is also semantically compatible for properties having empty string values in general.
${cp1} Create Dictionary my-label1=${{ {"string_value": "", "metadataType": "MetadataStringValue"} }} my-label2=${{ {"string_value": "", "metadataType": "MetadataStringValue"} }}
Set To Dictionary ${registered_model} description=Lorem ipsum dolor sit amet name=${name} customProperties=${cp1}
${cp2} Create Dictionary my-label3=${{ {"string_value": "", "metadataType": "MetadataStringValue"} }} my-label4=${{ {"string_value": "", "metadataType": "MetadataStringValue"} }}
Set To Dictionary ${model_version} description=consectetur adipiscing elit customProperties=${cp2}
${cp3} Create Dictionary my-label5=${{ {"string_value": "", "metadataType": "MetadataStringValue"} }} my-label6=${{ {"string_value": "", "metadataType": "MetadataStringValue"} }}
Set To Dictionary ${model_artifact} description=sed do eiusmod tempor incididunt customProperties=${cp3}
${rId} Given I create a RegisteredModel payload=${registered_model}
${vId} And I create a child ModelVersion registeredModelID=${rId} payload=&{model_version}
${aId} And I create a child ModelArtifact modelversionId=${vId} payload=&{model_artifact}
${r} Then I get RegisteredModelByID id=${rId}
And Should be equal ${r["description"]} Lorem ipsum dolor sit amet
And Dictionaries Should Be Equal ${r["customProperties"]} ${cp1}
${r} Then I get ModelVersionByID id=${vId}
And Should be equal ${r["description"]} consectetur adipiscing elit
And Dictionaries Should Be Equal ${r["customProperties"]} ${cp2}
${r} Then I get ModelArtifactByID id=${aId}
And Should be equal ${r["description"]} sed do eiusmod tempor incididunt
And Dictionaries Should Be Equal ${r["customProperties"]} ${cp3}

to pytest,

following awesome work from @isinyaaa to introduce e2e testing directly with pytest:

How Has This Been Tested?

make test-e2e

Merge criteria:

  • All the commits have been signed-off (To pass the DCO check)
  • The commits have meaningful messages; the author will squash them after approval or in case of manual merges will ask to merge with squash.
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has manually tested the changes and verified that the changes work.
  • Code changes follow the kubeflow contribution guidelines.

If you have UI changes

  • The developer has added tests or explained why testing cannot be added.
  • Included any necessary screenshots or gifs if it was a UI change.
  • Verify that UI/UX changes conform the UX guidelines for Kubeflow.

Copy link
Contributor

@isinyaaa isinyaaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome Matteo!

@rareddy
Copy link
Contributor

rareddy commented Sep 11, 2024

so keeping both tests?

@tarilabs
Copy link
Member Author

so keeping both tests?

for the moment yes, until we onboard every test and everyone contributing to the alternative of the robotframework as voiced.

Copy link
Contributor

@rareddy rareddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@google-oss-prow google-oss-prow bot added the lgtm label Sep 11, 2024
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: isinyaaa, rareddy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 7506eaf into kubeflow:main Sep 11, 2024
15 checks passed
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