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 error logs to parser #37

Merged
merged 11 commits into from
Aug 19, 2022
Merged

feat: add error logs to parser #37

merged 11 commits into from
Aug 19, 2022

Conversation

BryanH01
Copy link
Collaborator

@BryanH01 BryanH01 commented Aug 3, 2022

What

  • Adding error logs : reading errors, entries with same id, parent not found

@BryanH01 BryanH01 changed the title Improve parser feat: add error logs to parser Aug 3, 2022
Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

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

Really good, just added one comment, but I will fix it myself :-)

correctly_written.match(property_name)
and correctly_written.match(lc)
):
raise Exception
Copy link
Member

Choose a reason for hiding this comment

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

You have to instanciate the Exception when you throw it.

It's not a good pattern to use an Exception an empty expect, because you may hide some other exception. Here you just have to use the if / then / else

Copy link
Member

Choose a reason for hiding this comment

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

I see it's to unify handling of the ValueError in split, but I still think it's not a good idea ;-)

@alexgarel alexgarel marked this pull request as ready for review August 19, 2022 13:21
@alexgarel alexgarel requested a review from a team as a code owner August 19, 2022 13:21
@alexgarel alexgarel merged commit 2e8e49f into main Aug 19, 2022
@alexgarel alexgarel deleted the improve-parser branch August 19, 2022 13:25
@alexgarel
Copy link
Member

@BryanH01 thinking how we will use the parser, I think a good addition to your job, would be to collect errors instead of simply log them and add them in the neo4j database in a special parsing_errors entry.

@alexgarel
Copy link
Member

alexgarel commented Aug 19, 2022

⬆️ made it an issue : #57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants