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

SDK - Fixed the capitalization in _python_function_name_to_component_name #2688

Conversation

Ark-kun
Copy link
Contributor

@Ark-kun Ark-kun commented Dec 3, 2019

When auto-creating components from functions I want the generated component names to look "human". For example "def do_something()" should result in "Do something".
I thought that capitalize was doing exactly what I want, but it turned out that its behavior is different. It lowers the case of all subsequent characters, transforming "CsvExampleGen" to "Csvexamplegen".
This PR fixes that issue and only changes the first character.


This change is Reviewable

It now only changes the case of the first letter.
@numerology
Copy link

Generally lgtm modulo one comment.
May I ask what's the purpose of this change?

@numerology
Copy link

/lgtm

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Dec 5, 2019

what's the purpose of this change?

When auto-creating components from functions I want the generated component names to look "human". For example "def do_something()" should result in "Do something".
I thought that capitalize was doing exactly what I want, but it turned out that its behavior is different. It lowers the case of all subsequent characters, transforming "CsvExampleGen" to "Csvexamplegen". This PR fixes that issue and only changes the first character.

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Dec 5, 2019

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Ark-kun

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

@Ark-kun
Copy link
Contributor Author

Ark-kun commented Dec 10, 2019

/retest

@k8s-ci-robot k8s-ci-robot merged commit 605ef80 into kubeflow:master Dec 10, 2019
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