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

CODE: Parser for data/*examples.txt ignores final entry #61

Closed
danbri opened this issue Jul 8, 2014 · 3 comments
Closed

CODE: Parser for data/*examples.txt ignores final entry #61

danbri opened this issue Jul 8, 2014 · 3 comments
Assignees
Labels
site tools + python code Infrastructural issues around schema.org site. Most can ignore this! type:bug A mistake or malfunction whose remedy should be straightforward technical work

Comments

@danbri
Copy link
Contributor

danbri commented Jul 8, 2014

Each data/*examples.txt file currently has a bogus final entry ("FakeEntryNeeded, FixMeSomeDay"), since AddExample only gets called when a next item is encountered.

https://github.com/rvguha/schemaorg/blob/master/parsers.py#L76

Next step - let's get a failing test case for this.

@danbri
Copy link
Contributor Author

danbri commented Jul 8, 2014

It seems we need a fake entry only in the last file opened (since they're globbed and concatenated). And that only a TYPES: line is needed. I've trimmed excess fake examples and added some basic testing to make sure we're finding a plausible number of examples.

https://github.com/danbri/schemaorg/blob/e02389c164f0982060e009006dc07f494b8656fc/tests/test_basics.py#L48

For now, each additional data/*examples.txt file should have a boilerplate fake entry at the end, until this is fixed. The test test_finalExampleParsers expects to fail at the task of matching a FakeEntry example, since we know we'll fail to flush that final example to be stored after reading it.

@danbri
Copy link
Contributor Author

danbri commented Jan 21, 2015

This mostly hurts nothing but our pride, but should get fixed. Suggest next step is a branch with failing test cases.

@RichardWallis
Copy link
Contributor

Fixed in Audiobook #651

vholland added a commit that referenced this issue Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site tools + python code Infrastructural issues around schema.org site. Most can ignore this! type:bug A mistake or malfunction whose remedy should be straightforward technical work
Projects
None yet
Development

No branches or pull requests

2 participants