plone / cookiecutter-zope-instance

It bakes configuration for Zope 5
BSD 3-Clause "New" or "Revised" License
7 stars 4 forks source link

Generate absolute paths #6

Closed me-kell closed 7 months ago

me-kell commented 1 year ago

See https://github.com/plone/cookiecutter-zope-instance/issues/5#issue-1446551887

me-kell commented 1 year ago

Are there any open questions or to dos? Can this PR be merged?

jensens commented 1 year ago

Are there any open questions or to dos? Can this PR be merged?

As mentioned in the review, there is a feature lost and we need a solution here before merge.

me-kell commented 1 year ago

Actually I have no idea how to solve both requirements (on the one side to handle path variables and on the other side to use a generic loop for string based environment variables) without marking and knowing the type of the variable.

One workaround could be to declare the path variables (in this case "CHAMELEON_CACHE") separated from the environment variables. Thus looping through the environment and treating them as strings and declaring CHAMELEON_CACHE separately (i.e. outside of the "environment" dictionary) and treating it as path.

IMHO we pay a high price (wrong paths) for having an elegant generic handling of (at the moment) only two (actually only one if we treat CHAMELEON_CACHE separately) variables.

Any idea?

jensens commented 7 months ago

I integrated your branch with some modifications around environment handling into toward-2.0 branch.