Skip to content

Commit

Permalink
Merge pull request #22 from cisagov/improvement/switch_to_chevron
Browse files Browse the repository at this point in the history
Replace the `Pystache` package with `chevron`
  • Loading branch information
mcdonnnj committed Jan 19, 2022
2 parents 5644964 + 9e1e091 commit 15b0045
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def get_version(version_file):
package_dir={"": "src"},
py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")],
include_package_data=True,
install_requires=["pystache", "python-dateutil", "setuptools >= 24.2.0"],
install_requires=["chevron", "python-dateutil", "setuptools >= 24.2.0"],
extras_require={
"test": [
"coverage",
Expand Down
6 changes: 3 additions & 3 deletions src/apb_dashboard/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from typing import Optional

# Third-Party Libraries
import pystache
import chevron

TEMPLATE = """
# APB Status
Expand Down Expand Up @@ -78,10 +78,10 @@ def main() -> None:
with (Path(github_workspace_dir) / Path(template_filename)).open() as f:
template_data: str = f.read()
logging.info("Rendering template from external file.")
rendered = pystache.render(template_data, data)
rendered = chevron.render(template_data, data)
else:
logging.info("Rendering default template.")
rendered = pystache.render(TEMPLATE, data)
rendered = chevron.render(TEMPLATE, data)

# Write rendered data out to file
logging.info("Writing rendered data to: %s", write_filename)
Expand Down

0 comments on commit 15b0045

Please sign in to comment.