flaresimulations / synthesizer-grids

Scripts for generating synthesizer grids
https://flaresimulations.github.io/synthesizer/grids/grids.html
1 stars 1 forks source link

Add pre commit hook and ruff linting/formatting #70

Closed WillJRoper closed 6 months ago

WillJRoper commented 6 months ago

The contributing guidelines are a link to the Synthesizer main repo contributing guidelines which give instructions for the pre-commit hook. The pre-commit hook config file was missing from this repo (along with other config things needed for it).

This PR adds ruff and the pre-commit-hook config file as well as adding it to the workflow.

Closes #69.

Issue Type

Checklist

WillJRoper commented 6 months ago

Needs to have the following formatting issues fixed:

src/synthesizer_grids/cloudy/create_cloudy_input_grid_from_cloudy.py:125:80: E501 Line too long (80 > 79)
src/synthesizer_grids/cloudy/create_cloudy_input_grid_from_cloudy.py:133:80: E501 Line too long (111 > 79)
src/synthesizer_grids/cloudy/create_cloudy_input_grid_from_cloudy.py:155:80: E501 Line too long (85 > 79)
src/synthesizer_grids/cloudy/create_cloudy_input_grid_from_cloudy.py:259:80: E501 Line too long (85 > 79)
src/synthesizer_grids/cloudy/create_cloudy_input_grid_from_cloudy.py:270:80: E501 Line too long (81 > 79)
src/synthesizer_grids/cloudy/create_cloudy_input_grid_from_cloudy.py:273:80: E501 Line too long (95 > 79)
src/synthesizer_grids/cloudy/create_cloudy_input_grid_from_cloudy.py:278:80: E501 Line too long (84 > 79)
src/synthesizer_grids/cloudy/create_single_cloudy_input.py:87:80: E501 Line too long (85 > 79)
src/synthesizer_grids/cloudy/create_single_cloudy_input.py:108:80: E501 Line too long (105 > 79)
src/synthesizer_grids/cloudy/create_single_cloudy_input.py:110:80: E501 Line too long (91 > 79)
src/synthesizer_grids/cloudy/create_single_cloudy_input.py:201:80: E501 Line too long (86 > 79)
src/synthesizer_grids/cloudy/create_single_cloudy_input.py:210:80: E501 Line too long (99 > 79)
src/synthesizer_grids/cloudy/create_single_cloudy_input.py:222:80: E501 Line too long (84 > 79)
src/synthesizer_grids/extras/download_grids.py:43:80: E501 Line too long (82 > 79)
src/synthesizer_grids/grid_io.py:151:80: E501 Line too long (80 > 79)
src/synthesizer_grids/grid_io.py:415:80: E501 Line too long (81 > 79)
src/synthesizer_grids/grid_io.py:465:80: E501 Line too long (81 > 79)
src/synthesizer_grids/incident/blackholes/utils.py:8:1: F403 `from incident_utils import *` used; unable to detect undefined names
src/synthesizer_grids/incident/create_reduced_grid.py:13:80: E501 Line too long (163 > 79)
src/synthesizer_grids/incident/create_reduced_grid.py:14:80: E501 Line too long (186 > 79)
src/synthesizer_grids/incident/incident_utils.py:58:80: E501 Line too long (128 > 79)
src/synthesizer_grids/incident/incident_utils.py:85:80: E501 Line too long (85 > 79)
src/synthesizer_grids/incident/incident_utils.py:87:80: E501 Line too long (80 > 79)
src/synthesizer_grids/incident/incident_utils.py:113:80: E501 Line too long (110 > 79)
src/synthesizer_grids/incident/incident_utils.py:129:80: E501 Line too long (118 > 79)
src/synthesizer_grids/incident/incident_utils.py:131:80: E501 Line too long (88 > 79)
src/synthesizer_grids/incident/sps/install_maraston13.py:50:80: E501 Line too long (84 > 79)
src/synthesizer_grids/incident/sps/install_maraston13.py:68:80: E501 Line too long (87 > 79)
src/synthesizer_grids/incident/sps/utils.py:9:80: E501 Line too long (98 > 79)
Found 29 errors.
WillJRoper commented 6 months ago

All formatting issues are now fixed.