Skip to content

Commit

Permalink
pathway: add readme badges (#5392)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: b1e49f4f9df27319ab6d7332e316e236d0df9626
  • Loading branch information
pw-ppodhajski authored and Manul from Pathway committed Jan 23, 2024
1 parent 97f33a4 commit a784830
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/mac_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: macOS - test
on:
push:
branches:
- 'main'
jobs:
test-macos:
strategy:
fail-fast: false
uses: pathwaycom/pathway/.github/workflows/package_test.yml@main
with:
runner: 'ec2-macOS'
secrets: inherit
153 changes: 153 additions & 0 deletions .github/workflows/package_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: .whl test
on:
workflow_call:
inputs:
runner:
description: 'select runner'
type: string
required: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop'}}
env:
AWS_S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
MINIO_S3_SECRET_ACCESS_KEY: ${{ secrets.MINIO_S3_SECRET_ACCESS_KEY }}
jobs:
Build_packages:
name: Build packages
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
os:
- ${{ inputs.runner }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5

- name: Git checkout
uses: actions/checkout@v4

- name: License files
run: |
rm -f LICENSE_*-LICENSE-*
for filename in library_licenses/*; do cp "$filename" "LICENSE_$(basename "${filename}")"; done;
- name: Set package version
id: set-version
run: |
BUILD_NUMBER="${{ github.run_number }}"
PACKAGE_VERSION=$(perl -nle 'print $& while m{^version[[:space:]]*=[[:space:]]"\K[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+(?=")}g' Cargo.toml)
[[ -z "$PACKAGE_VERSION" ]] && { echo "Malformed package version in Cargo.toml" ; exit 1; }
NEXT_PATCH_VERSION=$(echo "${PACKAGE_VERSION}" | awk -F. -v OFS=. '{$NF += 1 ; print}')
DEV_VERSION="\"${NEXT_PATCH_VERSION}-dev${BUILD_NUMBER}\""
SED_RESULT=$(sed -i -r -E 's/^(version)[[:space:]]*=[[:space:]]"([[:digit:]]+\.[[:digit:]]+).[[:digit:]]+"/\1 = '"$DEV_VERSION"'/ w /dev/stdout' Cargo.toml)
echo $DEV_VERSION
echo "__version__ = ${DEV_VERSION}" > python/pathway/internals/version.py
- name: Build package Ubuntu x86-x64
if: ${{ matrix.os == 'ubuntu-22.04'}}
uses: PyO3/maturin-action@v1
with:
maturin-version: 0.14.17
command: build
args: --release --strip
manylinux: auto
rustup-components: rust-std
working-directory: .
sccache: true
before-script-linux: yum install -y perl-core

- name: Build package macOS Apple silicon
if: ${{ matrix.os == 'ec2-macOS'}}
uses: PyO3/maturin-action@v1
env:
MACOSX_DEPLOYMENT_TARGET: "10.15"
DEVELOPER_DIR: /Library/Developer/CommandLineTools
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
with:
maturin-version: 0.14.17
command: build
args: --release --strip
target: universal2-apple-darwin
manylinux: auto
rustup-components: rust-std
working-directory: .

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: pathway-${{ matrix.os }}
path: target/wheels/
pytest:
needs: Build_packages
name: ${{ matrix.os }} pytest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
os:
- ${{ inputs.runner }}
runs-on: ${{ matrix.os }}
timeout-minutes: 45
steps:
- name: Set up Python ${{ matrix.python-version }}
if: ${{ matrix.os != 'ec2-macOS'}}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: actions/download-artifact@v4
with:
name: pathway-${{ matrix.os }}
path: target/wheels/

- name: Install and verify ${{ matrix.os }} package
run: |
set -ex
ENV_NAME="testenv_${{ matrix.python-version }}"
rm -rf "${ENV_NAME}"
python"${{ matrix.python-version }}" -m venv "${ENV_NAME}"
source "${ENV_NAME}/bin/activate"
WHEEL=(target/wheels/pathway-*.whl)
pip install --prefer-binary "${WHEEL}[tests]"
# --confcutdir anything below to avoid picking REPO_TOP_DIR/conftest.py
if [[ "$RUNNER_NAME" == *mac* ]]; then
export PYTEST_XDIST_AUTO_NUM_WORKERS=4
fi
export PYTEST_ADDOPTS="--dist worksteal -n auto"
python -m pytest -v --confcutdir "${ENV_NAME}" --doctest-modules --pyargs pathway
Notify_on_failure:
needs:
- Build_packages
- pytest
if: failure()
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
with:
channel-id: "{{ secrets. SLACK_CI_ALERT }}" ## #ci-alerts channel
# For posting a simple plain text message
payload: |
{
"text": "Repository: ${{ github.repository }}\nAction name: ${{ github.workflow }}\nGitHub Action test: failure :manul:\nPR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\nAction run URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\nPR Author: ${{ github.actor }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Repository: ${{ github.repository }}\nAction name: ${{ github.workflow }}\nGitHub Action test: failure :manul:\nPR URL: ${{ github.event.pull_request.html_url || github.event.head_commit.url }}\nAction run URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\nPR Author: ${{ github.actor }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
13 changes: 13 additions & 0 deletions .github/workflows/ubuntu_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: ubuntu - test
on:
push:
branches:
- 'main'
jobs:
test-ubuntu:
strategy:
fail-fast: false
uses: pathwaycom/pathway/.github/workflows/package_test.yml@main
with:
runner: 'ubuntu-22.04'
secrets: inherit
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@
<img src="https://img.shields.io/badge/OS-macOS-green" alt="macOS"/>
<a href="https://github.com/pathwaycom/pathway/blob/main/LICENSE.txt">
<img src="https://img.shields.io/badge/license-BSL-green" alt="License: BSL"/></a>
<a href="https://github.com/pathwaycom/pathway/graphs/contributors">
<br>
<a href="https://github.com/pathwaycom/pathway/actions/workflows/release.yml">
<img src="https://github.com/pathwaycom/pathway/actions/workflows/release.yml/badge.svg" alt="Last release"/></a>
<a href="https://badge.fury.io/py/pathway"><img src="https://badge.fury.io/py/pathway.svg" alt="PyPI version" height="18"></a>
<a href="https://badge.fury.io/py/pathway"><img src="https://static.pepy.tech/badge/pathway" alt="PyPI downloads" height="18"></a>
<br>
<a href="https://discord.gg/pathway">
<img src="https://img.shields.io/discord/1042405378304004156?logo=discord"
alt="chat on Discord"></a>
<a href="https://twitter.com/intent/follow?screen_name=pathway_com">
<img src="https://img.shields.io/twitter/follow/pathway_com?style=social&logo=twitter"
<img src="https://img.shields.io/twitter/follow/pathwaycom"
alt="follow on Twitter"></a>
<a href="https://linkedin.com/company/pathway">
<img src="https://img.shields.io/badge/pathway-0077B5?style=social&logo=linkedin" alt="follow on LinkedIn"></a>
<br>
<a href="https://github.com/dylanhogg/awesome-python/blob/main/README.md">
<img src="https://awesome.re/badge.svg" alt="Awesome Python"></a>
<br>
<a href="#getting-started">Getting Started</a> |
<a href="#example">Example</a> |
<a href="#performance">Performance</a> |
Expand All @@ -29,8 +35,6 @@

</p>



# Pathway<a id="pathway"></a>

[Pathway](https://pathway.com) is an open framework for high-throughput and low-latency real-time data processing. It is used to create Python code which seamlessly combines batch processing, streaming, and real-time API's for LLM apps. Pathway's distributed runtime (🦀-🐍) provides fresh results of your data pipelines whenever new inputs and requests are received.
Expand Down

0 comments on commit a784830

Please sign in to comment.