hhoeflin / mkreports

A package for creating markdown data analysis reports from python
https://hhoeflin.github.io/mkreports
MIT License
9 stars 0 forks source link

Refactor md class #17

Closed hhoeflin closed 2 years ago

hhoeflin commented 2 years ago

The markdown classes should be refactored. Instead of returning requirements, backmatter and core markdown separately, this should be given as a single return value for core and backmatter and as a classmethod for the requirements.

The core and backmatter markdown should certainly be returned as a single type instance. The reason is that otherwise, additional coordination needs to be done regarding saving of ids or the page_path where the object is supposed to be stored.

For the requirements, the reason is that the requirements only depend on the class, not individual instances.

hhoeflin commented 2 years ago

Closed in https://github.com/hhoeflin/mkreports/commit/fe1bda6fcf0933a8e54b578d11a70b3d01c246f7.

Requirements are still instance methods as otherwise the MdSeq does not work properly or other containers that need to pass along requirement information.