Skip to content
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

DM-48445: Replace ScriptTemplates with Jinja Template #160

Open
wants to merge 1 commit into
base: tickets/DM-48099/release
Choose a base branch
from

Conversation

tcjennings
Copy link
Contributor

@tcjennings tcjennings commented Jan 28, 2025

Removes ScriptTemplates from the application.

Does not deprecate or remove APIs related to ScriptTemplates, but eliminates the use of ScriptTemplates from both seed (example) files and script-generation functions and methods.

The concept of "script templates" is refactored using Jinja template files with "snippets" enabled or disabled based on configuration flags, e.g., "wms: htcondor" enables a template block that switches on the value of wms. In this way, a single template file can be considered, updated, and rendered according to the specific needs of a campaign instead of pulling in multiple template snippets from the database.

This pattern is also used in the process of writing a bash script to submit to htcondor for execution, with a simplified approach to setting up a "condor" or a "panda" stack environment and without the extra steps concerning clobbering and reimplementing environment variables in the shebang.

@tcjennings tcjennings changed the base branch from tickets/DM-48099/release to main January 28, 2025 22:34
@tcjennings tcjennings changed the base branch from main to tickets/DM-48099/release January 28, 2025 22:34
@tcjennings tcjennings force-pushed the tickets/DM-48099/release branch from 036b0f0 to 3635692 Compare January 29, 2025 14:25
@tcjennings tcjennings force-pushed the tickets/DM-48099/no_templates branch from f7b1ae0 to 4005184 Compare January 29, 2025 14:25
@tcjennings tcjennings changed the title Remove ScriptTemplates DM-48445: Replace ScriptTemplates with Jinja Template Jan 29, 2025
@tcjennings tcjennings force-pushed the tickets/DM-48099/release branch from 3635692 to b32f994 Compare January 29, 2025 16:55
@tcjennings tcjennings force-pushed the tickets/DM-48099/no_templates branch 2 times, most recently from 2b8d70c to 9d696be Compare January 29, 2025 18:26
@tcjennings tcjennings marked this pull request as ready for review January 30, 2025 15:15
@tcjennings tcjennings force-pushed the tickets/DM-48099/release branch from f0d5b44 to 88bfbf0 Compare January 30, 2025 18:34
@tcjennings tcjennings force-pushed the tickets/DM-48099/no_templates branch 2 times, most recently from bc8beaa to adbae29 Compare January 30, 2025 18:49
@tcjennings tcjennings force-pushed the tickets/DM-48099/release branch 2 times, most recently from a6511af to a58184e Compare January 30, 2025 19:08
@tcjennings tcjennings force-pushed the tickets/DM-48099/no_templates branch 2 times, most recently from 791f535 to ddd6efd Compare January 30, 2025 19:51
@tcjennings tcjennings force-pushed the tickets/DM-48099/release branch from a58184e to a5339f3 Compare January 30, 2025 22:20
@tcjennings tcjennings force-pushed the tickets/DM-48099/no_templates branch from ddd6efd to 1397c3f Compare January 30, 2025 22:23
@tcjennings tcjennings force-pushed the tickets/DM-48099/release branch 3 times, most recently from 7e95e3e to 0eaceab Compare January 30, 2025 22:44
Use Jinja2 templates for rendering scripts
Deprecate and remove use of ScriptTemplates
@tcjennings tcjennings force-pushed the tickets/DM-48099/no_templates branch from 1397c3f to d36e6d3 Compare January 31, 2025 15:29
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.

1 participant