avwx-rest / avwx-engine

Aviation Weather parsing engine. METAR & TAF
MIT License
90 stars 31 forks source link

Initial work on refactor #26

Closed AirbusDriver closed 4 years ago

AirbusDriver commented 4 years ago

Reference #23

So, here's roughly what I was thinking... it's peppered with todo's and comments that should be beautified and documented once you decide what you like/dislike.

Stating the problem: Currently, the parsing is done by scanning across input strings and pulling patterns out based on string operations. This can be unwieldy over time as more translations are added that contain things like multi-word elements and/or similar patterns that have very subtle differences that may be handled too prematurely and incorrectly.

Common Terms

Application Structure:

I believe there are benefits from moving away from the flat package structure as this parsing system grows into more of a framework. However, only the classes required to make a module level parser should be in the __init__.py so that the API stays clean.

Things to think about:

I think this may end up being Gilligan's "Three Hour Tour". I'm happy to work on it with you, but we may want to make a Project Board for this and use issues for discussions on changes/implementation/planning.

Also, this code is ugly, unfinished, and undocumented. I wrote most of this on deadheads so by all means, change it all up! Once we get settled on the next steps, it may be a good idea to start writing up some docs for it.

devdupont commented 4 years ago

I'll merge this in and start playing with it this weekend. Thanks!