mrwilson / adr-viewer

Generate easy-to-read web pages for your Architecture Decision Records
MIT License
160 stars 27 forks source link

refactor: Clean up ADR parsing #53

Closed mrwilson closed 1 year ago

mrwilson commented 1 year ago

The code currently reads files and parses ADRs in the same place, and has a bit a of Primitive Obsession by using dict as a return type.

This changeset addresses both these things by introducing an Adr dataclass and separating file reading from parsing the ADR format.

These changes are a necessary prerequisite to implementing #52 because the parsing isn't sufficiently general.