mrwilson / adr-viewer

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

refactor: Clean up ADR parsing #53

Closed mrwilson closed 9 months ago

mrwilson commented 9 months 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.