Closed jorgepiloto closed 3 months ago
Thanks for opening a Pull Request. If you want to perform a review write a comment saying:
@ansys-reviewer-bot review
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.67%. Comparing base (
f8e714c
) to head (c761bdb
).
Is it normal that the IronPython tests fail? Seems that some LOG file is missing.
Hi @jorgepiloto and @SMoraisAnsys ,
I was able to reproduce the issue, and we need to add the encoding line at the beginning of the file (before the license header), for instance in aedt_logger.py:
I found the issue because the .log locally told me :)
This modification is only needed for the files where # -- coding: utf-8 -- is defined... @jorgepiloto could you make the changes?
Thanks!
Hi @Samuelopez-ansys, thank's for pointing this out. Let me fix this. I hope the ansys-license-headers hooks does not remove those UTF8 lines.
Changing this to draft. Pinging @klmcadams.
The license headers get placed on top of the # -*- coding: utf-8 -*-
line. This makes Python to ignore the actual encoding.
Adding a custom template leads to a duplicated # -*- coding: utf-8 -*-
:
# -*- coding: utf-8 -*-
... LICENSE STUFF ...
# -*- coding: utf-8 -*- (the original one)
@jorgepiloto Could we merge this PR?
I crafted a custom template to ensure the UTF-8
line is added before every license check. Before adding the headers, I removed every UTF-8
line using a custom script.
Everything should be ready to go now.
This pull-request configures the ansys pre-commit-hooks. It also enables the license header checks. Related with #4775.