Open vveliev-tc opened 1 year ago
I was actually not sure about the name for the folder, since there is a git ignore for lib
https://github.com/saltstack-formulas/template-formula/blob/master/.gitignore#L18
should it be libs/jinja/map.jinja
or just libs/map.jinja
?
I was actually not sure about the name for the folder, since there is a git ignore for
lib
https://github.com/saltstack-formulas/template-formula/blob/master/.gitignore#L18should it be
libs/jinja/map.jinja
or justlibs/map.jinja
?
I personally prefer libs/map.jinja
.
Regards.
If we all three agree for /libs
directory, let's go for it! :)
This might be a minor detail, but I would go for lib
myself. The fact that lib
is in .gitignore
seems to be by accident rather than by design.
let agree on the style before I change it again :).
lib/s - maybe confused with formula libs IMO. altho is usually under package/install for formulas jinja - indicates that it's jinja files
I have no strong opinion on any of them as long as its not in formula root directory
let agree on the style before I change it again :).
lib/s - maybe confused with formula libs IMO. altho is usually under package/install for formulas jinja - indicates that it's jinja files
I have no strong opinion on any of them as long as its not in formula root directory
Actually, there is only a single formula with a libs/
directory, hadoop-formula.
This formula is not updated since 2018 so I really advocate to don't bother and use libs/
;-)
Regards.
Thanks :)
Now, I'm wondering how to translate this to ssf-formula
:sweat_smile:
Hello, looking at this for another formula, I wonder if the per formula post-map.jinja
shouldn't be under parameters/
instead of libs/
.
This post-map.jinja
is more about specific data manipulations instead of a generic library.
As a user of a formula, I'll give more attention to files under parameters/
to understand a formula rather than under libs/
.
Only 2 formulas use this post-map.jinja
for now:
Thanks :)
Now, I'm wondering how to translate this to
ssf-formula
sweat_smile
I have no idea neither. This is a problem because I think only Imran knows how it works
Hello, looking at this for another formula, I wonder if the per formula
post-map.jinja
shouldn't be underparameters/
instead oflibs/
.This
post-map.jinja
is more about specific data manipulations instead of a generic library.As a user of a formula, I'll give more attention to files under
parameters/
to understand a formula rather than underlibs/
.Only 2 formulas use this
post-map.jinja
for now:
I'm not sure to be honest sounds like parameters/
will be better place for post-map.jinja
as jinja files will be expected under parameters as well.
does it need to be resolved for this PR?
I'm not sure to be honest sounds like
parameters/
will be better place forpost-map.jinja
as jinja files will be expected under parameters as well.
I'm not sure to understand your point 🤔
To me:
libs/
is a good place for code reusable between formulas, which could easily be managed by automation tools like ssf-formulapost-map.jinja
is not something generic but much more formula dependent and, to me, it makes sense to put it somewhere elsedoes it need to be resolved for this PR?
This PR will be a starting point for new standard accross formulas, I think we should take time to make it clean and permit to everybody to give their points.
Regards.
@baby-gnu I think we are on the same page, I have updated map.jinja to reflect that.
Is there anythinb else I should change?
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]
Changes related to the build system[chore]
Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]
Changes to the continuous integration configuration[feat]
A new feature[fix]
A bug fix[perf]
A code change that improves performance[refactor]
A code change that neither fixes a bug nor adds a feature[revert]
A change used to revert a previous commit[style]
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]
Documentation changes[test]
Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE
?No.
Related issues and/or pull requests
Describe the changes you're proposing
Simply moving jinja files to separate folder to make bit more cleaner root folder. (jinja may scare new contributors ;) )
Pillar / config required to test the proposed changes
Debug log showing how the proposed changes work
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context