Giter Site home page Giter Site logo

waylonwalker / kedro-action Goto Github PK

View Code? Open in Web Editor NEW
20.0 4.0 3.0 251 KB

A GitHub Action to lint, test, build-docs, package, and run your kedro pipelines. Supports any Python version you'll give it (that is also supported by pyenv).

License: MIT License

Dockerfile 5.90% Shell 94.10%
kedro dataengineering datapipeline actions

kedro-action's Introduction

Kedro-Action

A GitHub Action to lint, test, build-docs, package, static-viz, and run your kedro pipelines. Supports any Python version you'll give it (that is also supported by pyenv).

Inspired by mariamrf/py-package-publish-action and crazy-max/ghaction-github-pages.

Example

Check out WaylonWalker/default-kedro157 for a working example of the action.

Static Viz

Docs

Test report

Use

Pre-requisits

In order for the Action to have access to the code, you must use the actions/checkout@master job before it. See the example below.

For kedro-action to commit results back to the kedro-action branch you must supply a GitHub Personal Access Token through the secrets manager. See this link for more help.

Inputs

  • python_version:
    • description: a Python version that is supported by pyenv
    • default: '3.7.0'
  • should_lint:
    • description: runs kedro lint
    • default: true
  • should_test:
    • description: runs kedro test
    • default: true
  • should_build_docs:
    • description: runs kedro build-docs
    • default: true
  • should_package:
    • description: runs kedro package
    • default: true
  • should_run:
    • description: runs kedro run
    • default: false
  • should_viz:
    • description: creates a static site built on gatsby based on kedro viz --save-pipeline pipeline.json
    • default: true
  • deploy_branch
    • branch to deploy static site to
    • default: kedro-action
  • github_pat
  • verbose
    • description: prints extra information for debugging
    • default: false

Example Workflow

name: kedro

on:
  push:
    branches:
      - master

jobs:
  kedro:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Kedro
      uses: WaylonWalker/[email protected]
      with:
        GITHUB_PAT: ${{ secrets.GITHUB_PAT }} # required for push to kedro-action branch

kedro-action's People

Contributors

waylonwalker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kedro-action's Issues

With options not being respected

Hi,

Thanks for the great action template. It makes implementing CI much simpler especially for someone with no real knowledge of CI/ CD.
However I am getting some issues with the options. They seem to be ignored. For instance, my kedro-action.yml looks like this:

name: kedro

on:
  push:
    branches:
      - main

jobs:
  kedro:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@main
    - name: Kedro
      uses: WaylonWalker/kedro-action@develop
      with:
        python_version: '3.8.6'
        should_lint: false
        should_test: true
        should_build_docs: true
        should_package: true
        should_run: false
        should_viz: true
        deploy_branch: kedro-action
        verbose: true

But despite having should_lint == false, it still seems to execute kedro lint.

image

Has anyone had this issue before or knows why lint is being executed?

Thanks

git action only run the last version of kedro

Hello,
I just wanted to give you a quick info:

While testing the git action, I come across a version compatibility issue of kedro between my project and the docker of the git action.

a quick look to entry point, and it seems that you install kedro with "pip install kedro". as kedro is not flexible to run older project version, it mean this action can only run project with the last version , and start failing after any new version pip update.

-----Install kedro project-----

Traceback (most recent call last):
  File "/usr/local/bin/kedro", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/site-packages/kedro/framework/cli/cli.py", line 205, in main
    cli_collection = KedroCLI(project_path=Path.cwd())
  File "/usr/local/lib/python3.7/site-packages/kedro/framework/cli/cli.py", line 114, in __init__
    self._metadata = bootstrap_project(project_path)
  File "/usr/local/lib/python3.7/site-packages/kedro/framework/startup.py", line 153, in bootstrap_project
    metadata = _get_project_metadata(project_path)
  File "/usr/local/lib/python3.7/site-packages/kedro/framework/startup.py", line 96, in _get_project_metadata
    raise ValueError(_version_mismatch_error(metadata_dict["project_version"]))
ValueError: Your Kedro project version 0.17.7 does not match Kedro package version 0.18.0 you are running. Make sure to update your project template. See https://github.com/kedro-org/kedro/blob/main/RELEASE.md for how to migrate your Kedro project.
โŒ failed to install project 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.