Skip to content

Commit 58c084a

Browse files
committed
ci(pre-commit): migrate linting to Ruff and update hooks:
- Replace black, flake8, and isort with Ruff for linting and formatting. - Update pre-commit configuration and dependencies, add Ruff config to pyproject.toml, and apply automatic fixes across the codebase.
1 parent 305be6a commit 58c084a

39 files changed

Lines changed: 97 additions & 110 deletions

.github/CONTRIBUTING.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This guide explains how to set up your environment, make changes, and submit the
1010

1111
## Getting Started
1212

13-
Before contributing, please review the [Developer Guide](https://codeentropy.readthedocs.io/en/latest/developer_guide.html).
13+
Before contributing, please review the [Developer Guide](https://codeentropy.readthedocs.io/en/latest/developer_guide.html).
1414
It covers CodeEntropy’s architecture, setup instructions, and contribution workflow.
1515

1616
If you’re new to the project, we also recommend:
@@ -23,19 +23,19 @@ If you’re new to the project, we also recommend:
2323

2424
When you’re ready to submit your work:
2525

26-
1. **Push your branch** to GitHub.
27-
2. **Open a [pull request](https://help.github.com/articles/using-pull-requests/)** against the `main` branch.
26+
1. **Push your branch** to GitHub.
27+
2. **Open a [pull request](https://help.github.com/articles/using-pull-requests/)** against the `main` branch.
2828
3. **Fill out the PR template**, including:
29-
- A concise summary of what your PR does
30-
- A list of all changes introduced
31-
- Details on how these changes affect the repository (features, tests, documentation, etc.)
29+
- A concise summary of what your PR does
30+
- A list of all changes introduced
31+
- Details on how these changes affect the repository (features, tests, documentation, etc.)
3232
4. **Verify before submission**:
33-
- All tests pass
34-
- Pre-commit checks succeed
35-
- Documentation is updated where applicable
33+
- All tests pass
34+
- Pre-commit checks succeed
35+
- Documentation is updated where applicable
3636
5. **Review process**:
37-
- Your PR will be reviewed by the core development team.
38-
- At least **one approval** is required before merging.
37+
- Your PR will be reviewed by the core development team.
38+
- At least **one approval** is required before merging.
3939

4040
We aim to provide constructive feedback quickly and appreciate your patience during the review process.
4141

@@ -45,12 +45,12 @@ We aim to provide constructive feedback quickly and appreciate your patience dur
4545

4646
Found a bug or have a feature request?
4747

48-
1. **Open a new issue** on GitHub.
49-
2. Provide a **clear and descriptive title**.
48+
1. **Open a new issue** on GitHub.
49+
2. Provide a **clear and descriptive title**.
5050
3. Include:
51-
- Steps to reproduce the issue (if applicable)
52-
- Expected vs. actual behavior
53-
- Relevant logs, screenshots, or input files
51+
- Steps to reproduce the issue (if applicable)
52+
- Expected vs. actual behavior
53+
- Relevant logs, screenshots, or input files
5454

5555
Well-documented issues help us address problems faster and keep CodeEntropy stable and robust.
5656

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ assignees: ''
1212

1313
---
1414

15-
## To Reproduce
15+
## To Reproduce
1616
<!-- Provide the YAML configuration and the exact CLI command that reproduces the issue. -->
1717

1818
### YAML configuration
19-
<!-- Paste the YAML file or the smallest excerpt that reproduces the issue.
19+
<!-- Paste the YAML file or the smallest excerpt that reproduces the issue.
2020
Remove unrelated fields to make it minimal. -->
2121
```yaml
2222
# Paste the YAML snippet here
@@ -46,7 +46,7 @@ Remove unrelated fields to make it minimal. -->
4646
- Python Version:
4747
- Package list:
4848
- If using conda, run: `conda list > packages.txt` and paste the contents here.
49-
49+
5050
``` bash
5151
# Paste packages.txt here
5252
```

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
<!-- List all the changes introduced in this PR. -->
66
### Change 1 <!-- Rename Change 1 to reflect change title -->:
77
- <!-- Bullet point the changes in update 1. -->
8-
-
8+
-
99

1010
### Change 2 <!-- Rename Change 2 to reflect change title -->:
1111
- <!-- Bullet point the changes in update 2. -->
12-
-
12+
-
1313

1414
### Change 3 <!-- Rename Change 3 to reflect change title -->:
1515
- <!-- Bullet point the changes in update 3. -->
16-
-
16+
-
1717

1818
## Impact
1919
- <!-- Bullet point the expected impact this PR will have on the codebase. -->
20-
-
20+
-

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
"automerge": false
1919
}
2020
]
21-
}
21+
}

.github/workflows/daily.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,4 @@ jobs:
6363
uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e # v2.3.7
6464
with:
6565
github-token: ${{ secrets.GITHUB_TOKEN }}
66-
file: coverage.xml
66+
file: coverage.xml

.github/workflows/pr.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ jobs:
135135
git status --short
136136
git diff
137137
exit 1
138-
}
138+
}

.github/workflows/release.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,4 +146,3 @@ jobs:
146146
env:
147147
FLIT_USERNAME: __token__
148148
FLIT_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
149-

.github/workflows/weekly-docs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CodeEntropy Weekly Docs
22

33
on:
44
schedule:
5-
- cron: '0 8 * * 1'
5+
- cron: '0 8 * * 1'
66
workflow_dispatch:
77

88
concurrency:
@@ -43,4 +43,4 @@ jobs:
4343
with:
4444
name: docs-${{ matrix.os }}-py${{ matrix.python-version }}-failure
4545
path: |
46-
docs/_build/**
46+
docs/_build/**

.github/workflows/weekly-regression.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949
/tmp/pytest-of-*/pytest-*/**/config.yaml
5050
/tmp/pytest-of-*/pytest-*/**/codeentropy_stdout.txt
5151
/tmp/pytest-of-*/pytest-*/**/codeentropy_stderr.txt
52-
/tmp/pytest-of-*/pytest-*/**/codeentropy_output.json
52+
/tmp/pytest-of-*/pytest-*/**/codeentropy_output.json

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,4 @@ job*
126126
*.com
127127
*.txt
128128

129-
.testdata/
129+
.testdata/

0 commit comments

Comments
 (0)