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

Add ruff and add basic CI #1

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI
on:
push:
branches: ["master"]
pull_request:

jobs:
format:
runs-on: ubuntu-24.04
name: "Linting and formatting"
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run ruff check
uses: astral-sh/ruff-action@v2

- name: Run ruff format --check
uses: astral-sh/ruff-action@v2
with:
args: "format --check"
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
format:
ruff format

lint:
ruff check

lint-fix:
ruff check --fix
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,13 @@ Finally, you're ready to start the application:

Then open http://localhost:8007/admin to log in. Once redirected to the Django
admin interface, go back to the main interface. You're now logged in.

## Contributing

Before committing make sure to install the git pre-commit hook to adhere to the
codestyle.

```bash
ln -s ../../tools/githook/pre-commit .git/hooks/

```
2 changes: 2 additions & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
-r requirements.txt
uwsgi
pycodestyle
ruff
4 changes: 4 additions & 0 deletions media/commitfest/css/commitfest.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ div.form-group div.controls input.threadpick-input {
#annotateMessageBody.loading * {
display: none;
}

.cfbot-summary img {
margin-top: -3px;
}
4 changes: 4 additions & 0 deletions media/commitfest/needs_rebase_success.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions media/commitfest/new_failure.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions media/commitfest/new_success.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions media/commitfest/old_failure.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions media/commitfest/old_success.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions media/commitfest/running.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions media/commitfest/waiting_to_start.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading