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

Deprecate name parameter in init_project and management API #1175

Merged
merged 5 commits into from Jan 17, 2023

Conversation

AleksanderWWW
Copy link
Contributor

Resolving NPT-12795

@AleksanderWWW AleksanderWWW marked this pull request as ready for review January 12, 2023 14:47
@Raalsky
Copy link
Contributor

Raalsky commented Jan 17, 2023

CHANGELOG 😉



def extract_project_and_workspace(name: str, workspace: Optional[str] = None):
project_spec = re.search(PROJECT_QUALIFIED_NAME_PATTERN, name)
@deprecated_parameter(deprecated_kwarg_name="name", required_kwarg_name="project")
Copy link
Contributor

Choose a reason for hiding this comment

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

That's internal function and shouldn't be deprecated.


final_workspace_name = extracted_workspace or workspace

return final_workspace_name, extracted_project_name


def normalize_project_name(name: str, workspace: Optional[str] = None):
extracted_workspace_name, extracted_project_name = extract_project_and_workspace(name=name, workspace=workspace)
@deprecated_parameter(deprecated_kwarg_name="name", required_kwarg_name="project")
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above. Internal -> do not deprecate

@AleksanderWWW AleksanderWWW merged commit 3779c6c into master Jan 17, 2023
@AleksanderWWW AleksanderWWW deleted the aw/deprecate_name_param branch January 17, 2023 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants