-
Notifications
You must be signed in to change notification settings - Fork 9
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
End to end tests #14
Merged
Merged
End to end tests #14
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
0bc5fdc
Initial test scenario
em-pe 5e10eff
E2E tests
em-pe 3000d2d
E2E tests
em-pe cef8c53
Fix workflow file
em-pe ca8ccf0
Fix paths
em-pe 51932f7
Fix paths
em-pe 5827805
Fix paths
em-pe 1fd27ca
Fix repo location
em-pe 0bd2079
Fix paths
em-pe 132dd60
Fix build conditions
em-pe 027ce6e
Fix build conditions
em-pe 3bf0001
Fix paths
em-pe 5e1c901
Move e2e related files to tests folder
em-pe 89dc3c8
Change init file suffix
em-pe 698dece
Change revert config file
em-pe 4527957
setup google default credentials
em-pe d38f207
setup google default credentials
em-pe 66ec0ac
override default image
em-pe 3224b5a
Fix data catalog entries
em-pe 226e617
Set kedro starter version to 0.17.6
em-pe f05afc0
Don't run E2E on draft PRs
em-pe 8ae0302
Update changelog [no ci]
em-pe edf752e
Fix unit tests
em-pe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: End 2 End Tests (Spaceflights Quickstart) | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: github.event.pull_request.draft == false | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup python | ||
uses: actions/setup-python@v2.2.1 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Setup virtualenv | ||
run: | | ||
python -V | ||
python -m pip install virtualenv | ||
virtualenv venv | ||
source venv/bin/activate | ||
|
||
- name: Initialize kedro spaceflights project | ||
run: | | ||
pip install . 'kedro<0.18' | ||
kedro new --starter spaceflights --config tests/e2e/starter-config.yml --verbose --checkout=0.17.6 | ||
|
||
- name: Install project dependencies | ||
run: | | ||
cd ./spaceflights | ||
echo "git+https://github.com/getindata/kedro-vertexai.git@$GITHUB_SHA" >> src/requirements.txt | ||
echo "kedro-docker" >> src/requirements.txt | ||
sed -i '/kedro-telemetry/d' src/requirements.txt | ||
cat src/requirements.txt | ||
pip install -r src/requirements.txt | ||
|
||
- name: Init and update configuration | ||
run: | | ||
cd ./spaceflights | ||
kedro docker init | ||
kedro vertexai init gid-ml-ops-sandbox europe-west4 | ||
echo "!data/01_raw" >> .dockerignore | ||
mv ../tests/e2e/catalog.yml conf/base/catalog.yml | ||
mv ../tests/e2e/vertexai.yml conf/base/vertexai.yml | ||
|
||
- name: Prepare docker env | ||
uses: docker/setup-buildx-action@v1 | ||
id: buildx | ||
with: | ||
install: true | ||
|
||
- name: Build pipeline docker image | ||
run: | | ||
cd ./spaceflights | ||
docker build --build-arg BASE_IMAGE=python:3.8-buster --tag kedro-vertexai-e2e:latest --load . | ||
|
||
- name: Publish docker image to GCR | ||
uses: mattes/gce-docker-push-action@v1 | ||
with: | ||
creds: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} | ||
src: kedro-vertexai-e2e:latest | ||
dst: gcr.io/gid-ml-ops-sandbox/kedro-vertexai-e2e:${{ github.sha }} | ||
|
||
- name: Set up GCP Credentials | ||
uses: google-github-actions/auth@v0.6.0 | ||
with: | ||
credentials_json: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} | ||
create_credentials_file: true | ||
cleanup_credentials: true | ||
|
||
- name: Run project on vertex pipeline | ||
run: | | ||
cd ./spaceflights | ||
export KEDRO_CONFIG_COMMIT_ID=$GITHUB_SHA | ||
kedro vertexai run-once | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,8 @@ out/ | |
.LSOverride | ||
.Trashes | ||
|
||
spaceflights | ||
|
||
# Vim | ||
*~ | ||
.*.swo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
companies: | ||
type: pandas.CSVDataSet | ||
filepath: data/01_raw/companies.csv | ||
# more about layers in the Data Engineering Convention: | ||
# https://kedro.readthedocs.io/en/stable/03_tutorial/06_visualise_pipeline.html#interact-with-data-engineering-convention | ||
layer: raw | ||
|
||
reviews: | ||
type: pandas.CSVDataSet | ||
filepath: data/01_raw/reviews.csv | ||
layer: raw | ||
|
||
shuttles: | ||
type: pandas.ExcelDataSet | ||
filepath: data/01_raw/shuttles.xlsx | ||
layer: raw | ||
load_args: | ||
engine: openpyxl | ||
|
||
preprocessed_companies: | ||
type: pandas.CSVDataSet | ||
filepath: gs://gid-ml-ops-sandbox-plugin-tests/${run_id}/02_intermediate/preprocessed_companies.csv | ||
layer: intermediate | ||
|
||
preprocessed_shuttles: | ||
type: pandas.CSVDataSet | ||
filepath: gs://gid-ml-ops-sandbox-plugin-tests/${run_id}/02_intermediate/preprocessed_shuttles.csv | ||
layer: intermediate | ||
|
||
model_input_table: | ||
type: pandas.CSVDataSet | ||
filepath: gs://gid-ml-ops-sandbox-plugin-tests/${run_id}/03_primary/model_input_table.csv | ||
layer: primary | ||
|
||
X_train: | ||
type: pickle.PickleDataSet | ||
filepath: gs://gid-ml-ops-sandbox-plugin-tests/${run_id}/05_model_input/X_train.pickle | ||
layer: model_input | ||
|
||
y_train: | ||
type: pickle.PickleDataSet | ||
filepath: gs://gid-ml-ops-sandbox-plugin-tests/${run_id}/05_model_input/y_train.pickle | ||
layer: model_input | ||
|
||
X_test: | ||
type: pickle.PickleDataSet | ||
filepath: gs://gid-ml-ops-sandbox-plugin-tests/${run_id}/05_model_input/X_test.pickle | ||
layer: model_input | ||
|
||
y_test: | ||
type: pickle.PickleDataSet | ||
filepath: gs://gid-ml-ops-sandbox-plugin-tests/${run_id}/05_model_input/y_test.pickle | ||
layer: model_input | ||
|
||
regressor: | ||
type: pickle.PickleDataSet | ||
filepath: gs://gid-ml-ops-sandbox-plugin-tests/${run_id}/06_models/regressor.pickle | ||
versioned: true | ||
layer: models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
project_name: Spaceflights E2E Test | ||
repo_name: spaceflights | ||
python_package: spaceflights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
project_id: gid-ml-ops-sandbox | ||
region: europe-west4 | ||
run_config: | ||
# Name of the image to run as the pipeline steps | ||
image: gcr.io/gid-ml-ops-sandbox/kedro-vertexai-e2e:${commit_id} | ||
|
||
# Pull policy to be used for the steps. Use Always if you push the images | ||
# on the same tag, or Never if you use only local images | ||
image_pull_policy: IfNotPresent | ||
|
||
# Location of Vertex AI GCS root | ||
root: gid-ml-ops-sandbox-plugin-tests/staging | ||
|
||
# Name of the kubeflow experiment to be created | ||
experiment_name: kedro-vertex-e2e | ||
|
||
# Name of the scheduled run, templated with the schedule parameters | ||
scheduled_run_name: kedro-vertex-e2e | ||
|
||
# Optional service account to run vertex AI Pipeline with | ||
service_account: vertex-ai-pipelines@gid-ml-ops-sandbox.iam.gserviceaccount.com | ||
|
||
# Optional pipeline description | ||
# description: "Very Important Pipeline" | ||
|
||
# How long to keep underlying Argo workflow (together with pods and data | ||
# volume after pipeline finishes) [in seconds]. Default: 1 week | ||
ttl: 604800 | ||
|
||
# Optional network configuration | ||
# network: | ||
|
||
# Name of the vpc to use for running Vertex Pipeline | ||
# vpc: my-vpc | ||
|
||
# Hosts aliases to be placed in /etc/hosts when pipeline is executed | ||
# host_aliases: | ||
# - ip: 127.0.0.1 | ||
# hostnames: me.local | ||
|
||
# What Kedro pipeline should be run as the last step regardless of the | ||
# pipeline status. Used to send notifications or raise the alerts | ||
# on_exit_pipeline: notify_via_slack | ||
|
||
# Optional section allowing adjustment of the resources, reservations and limits | ||
# for the nodes. When not provided they're set to 500m cpu and 1024Mi memory. | ||
# If you don't want to specify pipeline resources set both to None in __default__. | ||
resources: | ||
|
||
# Default settings for the nodes | ||
__default__: | ||
cpu: 500m | ||
memory: 1024Mi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leftover?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean this
cat
? I left it intentionally for debugging purposes