csdms / babelizer

Transform BMI-wrapped models into Python packages
https://babelizer.readthedocs.io
MIT License
4 stars 3 forks source link

Black CI fails automatically on rendered component #48

Closed mdpiper closed 3 years ago

mdpiper commented 3 years ago

The black CI task checks all Python files, including those in the docs directory, of a rendered component. The conf.py file of a rendered component currently fails out of the box, so it should be formatted.

The problem may be larger, though; the conf.py file contains jinja template variables, and because black changes indentation based on line length, running black after substituting for these variables may still cause the CI test in the rendered component to fail.

mdpiper commented 3 years ago

@mcflugen I can fix this by removing the HTMLHelp and LaTeX options from the conf.py file. We don't use them. What do you think?

mcflugen commented 3 years ago

@mdpiper when the babelizer renders a project, it runs isort and black on the rendered project. I’m not sure why black would fail on a file that it just reformatted.

Since we don’t use the HTMLHelp and LaTeX options, we should probably remove them (but not because it fixes this issue).

mdpiper commented 3 years ago

@mcflugen I see now. I'll leave conf.py unchanged, but add it to the list of files to fix in the render module.

mcflugen commented 3 years ago

Ah, well that explains it. Thanks @mdpiper!