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

feat: add playground #22

Merged
merged 14 commits into from
Jun 15, 2023
Merged

feat: add playground #22

merged 14 commits into from
Jun 15, 2023

Conversation

Weetbix
Copy link
Collaborator

@Weetbix Weetbix commented Jun 14, 2023

This PR adds a local development playground which shows the various metric scores.

To run, make sure you yarn and then run yarn playground:dev

Changes:

  • Add playground
  • Split readability.ts filesystem usage to another file so that we can import the original file in a web project (no node usage with glob).
image

@github-actions
Copy link

github-actions bot commented Jun 14, 2023

Overall readability score: 19.97/100 (🔴 -0.45)

File Readability
README.md 21.51 (🔴 -1.81)
View detailed metrics

🟢 - Shows an increase in readability
🔴 - Shows a decrease in readability

File Readability FRE GF ARI CLI DCRS
README.md 21.51 43.8 16.77 29 12.08 7.62
  🔴 -1.81 🔴 -1.02 🔴 -0.33 🔴 -0.5 🔴 -0.29 🟢 +0.02

Averages:

  Readability FRE GF ARI CLI DCRS
Average 19.97 13.92 16.96 19.25 15.17 9.51
  🔴 -0.45 🔴 -0.25 🔴 -0.08 🔴 -0.13 🔴 -0.07 🟢 +0.01
View metric targets
Metric Range Ideal score
Flesch Reading Ease 100 (very easy read) to 0 (extremely difficult read) 60
Gunning Fog 6 (very easy read) to 17 (extremely difficult read) 8 or less
Auto. Read. Index 6 (very easy read) to 14 (extremely difficult read) 8 or less
Coleman Liau Index 6 (very easy read) to 17 (extremely difficult read) 8 or less
Dale-Chall Readability 4.9 (very easy read) to 9.9 (extremely difficult read) 6.9 or less

@Weetbix Weetbix marked this pull request as ready for review June 14, 2023 09:25
@Weetbix Weetbix requested a review from noon-dawg June 14, 2023 09:25
README.md Outdated
@@ -94,6 +94,7 @@ jobs:
| `build` | build the dist file. You are required to run this locally in order to build the dist before opening a PR. |
| `run:local:report` | Run the action on two local folders, for testing and development. The first argument is the old ("base branch") folder and the sedcond argument is the new ("head branch") folder. For example `yarn run:local:report ./test-data/old ./test-data/new` |
| `run:local:debugfile` | Show what the program parses from a single file, after stripping all non-wanted items from the file, and before rating the readability. For example `yarn run:local:debugfile ./test-data/new/test-document.md` |
| `playground:dev` | Open the playground in local development mode for testing readability scores |
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the decrease in readability is because this sentence doesn't end with a period

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added periods to them all and the score didn't change.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure what decreased the score then 😕

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Its a small amount of content so I think the sore can be sway easily by the addition or removal of a few lines.

noon-dawg
noon-dawg previously approved these changes Jun 14, 2023
Copy link
Contributor

@noon-dawg noon-dawg left a comment

Choose a reason for hiding this comment

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

This is awesome!!! 🚀 🚀 🚀

@Weetbix Weetbix merged commit 3d7d9d6 into main Jun 15, 2023
4 checks passed
@Weetbix Weetbix deleted the jh/add-playground branch June 15, 2023 07:42
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.

None yet

2 participants