Skip to content

Commit

Permalink
Update benchmark.yml (#206)
Browse files Browse the repository at this point in the history
* Update benchmark.yml

* Update benchmark.yml

* Update benchmark.yml

* Update benchmark.yml

* Update benchmark.yml

* Update benchmark_visz.py

* Update benchmark.yml

* Update benchmark.yml
  • Loading branch information
mattijn authored Oct 10, 2023
1 parent 5ec9e79 commit 2fdad44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Up @@ -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__":
Expand Down

0 comments on commit 2fdad44

Please sign in to comment.