Skip to content

Commit

Permalink
Merge pull request #172 from getindata/release-0.7.0
Browse files Browse the repository at this point in the history
Release 0.7.0
  • Loading branch information
em-pe committed Aug 22, 2022
2 parents ebb9452 + ade6a10 commit 45bf6c5
Show file tree
Hide file tree
Showing 54 changed files with 2,206 additions and 860 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
open-pull-requests-limit: 10
72 changes: 72 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "develop", master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "develop" ]
schedule:
- cron: '19 13 * * 4'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: [3.8]
env:
PYTHON_PACKAGE: kedro_kubeflow
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
python-version: [3.8]
env:
PYTHON_PACKAGE: kedro_kubeflow
steps:
Expand Down
45 changes: 0 additions & 45 deletions .github/workflows/python-package.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This is workflow for spell checking using PySpelling lib (https://pypi.org/project/pyspelling/)
name: Spellcheck
# Controls when the action will run.
on:
# Triggers the workflow on pull request events only if docs files have changed
pull_request:
paths: "docs/**"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
spellcheck:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Spellcheck
- uses: actions/checkout@v2
- uses: rojopolis/spellcheck-github-actions@0.25.0
name: Spellcheck
129 changes: 129 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
name: Testing

on:
push:
branches:
- develop
paths-ignore:
- "docs/**"
pull_request:
paths-ignore:
- "docs/**"

jobs:
unit:
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10' ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Setup python ${{ matrix.python-version }}
uses: actions/setup-python@v2.2.1
with:
python-version: ${{ matrix.python-version }}

- name: Setup virtualenv
run: |
python -V
python -m pip install virtualenv
virtualenv venv
source venv/bin/activate
- name: Check pre-commit status
run: |
pip install .[tests]
pre-commit run --all-files
- name: Test with tox
run: |
pip install tox-pip-version tox-gh-actions
tox -v
- name: Report coverage
if: (github.event.pull_request.head.repo.full_name || github.push.repository.full_name) == github.repository && ${{ matrix.python-version }} == '3.10'
uses: paambaati/codeclimate-action@v2.7.5
env:
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE }}
with:
coverageCommand: coverage xml
debug: true
coverageLocations: coverage.xml:coverage.py

e2e:
if: (github.event.pull_request.head.repo.full_name || github.push.repository.full_name) == github.repository
runs-on: ubuntu-latest
needs: unit
steps:
- uses: actions/checkout@v2

- name: Setup python
uses: actions/setup-python@v2.2.1
with:
python-version: '3.10'

- 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 new --starter spaceflights --config tests/e2e/starter-config.yml --verbose
- name: Install project dependencies
working-directory: ./spaceflights
run: |
echo "kedro-kubeflow[gcp] @ git+https://github.com/getindata/kedro-kubeflow.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
working-directory: ./spaceflights
run: |
kedro docker init
kedro kubeflow init http://localhost:9000
echo "!data/01_raw" >> .dockerignore
mv ../tests/e2e/catalog.yml conf/base/catalog.yml
rm -f conf/base/kubeflow.y*
mv ../tests/e2e/kubeflow.yml conf/base/kubeflow.yml
- name: Prepare docker env
uses: docker/setup-buildx-action@v1
with:
install: true

- name: Build pipeline docker image
working-directory: ./spaceflights
run: |
docker build --build-arg BASE_IMAGE=python:3.8-buster --tag kedro-kubeflow-e2e:latest --load .
- name: Publish docker image to GCR
uses: mattes/gce-docker-push-action@v1
with:
creds: ${{ secrets.GOOGLE_CLOUD_TOKEN_JSON }}
src: kedro-kubeflow-e2e:latest
dst: gcr.io/gid-ml-ops-sandbox/kedro-kubeflow-e2e:${{ github.sha }}

- name: Set up GCP Credentials
uses: google-github-actions/auth@v0.6.0
with:
credentials_json: ${{ secrets.GOOGLE_CLOUD_TOKEN_JSON }}
create_credentials_file: true
cleanup_credentials: true

- name: Run project on kubeflow pipelines
working-directory: spaceflights
run: |
kedro kubeflow upload-pipeline
kedro kubeflow run-once --wait-for-completion --timeout 1200
env:
KEDRO_CONFIG_KUBEFLOW_HOSTNAME: ${{ secrets.KUBEFLOW_HOSTNAME }}
KEDRO_CONFIG_COMMIT_ID: ${{ github.sha }}
KEDRO_CONFIG_RUN_ID: ${{ github.run_id }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,9 @@ venv.bak/
# mypy
.mypy_cache/

# pyspelling
dictionary.dic

docs/_build

spaceflights/
13 changes: 11 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.5.4
rev: 5.10.1
hooks:
- id: isort
args: ["--profile", "black", "--line-length=79"]
- repo: https://github.com/psf/black
rev: stable
rev: 22.6.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: flake8
args: ['--ignore=E203,W503'] # see https://github.com/psf/black/issues/315 https://github.com/psf/black/issues/52
- repo: https://github.com/getindata/py-pre-commit-hooks
rev: v0.1.3
hooks:
- id: pyspelling-docker
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: check-yaml

35 changes: 35 additions & 0 deletions .spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
spellchecker: aspell
matrix:
- name: Check the english docs
aspell:
ignore-case: ""
lang: en
sources:
- "docs/**/*.md"
- "CONTRIBUTING.md"
- "README.md"
default_encoding: utf-8
pipeline:
- pyspelling.filters.context:
context_visible_first: true
escapes: \\[\\`~]
delimiters:
# Ignore multiline content between fences (fences can have 3 or more back ticks)
# ```
# content
# ```
- open: '^(?s)(?P<open>`{1,3})[^`]'
close: '(?P=open)'
# Ignore text between inline back ticks
- open: '(?P<open>`)[^`]'
close: '(?P=open)'
# Ignore text in brackets [] and ()
- open: '\['
close: '\]'
- open: '\('
close: '\)'
- open: '\{'
close: '\}'
dictionary:
wordlists:
- docs/spellcheck_exceptions.txt

0 comments on commit 45bf6c5

Please sign in to comment.