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 unit test to verify that every Notice has an entry in RULES.md #1331

Merged
merged 5 commits into from
Feb 17, 2023

Conversation

bdferris-v2
Copy link
Collaborator

Summary:

When writing new validation rules, we often forget to update RULES.md with updated documentation. While #1324 has some ideas on addressing that in the long term, in the short term, we can add a unit-test that will fail if there is an entry in RULES.md for a newly added notice.

For example, this test should fail initially because StopWithoutLocationNotice is missing from RULES.md per #1330.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Run the unit tests with gradle test to make sure you didn't break anything
  • Format the title like "feat: [new feature short description]". Title must follow the Conventional Commit Specification(https://www.conventionalcommits.org/en/v1.0.0/).
  • Linked all relevant issues

@github-actions
Copy link
Contributor

✅ Rule acceptance tests passed.
New Errors: 0 out of 1390 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Errors: 0 out of 1390 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
0 out of 1390 sources (~0 %) are corrupted.
Commit: e1a345b
Download the full acceptance test report here (report will disappear after 90 days).
✅ Rule acceptance tests passed.

@isabelle-dr
Copy link
Contributor

Thank you for adding this test @bdferris-v2 !

unit-test that will fail if there is an entry in RULES.md for a newly added notice.
You mean that will fail if there is no entry in RULES.md for a newly added notice, right?

Why is the test_pack_doc workflow failing in this PR?

@bdferris-v2
Copy link
Collaborator Author

@isabelle-dr the test is correctly identifying that StopWithoutLocationNotice is not properly documented in RULES.md and failing as result :)

@github-actions
Copy link
Contributor

✅ Rule acceptance tests passed.
New Errors: 0 out of 1391 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Errors: 0 out of 1391 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
0 out of 1391 sources (~0 %) are corrupted.
Commit: d749c0f
Download the full acceptance test report here (report will disappear after 90 days).
✅ Rule acceptance tests passed.

Copy link
Collaborator

@asvechnikov2 asvechnikov2 left a comment

Choose a reason for hiding this comment

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

A couple of questions, otherwise, looks good, thank you!

@bdferris-v2
Copy link
Collaborator Author

@asvechnikov2 thanks for the review!

@github-actions
Copy link
Contributor

✅ Rule acceptance tests passed.
New Errors: 0 out of 1391 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
Dropped Errors: 0 out of 1391 datasets (~0%) are invalid due to code change, which is less than the provided threshold of 1%.
0 out of 1391 sources (~0 %) are corrupted.
Commit: 0ff991a
Download the full acceptance test report here (report will disappear after 90 days).
✅ Rule acceptance tests passed.

@bdferris-v2 bdferris-v2 merged commit 865fc1e into master Feb 17, 2023
@bdferris-v2 bdferris-v2 deleted the issue/1324/rules_documentation_test branch February 17, 2023 06:12
KClough pushed a commit to JarvusInnovations/gtfs-validator that referenced this pull request Feb 24, 2023
….md (MobilityData#1331)

* Add a unit test that verifies that every Notice has an entry in RULES.md.
* Move notice schema scanning into ClassGraphDiscovery for consistency with other ClassGraph methods.
* Include doc changes in the test_pack_doc.yml workflow.
KClough pushed a commit to JarvusInnovations/gtfs-validator that referenced this pull request Mar 1, 2023
….md (MobilityData#1331)

* Add a unit test that verifies that every Notice has an entry in RULES.md.
* Move notice schema scanning into ClassGraphDiscovery for consistency with other ClassGraph methods.
* Include doc changes in the test_pack_doc.yml workflow.
ryon pushed a commit to JarvusInnovations/gtfs-validator that referenced this pull request Apr 1, 2023
….md (MobilityData#1331)

* Add a unit test that verifies that every Notice has an entry in RULES.md.
* Move notice schema scanning into ClassGraphDiscovery for consistency with other ClassGraph methods.
* Include doc changes in the test_pack_doc.yml workflow.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants