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

Add spaceflights-pyspark starter #147

Merged
merged 21 commits into from
Oct 2, 2023
Merged

Conversation

merelcht
Copy link
Member

@merelcht merelcht commented Sep 15, 2023

Motivation and Context

kedro-org/kedro#2984 subtask of kedro-org/kedro#2838 which in turn is part of the new project creation flow.

How has this been tested?

Created a project locally using: kedro new --starter=/Users/merel_theisen/Projects/kedro-starters/spaceflights-pyspark/ and did kedro run

Things to note:

  • ⚠️ I had to drop columns from all input datasets to make the starter run for me locally. I added a new node to preprocess the reviews input data.
  • I moved logging.yml outside of the base folder to the top-level conf/ folder
  • Update the README.md to remove mentions of deprecated commands.
  • Added TestDataScienceNodes to demonstrate how you can write a unit test for a node.

Questions:

  1. @amandakys / @yetudada Do we intend to add these starters to our official starters so that users could also do kedro new --starter=spaceflights-pyspark?

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

Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
Comment on lines 11 to 15
```bash
pip install kedro
kedro new --starter=spaceflights-pyspark
cd <my-project-name> # change directory into newly created project directory
```
Copy link
Member Author

Choose a reason for hiding this comment

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

Do we want to keep this explanation or remove this from the new starters? @amandakys

merelcht and others added 4 commits September 15, 2023 10:16
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
@merelcht merelcht self-assigned this Sep 18, 2023
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
…labs/kedro-starters into create-spaceflights-pyspark
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
@merelcht merelcht marked this pull request as ready for review September 19, 2023 15:39
@merelcht merelcht linked an issue Sep 19, 2023 that may be closed by this pull request
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
@noklam
Copy link
Contributor

noklam commented Sep 25, 2023

Will this be introduced before 0.19?

return companies


def load_shuttles_to_csv(shuttles: pd.DataFrame) -> pd.DataFrame:
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use transcoding?

Copy link
Member Author

Choose a reason for hiding this comment

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

The original data is in excel format. If I don't add this node, how would it be turned into csv?

Comment on lines 23 to 29
class TestDataScienceNodes:
def test_split_data(self, dummy_data, dummy_parameters):
X_train, X_test, y_train, y_test = split_data(dummy_data, dummy_parameters["model_options"])
assert len(X_train) == 2
assert len(X_test) == 1
assert len(y_train) == 2
assert len(y_test) == 1
Copy link
Contributor

Choose a reason for hiding this comment

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

⭐️ I like that we are adding some example for tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think the test is good enough or should it be more meaningful and also test spark stuff?

Copy link
Contributor

@stichbury stichbury left a comment

Choose a reason for hiding this comment

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

LGTM from a docs perspective

merelcht and others added 4 commits September 26, 2023 16:37
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
merelcht and others added 3 commits September 26, 2023 16:50
Co-authored-by: Jo Stichbury <jo_stichbury@mckinsey.com>
Co-authored-by: Nok Lam Chan <nok.lam.chan@quantumblack.com>
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
…labs/kedro-starters into create-spaceflights-pyspark
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
@noklam
Copy link
Contributor

noklam commented Sep 29, 2023

I took a quick look and it's fine. I don't have time to test it out, it's best to have another engineer to approve this maybe @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.

Tested it manually and all looks good. Thank you @merelcht! 👍

merelcht and others added 3 commits October 2, 2023 11:07
Co-authored-by: Sajid Alam <90610031+SajidAlamQB@users.noreply.github.com>
Signed-off-by: Merel Theisen <merel.theisen@quantumblack.com>
…labs/kedro-starters into create-spaceflights-pyspark
@merelcht merelcht enabled auto-merge (squash) October 2, 2023 10:10
@merelcht merelcht merged commit b77c167 into main Oct 2, 2023
17 of 18 checks passed
@merelcht merelcht deleted the create-spaceflights-pyspark branch October 2, 2023 10:27
@ankatiyar ankatiyar mentioned this pull request Oct 3, 2023
3 tasks
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.

Create new spaceflights-pyspark starter
4 participants