Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(ruff): add ruff #81

Merged
merged 22 commits into from
May 2, 2024
Merged

ci(ruff): add ruff #81

merged 22 commits into from
May 2, 2024

Conversation

eddiebergman
Copy link
Contributor

@eddiebergman eddiebergman commented Apr 30, 2024

This PR aims to get pre-commit back to being usuable for developers of NEPS.
Right now, it's mostly ignored due to pre-existing errors that were just merged in, the fact there's no CI check on it giving a red X and I imagine getting to grips with all the different linting and formatting tools might be difficult initially.

After discussing with @DaStoll, we will go ahead with converting all linting and formatting to the single tool ruff that will replace pylint, isort, black as well as introduce the ability to auto-fix easy non-behaviour issue, more linting rules such as from the flake8 eco-system as well as doc string linting from the pydocstyle eco-system.

Since this will flag a lot of things, I will be going through this in chunks, keeping the old linters (which aren't being used anywho) and slowly enabling ruff on more and more parts of the codebase. The aim is not to overlap with any known on-going work to prevent any merge conflicts.

This PR will not attempt to address typing issue with MyPy and will be handled seperatly at a later point.


  • Remove existing linters as they're not used anyways and are mostly superseeded by ruff now.
  • Fixup remaining files to pass ruff, at least those that can be touched safely.
  • Document somewhere (CONTRIBUTING.md?) how to use pre-commit and ruff and advertise the plugins for popular editors.
  • Create a follow up issue to finish off the currently ignore directories, such as the bayesian_optimization family of modules.

@eddiebergman eddiebergman changed the title ci(ruff): add ruff config ci(ruff): add ruff Apr 30, 2024
@eddiebergman eddiebergman self-assigned this May 2, 2024
@eddiebergman eddiebergman added the ci Something related to the CI system label May 2, 2024
@eddiebergman eddiebergman mentioned this pull request May 2, 2024
7 tasks
@eddiebergman eddiebergman merged commit 8482948 into master May 2, 2024
12 checks passed
@eddiebergman eddiebergman deleted the ci-ruff branch May 2, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Something related to the CI system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] Migration to ruff
1 participant