Skip to content

Conversation

albu-diku
Copy link
Contributor

No description provided.

@albu-diku albu-diku force-pushed the addition/object_type_template branch 3 times, most recently from 6c221a4 to eb8f895 Compare March 1, 2025 12:16
@albu-diku albu-diku force-pushed the addition/object_type_template branch from e42acc7 to 21a5ef0 Compare March 11, 2025 13:11
@albu-diku albu-diku force-pushed the addition/object_type_template branch from f718ae4 to 6abeec6 Compare March 23, 2025 13:05
Copy link
Contributor

@jonasbardino jonasbardino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a first glance it looks sensible and usable enough.
I still would like a short write-up or analysis of what we want / need and some sort of brief evaluation of available template engines including features and performance. Bonus for thoughts and numbers backing the choice of granularity to be the individual output object entries.
We may still very well go with jinja2 but just to make sure it's in fact the best match.

This being a draft I'll refrain from commenting much on the obvious polish missing before it's ripe for actual merging, but from a quick glance you probably want to fix a few typos in var and function names, go over license headers and consider doc strings :)

@albu-diku albu-diku force-pushed the addition/object_type_template branch from 6abeec6 to d8a9b39 Compare September 3, 2025 15:55
Recent changes to the linting checks have resulted in any changes in and
around configuration fail in CI with the complaint that logger is not
defined.

In trying to understand what was happening it was found that some amount
of confusion was occurring having both logger and logger_obj properties.
Attempt to fix this by:
1) unconditionally defining both properties
2) always setting both properties
3) determining the type of logger being assigned and set the internal
   properties as appropriate

Expanding on the latter, loggers are almost always set as assignment to
.logger, but this was not always being passed the same kind of object. At
times this was a bare logger (i.e. info(), .debug() etc) but sometimes it
was something with .reopen() which would then simply be thrown away and
thus reload() would not actually work. Fix this by detecting a .reopen()
method and correctly referencing such an object.
This change adds a small namespace to configuraton objects that behaves
like a dictonary allowing objects to made available to e.g. request
handlers.

Opt to do this by specialising Configuration rather than changing it
directly. The rationale is to preserve a distinction between static
parts of the configuration of a dpeloyment, which do no change at
runtime, versus e.g. a users locale which would be different for
each request though consistent for its duration.

Such functionality it needed to support templates without restorting
to globals within the current system architecture; only congifuration
objects are already threaded through most of the places this would
need to be available with the correct semantics of an instance being
created wherever it is needed.

RuntimeConfiguration
@albu-diku albu-diku force-pushed the addition/object_type_template branch from d8a9b39 to 8a9e55b Compare September 12, 2025 11:49
This addds the necessary logic both to maintain a store of templates
and makiung them available for serving within any page via a new
template object type.

Make sure there is a separation of the test templates from the mainline
stuff by wiring a TEMPLATES section into Configuration and reading the
necessary paths via the loaded configuration. Doing so allows both
source location and the cache directory to be optionally specified via
the main ini file and thus are runtime accessible without hard-coding.
Use this facility within the tests to adjust the paths.
@albu-diku albu-diku force-pushed the addition/object_type_template branch from b451c4e to 5a36ff2 Compare September 12, 2025 12:27
@albu-diku albu-diku marked this pull request as ready for review September 12, 2025 12:31
@albu-diku
Copy link
Contributor Author

Remaining lint failures are in pre-existing code unchanged by this PR.

@albu-diku albu-diku marked this pull request as draft October 17, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants