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

Fix check for preventing tools-related modifications on starter #204

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

AhdraMeraliQB
Copy link
Contributor

Motivation and Context

When a starter is selected, any removal of tools should not be applied to the template project. To prevent this, the post project generation hook would check that tools have been specified to gauge if this was a starter selection or example pipeline selection (where the latter would continue with the removal process).

However, this overlooked the case of no tools selected and an example pipeline being requested - the resulting project should have the unwanted tools stripped of it, but instead the project template was treated like a starter and no modifications were made. This is addressed by testing for an example-pipeline instead of a tools selection - this check is more robust, particularly because example-pipeline cannot be true when a starter flag is used.

How has this been tested?

Checklist

  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Assigned myself to the PR
  • Added tests to cover my changes

Copy link
Contributor

@DimedS DimedS left a comment

Choose a reason for hiding this comment

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

@AhdraMeraliQB thank you, it is truly more robust solution, previously we were checked the values of cookiecutter.json file of spaceflights-pandas starter. It's currently tools: "none". When user choses any tools, it will be replaced by ["None"] or ["Linting"]..., so it was a marker that if it is not "none" it mean that not just a starter used.

Important not to write in cookiecutter.json file in spaceflights-pandas starter "example_pipeline": "True" in the future)

And also we should clarify why we put some values for 'tools' and 'example_pipeline' in cookiecutter.json files in starters, they are not needed and can only mislead. I will make an Issue about it as discussed with @AhdraMeraliQB

Copy link
Contributor

@SajidAlamQB SajidAlamQB left a comment

Choose a reason for hiding this comment

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

This makes more sense now, thank you @AhdraMeraliQB! 👍

@AhdraMeraliQB AhdraMeraliQB merged commit 72604d7 into main Jan 4, 2024
36 checks passed
@AhdraMeraliQB AhdraMeraliQB deleted the fix/starter-logic branch January 4, 2024 10:28
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.

3 participants