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

Move PR preview to Checks tab and add statistics #881

Merged
merged 25 commits into from
Sep 22, 2023
Merged

Conversation

ZeLonewolf
Copy link
Member

@ZeLonewolf ZeLonewolf commented Jun 19, 2023

This PR adds statistics to the checks tab, which will show the change in layer size.
Additionally, this moves the PR Preview comment into the checks tab, to avoid email spamming.

@ZeLonewolf ZeLonewolf force-pushed the zlw-enhanced-stats branch from 5251825 to 1d1c634 Compare June 19, 2023 21:48
@ZeLonewolf ZeLonewolf marked this pull request as ready for review June 19, 2023 21:52
@jleedev
Copy link
Member

jleedev commented Jun 19, 2023

Maybe add a comment in scripts/stats.js or in its output expressing in words that this is the length of the serialized style JSON.

@ZeLonewolf
Copy link
Member Author

Maybe add a comment in scripts/stats.js or in its output expressing in words that this is the length of the serialized style JSON.

Added in 14d4403

scripts/stats.js Outdated Show resolved Hide resolved
scripts/stats.js Outdated Show resolved Hide resolved
.github/workflows/deploy-preview.yml Outdated Show resolved Hide resolved
@ZeLonewolf
Copy link
Member Author

Sample output, from the github actions log:

Style size statistics

main this PR change
Layers 349 349 0
Size (b) 1005817 1005817 0

Layer count comparison

main this PR change
background 1 1 0
landuse 1 1 0
park 3 3 0
aeroway 7 7 0
landcover 2 2 0
boundary 9 9 0
water 3 3 0
waterway 3 3 0
transportation 299 299 0
building 1 1 0
transportation_name 3 3 0
poi 2 2 0
water_name 2 2 0
aerodrome_label 4 4 0
place 9 9 0

Layer size comparison

main this PR change
background 122 122 0
landuse 309 309 0
park 2365 2365 0
aeroway 2059 2059 0
landcover 361 361 0
boundary 13691 13691 0
water 912 912 0
waterway 3543 3543 0
transportation 920221 920221 0
building 292 292 0
transportation_name 8838 8838 0
poi 10094 10094 0
water_name 4647 4647 0
aerodrome_label 5951 5951 0
place 32062 32062 0

Copy link
Member

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what’s going on with the random links unfortunately. Apparently something is getting piped through an environment where GitHub Actions is parsing content to autolink it.

scripts/stats_compare.js Outdated Show resolved Hide resolved
@ZeLonewolf
Copy link
Member Author

I manually copy/pasted the content from the output log of the github action, so that may or may not occur when the github action does the writing.

@ZeLonewolf
Copy link
Member Author

From some testing, it's happening at the browser/paste level so probably ignorable.

@ZeLonewolf ZeLonewolf force-pushed the zlw-enhanced-stats branch from 1d1affd to b9551db Compare June 23, 2023 22:35
@ZeLonewolf ZeLonewolf marked this pull request as ready for review June 23, 2023 23:06
@osm-americana osm-americana deleted a comment from github-actions bot Jun 23, 2023
@ZeLonewolf
Copy link
Member Author

The random linking issue does not occur when writing directly to the Checks tab.

@github-actions
Copy link

PR Preview:

Sprite Sheets:

Sprites 1x
Sprites 2x

@ZeLonewolf ZeLonewolf requested a review from 1ec5 July 4, 2023 21:32
@ZeLonewolf ZeLonewolf requested review from jleedev and akadouri July 4, 2023 21:32
Copy link
Member

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not seeing the statistics in the Checks tab. Is it dependent on merging to main?

scripts/stats_compare.js Outdated Show resolved Hide resolved
scripts/stats_compare.js Outdated Show resolved Hide resolved
scripts/stats_compare.js Outdated Show resolved Hide resolved
@1ec5
Copy link
Member

1ec5 commented Jul 18, 2023

Never mind, I missed this in the Check tab.

@ZeLonewolf ZeLonewolf marked this pull request as draft July 20, 2023 02:01
@ZeLonewolf ZeLonewolf changed the title Add statistics to PR preview Move PR preview to Checks tab and add statistics Jul 20, 2023
@ZeLonewolf ZeLonewolf marked this pull request as ready for review July 21, 2023 03:07
@ZeLonewolf ZeLonewolf requested a review from 1ec5 July 21, 2023 12:05
Copy link
Member

@1ec5 1ec5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. I’ll be glad to see this information go in the Checks tab rather than spam the comments.

scripts/object_compare.ts Show resolved Hide resolved
@ZeLonewolf ZeLonewolf merged commit 675dbe2 into main Sep 22, 2023
7 checks passed
@ZeLonewolf ZeLonewolf deleted the zlw-enhanced-stats branch September 22, 2023 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants