ruhiger Sommer im Garten in Geras

Andrew U. Frank

Andrew U. Frank

em.o.Univ.Prof. Dr. sc.techn. Dr. h.c. Dipl.Ing.

Andrew U. Frank

Architecture of the bake process

The bake process gradually converts the source texts into texts a html server can use (primarily HTML, PDF, JPG) and adds the supplementary files (mostly CSS to describe appearances.) (pdf)

Jan. 29, 2019

The architecture, i.e. the combination of implementations of functions to achieve the overall functionality of SSG, can be seen as steps and each step processing an input into some formats which are used by the next.

Command line processing:

The standard Unix-style command line analyzes the CLI input and passes it to the program. It establishes the directory in which the command was issued.

Processing of Layout (file settingsN.yaml)

List of the directory names and locations - to give flexibility on different distribution of the relevant directories. It is possible to have the code, the content (dough) and the directory where the served files are stored in three different locations.

Watching for changes

The use of twitch to watch for changes in the directories where input files exist and triggering the shake organized rebuilding process removes all tests for file changes in one point. If a change is detected, shake is called.

Given that shake is only redoing what is strictly necessary and caches older results, makes false positives — alerts to changes which are not substantiated — not dangerous and can be ignored.

Shake for rebuilding

Shake is checking for changes in the needed input files with precision and starts redoing what is necessary to update the result - filtering out false alerts from watching for changes.

Shake relies on filenames and specifically extension. It is important that files with different semantics have different extensions; for example, templates must be separated by extension for the specific processor.

Shake is managing all filenames and calls functions in the next (sublayer). It checks for existence of files and produces error messages when a file is not found — no further error processing for missing files neded.

In cases where files with the same extension (e.g. html or pdf) are given (in the dough directory) and are produced for some other files given as e.g. md files, the processing checks wether a file is given and if not, tries to produce it.

Transformation of filepath to Path

The FilePath typed files are translated to Path type, which differentiates relative and absoulute path to files or directories.

Processing

Processing layers are split again in two: a layer to read or write files (using typed files and typed content) before it is passed to the operations actually manipulating the data.

Issues : how to organize regression tests

In general, testing algebraic properties is difficult for complex data; I have a method to organize regression tests. Results from operations are stored and used for input later. The input and output of the test functions are typed to avoid problems with confusion in types between data written to disk and read from disk.

The construction of a test for a function is limited as another tested function must produce the input data.

Produced with `daino` from Essays/SSGdesign/09technical/015Architecture.html (public, publish) with master7tufte.dtpl.
daino and w3.css