-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template bump cfg #927
Template bump cfg #927
Conversation
c41ba1c
to
1a4d18e
Compare
1a4d18e
to
b110735
Compare
b370603
to
2d842c4
Compare
templates/bootstrap/setup.py.j2
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arent we getting rid of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but that's a manual process, and we need to care about old branches too.
Switching the bootstrap to pyproject, i thought was a next step for another pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair
plugin-template
Outdated
@@ -487,7 +491,7 @@ def generate_relative_path_set(root_dir): | |||
return applicable_paths | |||
|
|||
|
|||
def write_template_to_file(template, plugin_root_dir, relative_path, config): | |||
def template_to_file(template, plugin_root_dir, relative_path, config): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the pattern of moving to_nice_yaml
and creating merge_toml
into utils.py
this should be moved too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, maybe.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷
old_toml[merge_key].update(data[merge_key]) | ||
tomlkit.dump(old_toml, path.open("w")) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a docstring minimum example of the desired behavior for this?
So we can glimps into this in the future and know what to expect.
plugin_root_dir, | ||
destination, | ||
template_vars, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This (and templates/github/pyproject.toml.tool.j2
) means we are managing only the tools section, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not exactly. We overwrite all the first level keys in the "tool" section when they are provided here.
We don't mess with other tools yet.
(hence the call to "update".)
2d842c4
to
7ad1c16
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
""" | ||
Template a file of the form 'basename.toml.merge_key' and combine its content beneath | ||
'merge_key' with the actual 'basename.toml' file. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
"ci_update_hour": ci_update_hour, | ||
"ci_update_hour": sum((ord(c) for c in config["plugin_app_label"])) % 24, | ||
"current_version": utils.current_version(plugin_root_path), | ||
"is_pulpdocs_member": config["plugin_name"] in utils.get_pulpdocs_members(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.