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

Allow templates to be stored in subdirectories #65

Open
wants to merge 1 commit into
base: main_july_updates
Choose a base branch
from

Conversation

escesare
Copy link
Contributor

No description provided.

@@ -136,7 +136,7 @@ def get_available_templates(self, template_path: str) -> Dict[str, str]:
A dictionary containing the names and paths of the templates in the directory.
"""

all_templates = glob.glob(f"{template_path}/*.jinja")
all_templates = glob.glob(f"{template_path}/**/*.jinja", recursive=True)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This matches anything in the main directory as well as subdirectories, e.g.:

text2text/en/ner.jinja
text2text/en/qa.jinja
...
text2text/en/data_analysis/clustering.jinja

@monk1337 monk1337 requested a review from eren23 April 20, 2023 06:07
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.

None yet

1 participant