Skip to content
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
35 changes: 22 additions & 13 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Code Check

on:
push:
branches: [ main ]
Expand All @@ -7,19 +8,27 @@ on:

jobs:
check:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: ruff
run: |
pip install ruff
ruff check .
- name: black
run: |
pip install black
black --check .
- name: interrogate

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9.16'
cache: 'pip'
Comment on lines 14 to +20

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Update GitHub Actions to their latest versions.

The actions being used are outdated according to static analysis.

Apply this diff to update the actions:

-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4

-        uses: actions/setup-python@v4
+        uses: actions/setup-python@v5
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: ruff
run: |
pip install ruff
ruff check .
- name: black
run: |
pip install black
black --check .
- name: interrogate
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9.16'
cache: 'pip'
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9.16'
cache: 'pip'
🧰 Tools
🪛 actionlint (1.7.4)

14-14: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


17-17: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


- name: Install dependencies
run: |
pip install interrogate
interrogate app/services -vv
python -m pip install --upgrade pip
pip install ruff black interrogate
Comment on lines +22 to +25

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Pin dependency versions for reproducibility.

Installing dependencies without version constraints can lead to inconsistent behavior across different environments and times.

       run: |
         python -m pip install --upgrade pip
-        pip install ruff black interrogate
+        pip install ruff==0.1.9 black==23.12.1 interrogate==1.5.0
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Install dependencies
run: |
pip install interrogate
interrogate app/services -vv
python -m pip install --upgrade pip
pip install ruff black interrogate
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff==0.1.9 black==23.12.1 interrogate==1.5.0


- name: Check code style with Ruff
run: ruff check .

- name: Check formatting with Black
run: black --check .

- name: Check docstring coverage with Interrogate
run: interrogate app/services -vv -f 100
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
tests:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Update GitHub Actions to their latest versions.

The following actions have newer versions available:

  • actions/checkout@v3 → v4
  • actions/setup-python@v4 → v5
  • actions/cache@v3 → v4

Apply this diff to update the actions:

-      - uses: actions/checkout@v3
+      - uses: actions/checkout@v4

-      - uses: actions/setup-python@v4
+      - uses: actions/setup-python@v5

-        uses: actions/cache@v3
+        uses: actions/cache@v4

Also applies to: 14-14, 26-26

🧰 Tools
🪛 actionlint (1.7.4)

12-12: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)


- uses: actions/setup-python@v4
with:
python-version: "3.9.16"

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: Load cached dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: poetry install --no-interaction --with tests

- name: Run tests
run: poetry run pytest
336 changes: 159 additions & 177 deletions poetry.lock

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fastapi = "==0.115.6"
uvicorn = {extras = ["standard"], version = "==0.34.0"}
slowapi = "==0.1.9"
pydantic-settings = "==2.7.1"
pydantic= "==2.10.4"
pydantic= "==2.10.5"
python-dateutil = "==2.9.0.post0"

[tool.poetry.group.dev.dependencies]
Expand All @@ -31,7 +31,6 @@ interrogate = "==1.7.0"
[tool.poetry.group.tests.dependencies]
pytest = "==7.3.1"
pytest-cov = "==4.1.0"
schema = "==0.7.5"

[tool.black]
line-length = 120
Expand All @@ -53,7 +52,7 @@ lint.select = [
]

[tool.pytest.ini_options]
addopts = "--cov --cov-report term-missing --exitfirst"
addopts = "--cov --cov-report term-missing --exitfirst -vv"
testpaths = [
"tests",
]
Expand Down
57 changes: 0 additions & 57 deletions tests/clubs/test_clubs_players.py

This file was deleted.

74 changes: 0 additions & 74 deletions tests/clubs/test_clubs_profile.py

This file was deleted.

50 changes: 0 additions & 50 deletions tests/clubs/test_clubs_search.py

This file was deleted.

35 changes: 0 additions & 35 deletions tests/competitions/test_competitions_clubs.py

This file was deleted.

52 changes: 0 additions & 52 deletions tests/competitions/test_competitions_search.py

This file was deleted.

Loading