Skip to content

Rename Pyspark dataframe columns with . example #3324

Rename Pyspark dataframe columns with . example

Rename Pyspark dataframe columns with . example #3324

Workflow file for this run

name: whylogs-ci
on:
pull_request:
push:
branches: [mainline, 1.0.x]
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
defaults:
run:
working-directory: python
env:
CODECOV_UPLOAD: false
POETRY_VERSION: "1.5.1"
PROTOC_VERSION: "3.19.4"
PYPI_PUBLISH: false
HEAP_APPID_DEV: "3422045963"
jobs:
python-ci:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, macOS-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
id: setup-python
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ env.POETRY_VERSION }}
- uses: actions/cache@v3
id: poetry-cache
name: Cache dependencies based on poetry.lock file
with:
path: ./.venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-
- name: Set up pre-commit cache
uses: actions/cache@v3
if: ${{ matrix.python-version == 3.8 && startsWith(runner.os, 'Linux')}}
with:
path: ~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: ${{ runner.os }}-pre-commit-
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: check poetry env
run: poetry env info
- name: configure telemetry
run: make telemetry-opt-out
- name: poetry cache hit
if: steps.poetry-cache.outputs.cache-hit == 'true'
run: echo 'poetry cache hit, skipping poetry install'
- name: Install dependencies
run: make install
- name: Run pre-commit checks
if: ${{ matrix.python-version == 3.8 && startsWith(runner.os, 'Linux')}}
run: make pre-commit
- name: Run build and test
run: make test
- name: Smoke test wheel in client environment
run: |
python -m venv verify
source verify/bin/activate
pip install --upgrade pip
pip install dist/whylogs*.whl
python tests/smoketest.py
deactivate
rm -rf verify
- name: Upload test coverage report to Codecov
uses: codecov/codecov-action@v2
if: env.CODECOV_UPLOAD == 'true'
with:
fail_ci_if_error: true
flags: unit
java-ci:
runs-on: [ubuntu-latest]
defaults:
run:
shell: bash
working-directory: java
steps:
- uses: actions/checkout@v3
- name: Change to Java dir
run: |
echo $(pwd)
- name: Setup Java 8
uses: actions/setup-java@v1
with:
java-version: 8
- name: Cache Gradle dependencies
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- uses: eskatos/gradle-command-action@v1
with:
build-root-directory: java
arguments: build
- name: Smoke test jar in client environment
uses: gradle/gradle-build-action@v2
with:
build-root-directory: java/smoketest
arguments: run
gradle-executable: java/gradlew
docs-ci:
needs: python-ci
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.9"]
steps:
- uses: actions/checkout@v4
- name: Install Poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: ${{ env.POETRY_VERSION }}
- uses: actions/setup-python@v5
id: docs
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- run: echo 'cache hit ${{ steps.docs.outputs.cache-hit }}'
- uses: nikeee/setup-pandoc@v1
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.PROTOC_VERSION }}
- name: Install dependencies for generating docs
run: poetry install --extras docs
- name: Building docs with sphinx
run: |
make proto -B
make docs
- name: Set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
if: ${{ github.ref != 'refs/heads/mainline' }}
- name: Publish docs
uses: JamesIves/github-pages-deploy-action@4.0.0
with:
branch: gh-pages
folder: python/docs/_build/html
if: ${{ github.ref == 'refs/heads/mainline' }}