Paper-Chart-Extraction-Project / ChartExtractor

ChartExtractor uses computer vision to convert images of paper charts to digital data.
https://paper-chart-extraction-project.github.io/ChartExtractor/
GNU General Public License v3.0
3 stars 1 forks source link

Ruff Linting #28

Closed hvalenty closed 1 week ago

hvalenty commented 1 week ago

Ruff linter formatting and fixing

Ultimately, the Ruff linter was chosen for this issue due to faster compiling and discussion with teammates.

This tool can be installed with pip install ruff

Code was reformatted within the src folder (none required for tests folder), which can be done in the terminal using ruff format ./[folder]

Also, safe fixes (where ruff is positive changes won't alter code behavior) were made on the src and tests folders, which can be done in the terminal using ruff check --fix ./[folder]

To simply see what recommended changes can be made, the command ruff check ./[folder] is used.

The primary changes made by ruff in this issue are for spacing.

charbelmarche33 commented 1 week ago

We will need to add ruff to poetry as briefly discussed in the meeting. @RyanDoesMath do you want us to take a crack at this and then update you when the PR is ready? Or did you want to do this?

RyanDoesMath commented 1 week ago

We will need to add ruff to poetry as briefly discussed in the meeting. @RyanDoesMath do you want us to take a crack at this and then update you when the PR is ready? Or did you want to do this?

I forgot whether I said I would do it or not, so I will leave it up to you all. Just make a quick commit adding ruff to the pyproject.toml file and I'll merge the PR.

charbelmarche33 commented 1 week ago

Done.