Skip to content
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

Update benchmark.yml #206

Merged
merged 8 commits into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -33,7 +33,6 @@ jobs:
python-version: "3.10"
- name: Install test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install geopandas numpy fire altair vl-convert-python
- name: Install latest topojson version from pypi
@@ -54,9 +53,14 @@ jobs:
- name: Create visz from benchmark results!
run: python tests/benchmark_visz.py

- name: Commit benchmark png
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: "generate benchmark chart"
add: "tests/benchmark_chart.png --force"
- uses: iterative/setup-cml@v2
- name: Include benchmark-image as comment to PR
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
run: |
cat <<EOF > benchmark.md
#### Benchmark result
![benchmark](./tests/benchmark_chart.svg)
These PR changes are benchmarked against three files, compared with PyPi's latest release and the repository's main branch.
EOF
cml comment create --publish --pr=false benchmark.md
2 changes: 1 addition & 1 deletion tests/benchmark_visz.py
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ def stats_to_visz():
)

# save chart as png using okab as save method
chart.save("tests/benchmark_chart.png", scale_factor=2)
chart.save("tests/benchmark_chart.svg", scale_factor=1)


if __name__ == "__main__":