Skip to content

Commit 2e3c086

Browse files
authored
feat: Add live match score updates with real-time goal tracking + post on a weekly round basis (#12)
* feat: Add live match score updates with real-time goal tracking * pipeline fix * linting * linting * eliminate lint warnings * remove extra yaml job
1 parent ef96ac0 commit 2e3c086

19 files changed

+3368
-128
lines changed

.github/workflows/pylint.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Tests and Linting
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main, develop]
8+
9+
jobs:
10+
test-and-lint:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.9", "3.10", "3.11"]
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
29+
- name: Lint with pylint
30+
run: |
31+
pylint common.py premier_division.py first_division.py fai_cup.py live_updater.py rate_limiter.py
32+
33+
- name: Run all tests with coverage
34+
run: |
35+
python -m pytest tests/ -v --tb=short --cov=. --cov-report=xml --cov-report=term
36+
37+
- name: Upload coverage to Codecov
38+
uses: codecov/codecov-action@v3
39+
with:
40+
files: ./coverage.xml
41+
flags: unittests
42+
name: codecov-umbrella
43+
if: matrix.python-version == '3.11'

.pylintrc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[MASTER]
2+
# Specify a configuration file.
3+
ignore-patterns=test_.*?py
4+
5+
[MESSAGES CONTROL]
6+
# C0415: Import outside toplevel - standard for tests
7+
# R0903: Too few public methods - config/utility classes
8+
# R0902: Too many instance attributes - necessary for config/rate limiter
9+
# R0913: Too many arguments - by design for flexibility
10+
# R0912: Too many branches - complex but necessary logic
11+
# R0904: Too many public methods - comprehensive test coverage
12+
# R0801: Similar lines - acceptable across bot scripts
13+
disable=
14+
import-outside-toplevel,
15+
too-few-public-methods,
16+
too-many-instance-attributes,
17+
too-many-arguments,
18+
too-many-branches,
19+
too-many-public-methods,
20+
duplicate-code
21+
22+
[DESIGN]
23+
# Maximum number of locals for function / method body
24+
max-locals=16
25+
26+
# Maximum number of branches for function / method body
27+
max-branches=13
28+
29+
# Maximum number of arguments for function / method
30+
max-args=6
31+
32+
# Maximum number of instance attributes
33+
max-attributes=11
34+
35+
[SIMILARITIES]
36+
# Minimum lines number d a similarity to note
37+
min-similarity-lines=5

0 commit comments

Comments
 (0)