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 git submodule with mustache templates to be used as package data #26

Closed
Remi-Gau opened this issue May 23, 2023 · 1 comment · Fixed by #27
Closed

allow git submodule with mustache templates to be used as package data #26

Remi-Gau opened this issue May 23, 2023 · 1 comment · Fixed by #27

Comments

@Remi-Gau
Copy link
Contributor

No description provided.

@Remi-Gau Remi-Gau changed the title use git submodule to keep the mustache templates allow git submodule with mustache templates to be used as package data May 23, 2023
@Remi-Gau
Copy link
Contributor Author

Typical error in CI:

 template_name = 'pet.mustache'
data = {'AcquisitionMode': 'list mode', 'AttenuationCorrection': '[137Cs]transmission scan-based', 'BodyPart': 'Brain', 'FrameDuration': [10, 20, 30, 40, 50, 60, ...], ...}

    def render(template_name=None, data=None):
    
        template_file = Path(__file__).parent.joinpath("templates", "templates", template_name)
    
>       with open(template_file) as template:
E       FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/pybids-reports/pybids-reports/bids/ext/reports/templates/templates/pet.mustache'

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 a pull request may close this issue.

1 participant