-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add MobilityData Validator #916
Conversation
a84efdb
to
cf5fdad
Compare
if (!rule) return null | ||
|
||
const errorClass = `gtfs-error-${mobilityDataValidationErrorMapping[notice.severity]}` | ||
const [expanded, setExpanded] = useState(notice.totalNotices < 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are you not sure about? If 2 is a good number for when to show the notices?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and if we should expand by default at all?
Is this ready for review? I'm getting white screening on selecting a MobilityDataValidation item |
Yes it is! Could you please share which feed this is happening with? Could be a certain feed/rule that's causing the issue. |
I've implemented one of a few possible solutions to your problem. Let me know what you think! |
lib/manager/components/validation/MobilityDataValidationResult.js
Outdated
Show resolved
Hide resolved
lib/manager/components/validation/MobilityDataValidationResult.js
Outdated
Show resolved
Hide resolved
Thanks Phil all changes are addressed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's looking good to me. I'll leave it to the second reviewer to comment on adjusting the width of the table columns.
Yes this is a timing issue on the sever. Could you possibly open a ticket there @philip-cline |
The speed issue is resolved by ibi-group/datatools-server#525 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only a few nits, other than that this is some of the best code I've ever seen. Thanks!
if (!rule) return null | ||
|
||
const errorClass = `gtfs-error-${mobilityDataValidationErrorMapping[notice.severity]}` | ||
const [expanded, setExpanded] = useState(notice.totalNotices < 2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are you not sure about? If 2 is a good number for when to show the notices?
|
||
const MobilityDataValidationResult = (props) => { | ||
const { notice } = props | ||
const rule = rules.find((rd) => rd.rule === notice.code) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would indexOf
be more efficient here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be but I think it would be dirtier code wouldn't it
lib/manager/components/validation/MobilityDataValidationResult.js
Outdated
Show resolved
Hide resolved
lib/manager/components/validation/MobilityDataValidationResult.js
Outdated
Show resolved
Hide resolved
Somebody show this guy the exception date range editor 😮💨 |
Thanks @daniel-heppner-ibigroup! All changes are addressed |
Checklist
dev
before they can be merged tomaster
)Description
Adds support for viewing MobilityData validation results. Also adds a new script for importing the rules.md file from the repo into the codebase.