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

Validation improvements, including date checking #258

Merged
merged 3 commits into from
Jan 10, 2017

Conversation

garrett
Copy link
Contributor

@garrett garrett commented Jan 10, 2017

  • only parse directories starting with 20 (for years), so build directory is not included
  • sorts the parsing order (so you won't see errors with 2017 and then 2015, if there were errors spanning years)
  • use Ruby's DateTime parsing to validate talk datetimes (which should still allow flexibility AND now with a correctness check)

(yeah, this is limited, but I really hope this script isn't around in
2100 — and even if it is, it can be tweaked at that point in time)
@garrett garrett self-assigned this Jan 10, 2017
@garrett garrett changed the title Validate improvements, including date checking Validation improvements, including date checking Jan 10, 2017
@garrett garrett merged commit 4f36478 into master Jan 10, 2017
@garrett garrett deleted the validate-fixes-including-date-checking branch January 10, 2017 10:15
@garrett
Copy link
Contributor Author

garrett commented Jan 10, 2017

@rbowen, @duck-rh, @mscherer: This is what we talked about in IRC yesterday. This implementation should work as we had decided (see issue #257). Please feel free to enhance otherwise.

@rbowen
Copy link
Contributor

rbowen commented Jan 10, 2017 via email

@garrett
Copy link
Contributor Author

garrett commented Jan 10, 2017

We can add additional checks, either via the schema or through Ruby (like this check), if you'd like. It should be pretty simple. However, that being said, I think most other things that need to be checked for are done so via the kwalify-based schema (schema.yml).

The datetimes on the talks were the main things lacking, as they had to be string-type (well, strings that match a regular expression). Happy that we now have logic.


One oversight, as I look at the code: Timezones (including daylight savings time) aren't checked. They should exist, and be in the correct daylight savings time. (Ruby's DateTime.parse seems to ignore incorrect timezones.)

@garrett
Copy link
Contributor Author

garrett commented Jan 10, 2017

Added an issue to implement timezone checking: #260.

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.

2 participants