Skip to content

Conversation

@DrPaulSharp
Copy link
Collaborator

@DrPaulSharp DrPaulSharp commented Jun 26, 2024

Closes #27

We should consider the rule set we have as standard. I've gone for the advanced set here: https://docs.astral.sh/ruff/linter/#rule-selection which seem to do the job quite well, but I've excluded a rule preferring ternary operators to if-else blocks. However, the rules can be turned on and off in a very fine grained way (i.e., by category, subcategory, and individual rule). We can also exclude particular files, or even lines from a rule (as we do here in line 156 of setup.py). So let me know what you think. The full ruleset is here: https://docs.astral.sh/ruff/rules/

@DrPaulSharp DrPaulSharp requested a review from StephenNneji June 26, 2024 14:40
setup.py Outdated
install_requires=["numpy >= 1.20", "prettytable >= 3.9.0", "pydantic >= 2.7.2", "matplotlib >= 3.8.3"],
extras_require={
':python_version < "3.11"': ["StrEnum >= 0.4.15"],
"Dev": ["pytest>=7.4.0", "pytest-cov>=4.1.0"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add ruff to the dev requirement

author_email="",
url="https://github.com/RascalSoftware/python-RAT",
description="Python extension for the Reflectivity Analysis Toolbox (RAT)",
long_description=open("README.md").read(), # noqa: SIM115
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will move this to a context manager in my next PR

@DrPaulSharp DrPaulSharp merged commit a7842e6 into RascalSoftware:main Jun 26, 2024
@DrPaulSharp DrPaulSharp deleted the feeling_ruff branch June 26, 2024 17:07
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 this pull request may close these issues.

Add linting and formatter

2 participants