-
Notifications
You must be signed in to change notification settings - Fork 303
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
Benchmark Supported Data Types #2206
Open
pvk-developer
wants to merge
35
commits into
main
Choose a base branch
from
issue-2200-supported-data-types-benchmark
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
6ae829d
Add benchmarking for data types
pvk-developer c7f08b0
Add dependency
pvk-developer 014a68f
Fix lint
pvk-developer 1934059
Add to integration workflow
pvk-developer 633447e
Fix constraints evaluating int or float instances
pvk-developer ba10af8
Update benchmark workflow to ignore errors
pvk-developer 1aff4d9
Fix lint
pvk-developer ecbc660
Fix lint from ruff
pvk-developer e270e16
Split gdrive utils
pvk-developer e3f337a
Fix lint
pvk-developer 3e218b6
Split data, reorganize code base and add slack messaging
pvk-developer 1cdf943
Fix: install the dependencies when running the report
pvk-developer e94a4bf
Use args for utils
pvk-developer dae1d47
Fix lint
pvk-developer c484891
Fix parseargs
pvk-developer 76dc7ef
Add credentials
pvk-developer 23cfbb6
Improve slack message
pvk-developer 0db3da5
Fix workflow uploading spreadsheet
pvk-developer 0e6ab21
Fix message formatting
pvk-developer 5c6e272
Fix: Typo code
pvk-developer c8fdecc
Add summary and improve slack messaging
pvk-developer b25a9ce
Rename method
pvk-developer b53cb5a
Rename method in utility.py
pvk-developer 6f2ff18
Fix report generation
pvk-developer 4bafbda
Change artifact download order
pvk-developer f99e13e
Fix saving to csv / json. Improve messaging
pvk-developer a6ae49e
Improve summary report
pvk-developer 7b3bbfa
Add excluded tests
pvk-developer 5059b7b
Reduce workflows while testing
pvk-developer e4cd822
Add py38 failing combinations
pvk-developer eb24dc3
Remove args
pvk-developer 0b637e4
Remove summary for now
pvk-developer 3269b8e
Try channel with #
pvk-developer de9b4ee
Do one slack message instead
pvk-developer bd52d6e
Remove response from comparing dfs
pvk-developer 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,77 @@ | ||
name: Data Types Benchmark | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
run_dtypes_benchmark: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install invoke .[test] | ||
|
||
- name: Create folder and JSON file | ||
run: | | ||
mkdir -p results | ||
touch results/${{ matrix.python-version }}.json | ||
|
||
# Run the benchmarking | ||
- name: Benchmark Data Types | ||
env: | ||
PYDRIVE_CREDENTIALS: ${{ secrets.PYDRIVE_CREDENTIALS }} | ||
run: | | ||
invoke benchmark-dtypes | ||
|
||
# Upload the CSV files as artifacts | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: results-${{ matrix.python-version }} | ||
path: results/*.csv | ||
|
||
generate_dtypes_report: | ||
runs-on: ubuntu-latest | ||
needs: run_dtypes_benchmark | ||
|
||
steps: | ||
# Download the artifacts | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: results/ | ||
|
||
# Set up Python 3.10 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies for report | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[test] | ||
|
||
# Generate the report | ||
- name: Generate the report | ||
env: | ||
PYDRIVE_CREDENTIALS: ${{ secrets.PYDRIVE_CREDENTIALS }} | ||
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | ||
|
||
run: python -m tests.benchmark.utils |
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 |
---|---|---|
@@ -1,52 +1,84 @@ | ||
name: Release Notes Generator | ||
name: Data Types Benchmark | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
branch: | ||
description: 'Branch to merge release notes into.' | ||
run_tests: | ||
description: 'Run integration and unit tests' | ||
required: true | ||
default: 'main' | ||
version: | ||
description: | ||
'Version to use for the release. Must be in format: X.Y.Z.' | ||
date: | ||
description: | ||
'Date of the release. Must be in format YYYY-MM-DD.' | ||
type: boolean | ||
default: true | ||
|
||
jobs: | ||
releasenotesgeneration: | ||
run_dtypes_benchmark: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v5 | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install requests==2.31.0 | ||
python -m pip install --upgrade pip | ||
python -m pip install invoke .[test] | ||
|
||
- name: Create folder and JSON file | ||
run: | | ||
mkdir -p results | ||
touch results/${{ matrix.python-version }}.json | ||
|
||
- name: Generate release notes | ||
# Run the benchmarking | ||
- name: Benchmark Data Types | ||
env: | ||
GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }} | ||
run: > | ||
python scripts/release_notes_generator.py | ||
-v ${{ inputs.version }} | ||
-d ${{ inputs.date }} | ||
|
||
- name: Create pull request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v4 | ||
PYDRIVE_CREDENTIALS: ${{ secrets.PYDRIVE_CREDENTIALS }} | ||
run: | | ||
invoke benchmark-dtypes | ||
|
||
# Upload the json files as artifacts | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: results-${{ matrix.python-version }} | ||
path: results/*.json | ||
|
||
generate_dtypes_report: | ||
runs-on: ubuntu-latest | ||
needs: run_dtypes_benchmark | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
# Set up Python 3.10 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
|
||
- name: Install dependencies for report | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[test] | ||
|
||
# Download the artifacts | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
token: ${{ secrets.GH_ACCESS_TOKEN }} | ||
commit-message: Release notes for v${{ inputs.version }} | ||
author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" | ||
committer: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>" | ||
title: v${{ inputs.version }} Release Notes | ||
body: "This is an auto-generated PR to update the release notes." | ||
branch: release-notes | ||
branch-suffix: short-commit-hash | ||
base: ${{ inputs.branch }} | ||
path: results/ | ||
|
||
# Generate the report | ||
- name: Generate the report | ||
env: | ||
PYDRIVE_CREDENTIALS: ${{ secrets.PYDRIVE_CREDENTIALS }} | ||
SLACK_TOKEN: ${{ secrets.SLACK_TOKEN }} | ||
|
||
run: python -m tests.benchmark.utils |
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
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 @@ | ||
"""External utility functions.""" |
Oops, something went wrong.
Oops, something went wrong.
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.
are we still running the tests every time without updating the sheet?
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.
Yes, the benchmark is only for
message
in slack andupdating the gdrive
.