-
Notifications
You must be signed in to change notification settings - Fork 112
[DRAFT] Unit tests #87
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request introduces comprehensive changes to the testing infrastructure of the Transfermarkt API project. The modifications include adding a new GitHub Actions workflow for running tests, updating the project's dependency configuration, and restructuring the test suite. The changes involve removing several existing test files, introducing new JSON test data files, and creating new service-level test files that leverage a new Changes
Poem
Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
327804c to
4e1ce4b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments.
Actionable comments posted: 5
🛑 Comments failed to post (5)
tests/services/clubs/test_club_players.py (2)
4-7: 🛠️ Refactor suggestion
Add error handling test cases.
Missing test cases for error scenarios.
Example:
def test_club_players_invalid_id(): """Test handling of invalid club ID.""" tfmkt = TransfermarktClubPlayers(club_id="invalid", season_id="2023") with pytest.raises(ValueError): tfmkt.get_club_players() def test_club_players_invalid_season(): """Test handling of invalid season.""" tfmkt = TransfermarktClubPlayers(club_id="210", season_id="invalid") with pytest.raises(ValueError): tfmkt.get_club_players()
4-7: 🛠️ Refactor suggestion
Enhance test coverage with additional assertions and test cases.
The current test only verifies the club ID. Consider adding:
- Validation of the complete response structure
- Error handling test cases
- Edge cases (invalid IDs, seasons)
- Verification of actual player data
Example enhancement:
def test_club_players_210(): + """Test successful retrieval of players for club ID 210.""" tfmkt = TransfermarktClubPlayers(club_id="210", season_id="2023") response = tfmkt.get_club_players() assert response["id"] == "210" + assert "players" in response + assert isinstance(response["players"], list) + assert len(response["players"]) > 0 + + # Verify player data structure + player = response["players"][0] + required_fields = ["id", "name", "position"] + for field in required_fields: + assert field in player📝 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.def test_club_players_210(): """Test successful retrieval of players for club ID 210.""" tfmkt = TransfermarktClubPlayers(club_id="210", season_id="2023") response = tfmkt.get_club_players() assert response["id"] == "210" assert "players" in response assert isinstance(response["players"], list) assert len(response["players"]) > 0 # Verify player data structure player = response["players"][0] required_fields = ["id", "name", "position"] for field in required_fields: assert field in player.github/workflows/tests.yml (3)
13-17: 🛠️ Refactor suggestion
Enhance Python setup with version and caching.
Add Python version specification and dependency caching for faster builds.
- uses: actions/setup-python@v5 + with: + python-version: '3.11' + cache: 'poetry' - name: Poetry run: | pip install poetry poetry install --no-interaction --no-root --with tests📝 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.- uses: actions/setup-python@v5 with: python-version: '3.11' cache: 'poetry' - name: Poetry run: | pip install poetry poetry install --no-interaction --no-root --with tests🧰 Tools
🪛 actionlint (1.7.4)
13-13: 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)
12-13:
⚠️ Potential issueUpdate GitHub Actions versions.
The checkout and setup-python actions are using outdated versions.
- - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@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.- uses: actions/checkout@v4 - uses: actions/setup-python@v5🧰 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)
13-13: 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)
18-20: 🛠️ Refactor suggestion
Add test reporting and coverage.
The current workflow doesn't capture test results or coverage information.
- name: Pytest run: | - poetry run pytest + poetry run pytest --junitxml=pytest.xml --cov=app --cov-report=xml + - name: Upload Test Results + uses: actions/upload-artifact@v4 + if: always() + with: + name: test-results + path: | + pytest.xml + coverage.xml📝 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.- name: Pytest run: | poetry run pytest --junitxml=pytest.xml --cov=app --cov-report=xml - name: Upload Test Results uses: actions/upload-artifact@v4 if: always() with: name: test-results path: | pytest.xml coverage.xml
8ba8567 to
a2bb27e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (2)
tests/conftest.py (1)
8-16: Consider enhancing error handling for the test data loader.The implementation is clean and follows best practices. Consider adding error handling for common scenarios:
- File not found
- Invalid JSON format
- Unicode decode errors
@pytest.fixture def load_test_data() -> callable: def _load_test_data(file_name: str) -> dict: test_data_dir = Path(__file__).parent / "data" file_path = test_data_dir / f"{file_name}.json" + if not file_path.exists(): + raise FileNotFoundError(f"Test data file not found: {file_path}") with file_path.open("r", encoding="utf-8") as f: - return json.load(f) + try: + return json.load(f) + except json.JSONDecodeError as e: + raise ValueError(f"Invalid JSON in {file_path}: {e}") return _load_test_data.github/workflows/tests.yml (1)
10-10: Update the Ubuntu runner version.Consider using a more recent Ubuntu version for better security and performance.
- runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (20)
.github/workflows/tests.yml(1 hunks)pyproject.toml(0 hunks)tests/clubs/test_clubs_players.py(0 hunks)tests/clubs/test_clubs_profile.py(0 hunks)tests/clubs/test_clubs_search.py(0 hunks)tests/competitions/test_competitions_clubs.py(0 hunks)tests/competitions/test_competitions_search.py(0 hunks)tests/conftest.py(1 hunks)tests/data/clubs/players/131_2014.json(1 hunks)tests/data/clubs/players/131_None.json(1 hunks)tests/data/clubs/players/210_2017.json(1 hunks)tests/data/clubs/players/210_None.json(1 hunks)tests/players/test_players_achievements.py(0 hunks)tests/players/test_players_injuries.py(0 hunks)tests/players/test_players_market_value.py(0 hunks)tests/players/test_players_profile.py(0 hunks)tests/players/test_players_search.py(0 hunks)tests/players/test_players_stats.py(0 hunks)tests/players/test_players_transfers.py(0 hunks)tests/services/clubs/test_club_players.py(1 hunks)
💤 Files with no reviewable changes (13)
- pyproject.toml
- tests/players/test_players_injuries.py
- tests/players/test_players_search.py
- tests/competitions/test_competitions_clubs.py
- tests/clubs/test_clubs_profile.py
- tests/competitions/test_competitions_search.py
- tests/players/test_players_achievements.py
- tests/clubs/test_clubs_search.py
- tests/players/test_players_profile.py
- tests/players/test_players_market_value.py
- tests/clubs/test_clubs_players.py
- tests/players/test_players_transfers.py
- tests/players/test_players_stats.py
✅ Files skipped from review due to trivial changes (3)
- tests/data/clubs/players/131_None.json
- tests/data/clubs/players/131_2014.json
- tests/data/clubs/players/210_2017.json
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/tests.yml
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)
14-14: 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)
26-26: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (2)
tests/services/clubs/test_club_players.py (1)
8-18: LGTM! Well-structured test parametrization.The test cases are well-organized with clear parameters and meaningful test data combinations.
tests/data/clubs/players/210_None.json (1)
1-584: LGTM! Comprehensive test data.The test data is well-structured and covers various scenarios:
- Multiple player positions
- Different contract situations
- Player status variations (injuries, loans)
- Various nationalities and age groups
| def test_club_players(club_id: str, season_id: str, load_test_data: callable): | ||
| tfmkt = TransfermarktClubPlayers(club_id=club_id, season_id=season_id) | ||
| response = tfmkt.get_club_players() | ||
| with open(f"tests/data/clubs/players/{club_id}_{season_id}.json", "w") as f: | ||
| json.dump(response, f, indent=2, ensure_ascii=False) | ||
| expected = load_test_data(f"clubs/players/{club_id}_{season_id}") | ||
|
|
||
| assert response == expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Separate test data generation from test execution.
Writing response data to files during test execution is an anti-pattern that:
- Makes tests dependent on file system operations
- May cause issues in parallel test execution
- Mixes test execution with test data management
Consider this alternative approach:
def test_club_players(club_id: str, season_id: str, load_test_data: callable):
tfmkt = TransfermarktClubPlayers(club_id=club_id, season_id=season_id)
response = tfmkt.get_club_players()
- with open(f"tests/data/clubs/players/{club_id}_{season_id}.json", "w") as f:
- json.dump(response, f, indent=2, ensure_ascii=False)
expected = load_test_data(f"clubs/players/{club_id}_{season_id}")
assert response == expectedCreate a separate utility script for generating test data when needed.
📝 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.
| def test_club_players(club_id: str, season_id: str, load_test_data: callable): | |
| tfmkt = TransfermarktClubPlayers(club_id=club_id, season_id=season_id) | |
| response = tfmkt.get_club_players() | |
| with open(f"tests/data/clubs/players/{club_id}_{season_id}.json", "w") as f: | |
| json.dump(response, f, indent=2, ensure_ascii=False) | |
| expected = load_test_data(f"clubs/players/{club_id}_{season_id}") | |
| assert response == expected | |
| def test_club_players(club_id: str, season_id: str, load_test_data: callable): | |
| tfmkt = TransfermarktClubPlayers(club_id=club_id, season_id=season_id) | |
| response = tfmkt.get_club_players() | |
| expected = load_test_data(f"clubs/players/{club_id}_{season_id}") | |
| assert response == expected |
f04e8a5 to
c24fc4e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (3)
.github/workflows/tests.yml (1)
16-16: Consider using a more recent Python version.The workflow is using Python 3.9.16, which is quite old. Consider upgrading to a more recent version like 3.11 or 3.12 for better performance and security.
- python-version: "3.9.16" + python-version: "3.12"tests/services/clubs/test_club_players.py (2)
18-23: Consider enhancing test assertions.The current assertion only checks for exact equality. Consider adding more specific assertions to validate the structure and content of the response.
def test_club_players(club_id: str, season_id: str, load_test_data: callable): tfmkt = TransfermarktClubPlayers(club_id=club_id, season_id=season_id) response = tfmkt.get_club_players() expected = load_test_data(f"clubs/players/{club_id}_{season_id}") - assert response == expected + assert response["id"] == expected["id"], "Club ID mismatch" + assert isinstance(response["players"], list), "Players should be a list" + assert len(response["players"]) == len(expected["players"]), "Number of players mismatch" + + # Validate first player's data structure + if response["players"]: + player = response["players"][0] + assert all(key in player for key in ["id", "name", "position"]), "Missing required player fields"
26-41: Consider adding error case tests.The test covers only successful scenarios. Consider adding test cases for error conditions such as:
- Invalid club_id
- Non-existent club
- API errors
Example:
@pytest.mark.parametrize( "club_id,expected_error", [ ("invalid", "Invalid club ID format"), ("999999", "Club not found"), ], ) def test_clubs_profile_errors(club_id: str, expected_error: str): tfmkt = TransfermarktClubProfile(club_id=club_id) with pytest.raises(ValueError, match=expected_error): tfmkt.get_club_profile()
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (27)
.github/workflows/tests.yml(1 hunks)pyproject.toml(0 hunks)tests/clubs/test_clubs_players.py(0 hunks)tests/clubs/test_clubs_profile.py(0 hunks)tests/clubs/test_clubs_search.py(0 hunks)tests/competitions/test_competitions_clubs.py(0 hunks)tests/competitions/test_competitions_search.py(0 hunks)tests/conftest.py(1 hunks)tests/data/clubs/players/11_2003.json(1 hunks)tests/data/clubs/players/131_2010.json(1 hunks)tests/data/clubs/players/131_None.json(1 hunks)tests/data/clubs/players/210_2017.json(1 hunks)tests/data/clubs/players/27_2019.json(1 hunks)tests/data/clubs/players/31_2018.json(1 hunks)tests/data/clubs/profile/11.json(1 hunks)tests/data/clubs/profile/131.json(1 hunks)tests/data/clubs/profile/210.json(1 hunks)tests/data/clubs/profile/27.json(1 hunks)tests/data/clubs/profile/31.json(1 hunks)tests/players/test_players_achievements.py(0 hunks)tests/players/test_players_injuries.py(0 hunks)tests/players/test_players_market_value.py(0 hunks)tests/players/test_players_profile.py(0 hunks)tests/players/test_players_search.py(0 hunks)tests/players/test_players_stats.py(0 hunks)tests/players/test_players_transfers.py(0 hunks)tests/services/clubs/test_club_players.py(1 hunks)
💤 Files with no reviewable changes (13)
- tests/players/test_players_injuries.py
- pyproject.toml
- tests/players/test_players_achievements.py
- tests/clubs/test_clubs_players.py
- tests/players/test_players_search.py
- tests/players/test_players_profile.py
- tests/players/test_players_stats.py
- tests/competitions/test_competitions_clubs.py
- tests/clubs/test_clubs_profile.py
- tests/competitions/test_competitions_search.py
- tests/clubs/test_clubs_search.py
- tests/players/test_players_market_value.py
- tests/players/test_players_transfers.py
✅ Files skipped from review due to trivial changes (7)
- tests/data/clubs/profile/131.json
- tests/data/clubs/profile/27.json
- tests/data/clubs/profile/11.json
- tests/data/clubs/profile/210.json
- tests/data/clubs/profile/31.json
- tests/data/clubs/players/31_2018.json
- tests/data/clubs/players/27_2019.json
🚧 Files skipped from review as they are similar to previous changes (2)
- tests/data/clubs/players/131_None.json
- tests/conftest.py
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/tests.yml
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)
14-14: 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)
26-26: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (3)
.github/workflows/tests.yml (2)
21-23: Poetry configuration looks good.The configuration for Poetry is well-structured:
- Version is pinned to 1.5.1
- Virtual environments are created within the project directory
31-35: Test execution configuration is correct.The dependencies installation and test execution steps are properly configured:
- Uses
--with testsflag to include test dependencies- Executes pytest through Poetry
tests/services/clubs/test_club_players.py (1)
7-17: Well-structured test parametrization.The test parameters are well-organized with clear test cases and helpful comments indicating the club names.
| tests: | ||
| runs-on: ubuntu-20.04 | ||
| steps: | ||
| - uses: actions/checkout@v3 |
There was a problem hiding this comment.
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@v4Also 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)
| { | ||
| "id": "131", | ||
| "players": [ | ||
| { | ||
| "id": "7589", | ||
| "name": "Víctor Valdés", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Jan 14, 1982", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,83m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2002", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona B", | ||
| "contract": null, | ||
| "marketValue": "€20.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "65266", | ||
| "name": "Rubén Miño", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Jan 18, 1989", | ||
| "age": "22", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "UE Cornellà", | ||
| "height": "1,91m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "€1.20m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "8176", | ||
| "name": "Oier Olazábal", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Sep 14, 1989", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "FC Andorra", | ||
| "height": "1,89m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 1, 2013", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona B", | ||
| "contract": null, | ||
| "marketValue": "€900k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "7537", | ||
| "name": "José Manuel Pinto", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Nov 8, 1975", | ||
| "age": "35", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,85m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2008", | ||
| "joined": "", | ||
| "signedFrom": "Celta de Vigo", | ||
| "contract": null, | ||
| "marketValue": "€600k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "18944", | ||
| "name": "Gerard Piqué", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Feb 2, 1987", | ||
| "age": "24", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,94m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2008", | ||
| "joined": "", | ||
| "signedFrom": "Manchester United", | ||
| "contract": null, | ||
| "marketValue": "€35.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "7594", | ||
| "name": "Carles Puyol", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Apr 13, 1978", | ||
| "age": "33", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,78m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 1999", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse -", | ||
| "contract": null, | ||
| "marketValue": "€20.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "7968", | ||
| "name": "Gabriel Milito", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Sep 7, 1980", | ||
| "age": "30", | ||
| "nationality": [ | ||
| "Argentina", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,79m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 12, 2007", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €20.00m", | ||
| "contract": null, | ||
| "marketValue": "€8.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "74228", | ||
| "name": "Marc Muniesa", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Mar 27, 1992", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Al-Shahania SC", | ||
| "height": "1,80m", | ||
| "foot": "left", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "€2.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "65237", | ||
| "name": "Andreu Fontàs", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Nov 14, 1989", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Without Club", | ||
| "height": "1,86m", | ||
| "foot": "left", | ||
| "joinedOn": "Mar 1, 2011", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona B", | ||
| "contract": null, | ||
| "marketValue": "€2.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "99922", | ||
| "name": "Marc Bartra", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Jan 15, 1991", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Real Betis Balompié", | ||
| "height": "1,84m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2012", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona B", | ||
| "contract": null, | ||
| "marketValue": "€1.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "92947", | ||
| "name": "Sergi Gómez", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Mar 28, 1992", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "RCD Espanyol Barcelona", | ||
| "height": "1,85m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "€500k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "5283", | ||
| "name": "Éric Abidal", | ||
| "position": "Left-Back", | ||
| "dateOfBirth": "Sep 11, 1979", | ||
| "age": "31", | ||
| "nationality": [ | ||
| "France", | ||
| "Martinique" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,86m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 1, 2007", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €15.00m", | ||
| "contract": null, | ||
| "marketValue": "€17.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "34495", | ||
| "name": "Adriano", | ||
| "position": "Left-Back", | ||
| "dateOfBirth": "Oct 26, 1984", | ||
| "age": "26", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,72m", | ||
| "foot": "both", | ||
| "joinedOn": "Jul 14, 2010", | ||
| "joined": "", | ||
| "signedFrom": "Sevilla FC", | ||
| "contract": null, | ||
| "marketValue": "€12.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "4317", | ||
| "name": "Maxwell", | ||
| "position": "Left-Back", | ||
| "dateOfBirth": "Aug 27, 1981", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,76m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 15, 2009", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €5.00m", | ||
| "contract": null, | ||
| "marketValue": "€10.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "15951", | ||
| "name": "Dani Alves", | ||
| "position": "Right-Back", | ||
| "dateOfBirth": "May 6, 1983", | ||
| "age": "28", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,72m", | ||
| "foot": "right", | ||
| "joinedOn": "Nov 12, 2021", | ||
| "joined": "", | ||
| "signedFrom": "Without Club", | ||
| "contract": null, | ||
| "marketValue": "€35.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "68645", | ||
| "name": "Martín Montoya", | ||
| "position": "Right-Back", | ||
| "dateOfBirth": "Apr 14, 1991", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Aris Thessaloniki", | ||
| "height": "1,75m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2012", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona B", | ||
| "contract": null, | ||
| "marketValue": "€1.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "65230", | ||
| "name": "Sergio Busquets", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Jul 16, 1988", | ||
| "age": "22", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Inter Miami CF", | ||
| "height": "1,89m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2008", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona Atlètic", | ||
| "contract": null, | ||
| "marketValue": "€30.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "19981", | ||
| "name": "Javier Mascherano", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Jun 8, 1984", | ||
| "age": "27", | ||
| "nationality": [ | ||
| "Argentina", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,74m", | ||
| "foot": "right", | ||
| "joinedOn": "Aug 28, 2010", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €20.00m", | ||
| "contract": null, | ||
| "marketValue": "€25.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "60445", | ||
| "name": "Jonathan dos Santos", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Apr 26, 1990", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Mexico", | ||
| "Spain" | ||
| ], | ||
| "currentClub": "CF América", | ||
| "height": "1,72m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2012", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona B", | ||
| "contract": null, | ||
| "marketValue": "€3.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "66100", | ||
| "name": "Oriol Romeu", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Sep 24, 1991", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Girona FC", | ||
| "height": "1,83m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 19, 2023", | ||
| "joined": "", | ||
| "signedFrom": "Girona FC", | ||
| "contract": null, | ||
| "marketValue": "€2.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "7600", | ||
| "name": "Andrés Iniesta", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "May 11, 1984", | ||
| "age": "27", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,71m", | ||
| "foot": "both", | ||
| "joinedOn": "Jul 1, 2002", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona B", | ||
| "contract": null, | ||
| "marketValue": "€60.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "7607", | ||
| "name": "Xavi", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "Jan 25, 1980", | ||
| "age": "31", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,70m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 1998", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse -", | ||
| "contract": null, | ||
| "marketValue": "€50.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "5486", | ||
| "name": "Seydou Keita", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "Jan 16, 1980", | ||
| "age": "31", | ||
| "nationality": [ | ||
| "Mali", | ||
| "France" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,83m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 1, 2008", | ||
| "joined": "", | ||
| "signedFrom": "Sevilla FC", | ||
| "contract": null, | ||
| "marketValue": "€14.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "60444", | ||
| "name": "Thiago Alcántara", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "Apr 11, 1991", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Spain", | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,74m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2011", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona B", | ||
| "contract": null, | ||
| "marketValue": "€5.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "85370", | ||
| "name": "Sergi Roberto", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "Feb 7, 1992", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Como 1907", | ||
| "height": "1,78m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2013", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona B", | ||
| "contract": null, | ||
| "marketValue": "€1.50m", | ||
| "status": "Calf problems - Return expected on Jan 14, 2025" | ||
| }, | ||
| { | ||
| "id": "15760", | ||
| "name": "Ibrahim Afellay", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "Apr 2, 1986", | ||
| "age": "25", | ||
| "nationality": [ | ||
| "Netherlands", | ||
| "Morocco" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,81m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2011", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €3.00m", | ||
| "contract": null, | ||
| "marketValue": "€14.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "35813", | ||
| "name": "Víctor Vázquez", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "Jan 20, 1987", | ||
| "age": "24", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "FC Santa Coloma", | ||
| "height": "1,80m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "€1.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "70934", | ||
| "name": "Nolito", | ||
| "position": "Left Winger", | ||
| "dateOfBirth": "Oct 15, 1986", | ||
| "age": "24", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,75m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "€2.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "28003", | ||
| "name": "Lionel Messi", | ||
| "position": "Right Winger", | ||
| "dateOfBirth": "Jun 24, 1987", | ||
| "age": "24", | ||
| "nationality": [ | ||
| "Argentina", | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Inter Miami CF", | ||
| "height": "1,70m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 1, 2005", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona B", | ||
| "contract": null, | ||
| "marketValue": "€100.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "65278", | ||
| "name": "Pedro", | ||
| "position": "Right Winger", | ||
| "dateOfBirth": "Jul 28, 1987", | ||
| "age": "23", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "SS Lazio", | ||
| "height": "1,67m", | ||
| "foot": "both", | ||
| "joinedOn": "Jan 1, 2008", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona B", | ||
| "contract": null, | ||
| "marketValue": "€25.00m", | ||
| "status": "Hamstring injury - Return expected on Jan 13, 2025" | ||
| }, | ||
| { | ||
| "id": "53309", | ||
| "name": "Jeffrén", | ||
| "position": "Right Winger", | ||
| "dateOfBirth": "Jan 20, 1988", | ||
| "age": "23", | ||
| "nationality": [ | ||
| "Venezuela", | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,73m", | ||
| "foot": "left", | ||
| "joinedOn": "Aug 1, 2009", | ||
| "joined": "", | ||
| "signedFrom": "FC Barcelona Atlètic", | ||
| "contract": null, | ||
| "marketValue": "€3.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "44675", | ||
| "name": "Bojan Krkic", | ||
| "position": "Second Striker", | ||
| "dateOfBirth": "Aug 28, 1990", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Spain", | ||
| "Serbia" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,70m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2013", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €13.00m", | ||
| "contract": null, | ||
| "marketValue": "€15.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "7980", | ||
| "name": "David Villa", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Dec 3, 1981", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,74m", | ||
| "foot": "both", | ||
| "joinedOn": "Jul 1, 2010", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €40.00m", | ||
| "contract": null, | ||
| "marketValue": "€50.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3455", | ||
| "name": "Zlatan Ibrahimović", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Oct 3, 1981", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "Sweden", | ||
| "Bosnia-Herzegovina" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,95m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 27, 2009", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €69.50m", | ||
| "contract": null, | ||
| "marketValue": "€35.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "129476", | ||
| "name": "Gerard Deulofeu", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Mar 13, 1994", | ||
| "age": "17", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Udinese Calcio", | ||
| "height": "1,77m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2017", | ||
| "joined": "", | ||
| "signedFrom": "Everton FC", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "Knee surgery - Return unknown" | ||
| } | ||
| ] | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Address data consistency issues in test fixtures.
The test data has several consistency issues that should be addressed:
- Inconsistent date formats: "Jan 14, 1982" vs empty strings
- Inconsistent market value formats: "€20.00m" vs "-"
- Empty strings vs null values
- Inconsistent status formats
Consider normalizing the data format:
{
"dateOfBirth": "1982-01-14", // ISO 8601 format
"marketValue": 20000000, // Numeric value in euros
"status": null, // null instead of empty string
"height": 1.83, // Numeric value in meters
}| { | ||
| "id": "11", | ||
| "players": [ | ||
| { | ||
| "id": "122", | ||
| "name": "Jens Lehmann", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Nov 10, 1969", | ||
| "age": "34", | ||
| "nationality": [ | ||
| "Germany" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "m", | ||
| "foot": "N/A", | ||
| "joinedOn": "Mar 1, 2011", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3190", | ||
| "name": "Stuart Taylor", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Nov 28, 1980", | ||
| "age": "23", | ||
| "nationality": [ | ||
| "England" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,98m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2000", | ||
| "joined": "", | ||
| "signedFrom": "Arsenal FC Reserves", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3199", | ||
| "name": "Rami Shaaban", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Jun 30, 1975", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "Sweden", | ||
| "Egypt" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,94m", | ||
| "foot": "", | ||
| "joinedOn": "Jul 1, 2002", | ||
| "joined": "", | ||
| "signedFrom": "Djurgårdens IF", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3559", | ||
| "name": "Graham Stack", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Sep 26, 1981", | ||
| "age": "22", | ||
| "nationality": [ | ||
| "Ireland", | ||
| "England" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,88m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2000", | ||
| "joined": "", | ||
| "signedFrom": "Arsenal FC U18", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3554", | ||
| "name": "Craig Holloway", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Aug 10, 1984", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "England" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "-", | ||
| "foot": "", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3184", | ||
| "name": "Martin Keown", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Jul 24, 1966", | ||
| "age": "37", | ||
| "nationality": [ | ||
| "England" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,86m", | ||
| "foot": "right", | ||
| "joinedOn": "Feb 4, 1993", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €3.00m", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3193", | ||
| "name": "Pascal Cygan", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Apr 29, 1974", | ||
| "age": "30", | ||
| "nationality": [ | ||
| "France", | ||
| "Poland" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,92m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 1, 2002", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €3.83m", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "4277", | ||
| "name": "Philippe Senderos", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Feb 14, 1985", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Switzerland", | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,89m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2003", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €3.55m", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3198", | ||
| "name": "Sol Campbell", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Sep 18, 1974", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "England", | ||
| "Jamaica" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "m", | ||
| "foot": "N/A", | ||
| "joinedOn": "Jan 1, 2010", | ||
| "joined": "", | ||
| "signedFrom": "Without Club", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3201", | ||
| "name": "Stathis Tavlaridis", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Jan 25, 1980", | ||
| "age": "24", | ||
| "nationality": [ | ||
| "Greece" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,86m", | ||
| "foot": "right", | ||
| "joinedOn": "Sep 19, 2001", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €900k", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3202", | ||
| "name": "Kolo Touré", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Mar 19, 1981", | ||
| "age": "23", | ||
| "nationality": [ | ||
| "Cote d'Ivoire", | ||
| "England" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,78m", | ||
| "foot": "right", | ||
| "joinedOn": "Feb 14, 2002", | ||
| "joined": "", | ||
| "signedFrom": "ASEC Mimosas", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3182", | ||
| "name": "Ashley Cole", | ||
| "position": "Left-Back", | ||
| "dateOfBirth": "Dec 20, 1980", | ||
| "age": "23", | ||
| "nationality": [ | ||
| "England", | ||
| "Barbados" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,76m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 1, 1999", | ||
| "joined": "", | ||
| "signedFrom": "Arsenal FC Reserves", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3191", | ||
| "name": "Giovanni van Bronckhorst", | ||
| "position": "Left-Back", | ||
| "dateOfBirth": "Feb 5, 1975", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "Netherlands" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,77m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 1, 2001", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €13.50m", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "7449", | ||
| "name": "Gaël Clichy", | ||
| "position": "Left-Back", | ||
| "dateOfBirth": "Jul 26, 1985", | ||
| "age": "18", | ||
| "nationality": [ | ||
| "France", | ||
| "Martinique" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,76m", | ||
| "foot": "left", | ||
| "joinedOn": "Aug 4, 2003", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €375k", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3189", | ||
| "name": "Laurén", | ||
| "position": "Right-Back", | ||
| "dateOfBirth": "Jan 19, 1977", | ||
| "age": "27", | ||
| "nationality": [ | ||
| "Cameroon", | ||
| "Equatorial Guinea" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,82m", | ||
| "foot": "both", | ||
| "joinedOn": "Jul 1, 2000", | ||
| "joined": "", | ||
| "signedFrom": "RCD Mallorca", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "7335", | ||
| "name": "Justin Hoyte", | ||
| "position": "Right-Back", | ||
| "dateOfBirth": "Nov 20, 1984", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Trinidad and Tobago", | ||
| "England" | ||
| ], | ||
| "currentClub": "Miami Beach CF", | ||
| "height": "1,78m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2003", | ||
| "joined": "", | ||
| "signedFrom": "Arsenal FC U18", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "31313", | ||
| "name": "Frank Simek", | ||
| "position": "Right-Back", | ||
| "dateOfBirth": "Oct 13, 1984", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "United States", | ||
| "Poland" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,83m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2003", | ||
| "joined": "", | ||
| "signedFrom": "Arsenal FC U18", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3183", | ||
| "name": "Patrick Vieira", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Jun 23, 1976", | ||
| "age": "28", | ||
| "nationality": [ | ||
| "France", | ||
| "Senegal" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,92m", | ||
| "foot": "right", | ||
| "joinedOn": "Aug 14, 1996", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €5.35m", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3194", | ||
| "name": "Gilberto Silva", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Oct 7, 1976", | ||
| "age": "27", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,85m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 26, 2002", | ||
| "joined": "", | ||
| "signedFrom": "Clube Atlético Mineiro", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "9410", | ||
| "name": "Ólafur Ingi Skúlason", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Apr 1, 1983", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Iceland" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,83m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 11, 2001", | ||
| "joined": "", | ||
| "signedFrom": "Fylkir Reykjavík", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3208", | ||
| "name": "Ray Parlour", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "Mar 7, 1973", | ||
| "age": "31", | ||
| "nationality": [ | ||
| "England" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,78m", | ||
| "foot": "right", | ||
| "joinedOn": "Mar 6, 1991", | ||
| "joined": "", | ||
| "signedFrom": "Arsenal FC U18", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3192", | ||
| "name": "Edú Gaspar", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "May 15, 1978", | ||
| "age": "26", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Portugal" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,89m", | ||
| "foot": "left", | ||
| "joinedOn": "Jan 1, 2002", | ||
| "joined": "", | ||
| "signedFrom": "Sport Club Corinthians Paulista", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "25385", | ||
| "name": "John Spicer", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "Sep 13, 1983", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "England" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,80m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "8806", | ||
| "name": "Cesc Fàbregas", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "May 4, 1987", | ||
| "age": "17", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,79m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2004", | ||
| "joined": "", | ||
| "signedFrom": "Arsenal FC U18", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3134", | ||
| "name": "Freddie Ljungberg", | ||
| "position": "Right Midfield", | ||
| "dateOfBirth": "Apr 16, 1977", | ||
| "age": "27", | ||
| "nationality": [ | ||
| "Sweden" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "m", | ||
| "foot": "N/A", | ||
| "joinedOn": "Sep 1, 1998", | ||
| "joined": "", | ||
| "signedFrom": "Halmstads BK", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3205", | ||
| "name": "David Bentley", | ||
| "position": "Right Midfield", | ||
| "dateOfBirth": "Aug 27, 1984", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "England" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,78m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2003", | ||
| "joined": "", | ||
| "signedFrom": "Arsenal FC U18", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3185", | ||
| "name": "Robert Pirès", | ||
| "position": "Left Midfield", | ||
| "dateOfBirth": "Oct 29, 1973", | ||
| "age": "30", | ||
| "nationality": [ | ||
| "France", | ||
| "Portugal" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,87m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2000", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €9.80m", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "14551", | ||
| "name": "Quincy Owusu-Abeyie", | ||
| "position": "Left Winger", | ||
| "dateOfBirth": "Apr 15, 1986", | ||
| "age": "18", | ||
| "nationality": [ | ||
| "Ghana", | ||
| "Netherlands" | ||
| ], | ||
| "currentClub": "SV Robinhood Amsterdam", | ||
| "height": "1,82m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2004", | ||
| "joined": "", | ||
| "signedFrom": "Arsenal FC U18", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3560", | ||
| "name": "Jerome Thomas", | ||
| "position": "Left Winger", | ||
| "dateOfBirth": "Mar 23, 1983", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "England", | ||
| "Guyana" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,77m", | ||
| "foot": "left", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "14552", | ||
| "name": "Ryan Smith", | ||
| "position": "Left Winger", | ||
| "dateOfBirth": "Nov 10, 1986", | ||
| "age": "17", | ||
| "nationality": [ | ||
| "England", | ||
| "United States" | ||
| ], | ||
| "currentClub": "Without Club", | ||
| "height": "1,74m", | ||
| "foot": "left", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "7717", | ||
| "name": "José Antonio Reyes", | ||
| "position": "Right Winger", | ||
| "dateOfBirth": "Sep 1, 1983", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Spain" | ||
| ], | ||
| "currentClub": "---", | ||
| "height": "1,76m", | ||
| "foot": "left", | ||
| "joinedOn": "Jan 1, 2004", | ||
| "joined": "", | ||
| "signedFrom": "Sevilla FC", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3187", | ||
| "name": "Dennis Bergkamp", | ||
| "position": "Second Striker", | ||
| "dateOfBirth": "May 10, 1969", | ||
| "age": "35", | ||
| "nationality": [ | ||
| "Netherlands" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,83m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 1995", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €11.25m", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3188", | ||
| "name": "Sylvain Wiltord", | ||
| "position": "Second Striker", | ||
| "dateOfBirth": "May 10, 1974", | ||
| "age": "30", | ||
| "nationality": [ | ||
| "France", | ||
| "Guadeloupe" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,74m", | ||
| "foot": "right", | ||
| "joinedOn": "Aug 26, 2000", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €17.50m", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3186", | ||
| "name": "Francis Jeffers", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Jan 25, 1981", | ||
| "age": "23", | ||
| "nationality": [ | ||
| "England" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,78m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2001", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €15.30m", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3207", | ||
| "name": "Thierry Henry", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Aug 17, 1977", | ||
| "age": "26", | ||
| "nationality": [ | ||
| "France", | ||
| "Guadeloupe" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,88m", | ||
| "foot": "both", | ||
| "joinedOn": "Jan 6, 2012", | ||
| "joined": "", | ||
| "signedFrom": "New York Red Bulls", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3133", | ||
| "name": "Nwankwo Kanu", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Aug 1, 1976", | ||
| "age": "27", | ||
| "nationality": [ | ||
| "Nigeria" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,97m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 1999", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €6.25m", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "3266", | ||
| "name": "Jérémie Aliadière", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Mar 30, 1983", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "France", | ||
| "Algeria" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,83m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2001", | ||
| "joined": "", | ||
| "signedFrom": "Arsenal FC U18", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "9329", | ||
| "name": "Michal Papadopulos", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Apr 14, 1985", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Czech Republic", | ||
| "Greece" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,83m", | ||
| "foot": "right", | ||
| "joinedOn": "Aug 1, 2003", | ||
| "joined": "", | ||
| "signedFrom": "FC Banik Ostrava", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| } | ||
| ] | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Normalize transfer fee formats in test data.
The transfer fee format in signedFrom field is inconsistent:
: Ablöse €3.00m: Ablöse -- Empty strings
Standardize the format:
{
"signedFrom": {
"club": "FC Barcelona B",
"fee": 3000000, // Amount in euros, null if no fee
"currency": "EUR"
}
}| { | ||
| "id": "210", | ||
| "players": [ | ||
| { | ||
| "id": "52313", | ||
| "name": "Marcelo Grohe", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Jan 13, 1987", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "Al-Kholood Club", | ||
| "height": "1,88m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2004", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA U20", | ||
| "contract": null, | ||
| "marketValue": "€3.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "67886", | ||
| "name": "Paulo Victor", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Jan 12, 1987", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "Al-Rayyan SC", | ||
| "height": "1,87m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 13, 2017", | ||
| "joined": "", | ||
| "signedFrom": "CR Flamengo", | ||
| "contract": null, | ||
| "marketValue": "€2.00m", | ||
| "status": "No eligibility - until Jun 30, 2025 - Qatar Stars League" | ||
| }, | ||
| { | ||
| "id": "95747", | ||
| "name": "Bruno Grassi", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Mar 5, 1987", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "Radwa Club", | ||
| "height": "1,92m", | ||
| "foot": "right", | ||
| "joinedOn": "Apr 23, 2015", | ||
| "joined": "", | ||
| "signedFrom": "EC Cruzeiro", | ||
| "contract": null, | ||
| "marketValue": "€500k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "288415", | ||
| "name": "Léo Jardim", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Mar 20, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "Clube de Regatas Vasco da Gama", | ||
| "height": "1,88m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2015", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA B (-2022)", | ||
| "contract": null, | ||
| "marketValue": "€100k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "555016", | ||
| "name": "Brenno", | ||
| "position": "Goalkeeper", | ||
| "dateOfBirth": "Apr 1, 1999", | ||
| "age": "17", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "Fortaleza Esporte Clube", | ||
| "height": "1,90m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2019", | ||
| "joined": "Returned after loan spell with SSC Bari; date: Jun 30, 2024; fee: End of loan", | ||
| "signedFrom": "Grêmio FBPA B (-2022)", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "32568", | ||
| "name": "Pedro Geromel", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Sep 21, 1985", | ||
| "age": "31", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,90m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2016", | ||
| "joined": "", | ||
| "signedFrom": "1.FC Köln", | ||
| "contract": null, | ||
| "marketValue": "€4.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "52844", | ||
| "name": "Marcelo Oliveira", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Mar 29, 1987", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,84m", | ||
| "foot": "left", | ||
| "joinedOn": "Jan 1, 2015", | ||
| "joined": "", | ||
| "signedFrom": "Cruzeiro Esporte Clube", | ||
| "contract": null, | ||
| "marketValue": "€2.75m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "145400", | ||
| "name": "Walter Kannemann", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Mar 14, 1991", | ||
| "age": "25", | ||
| "nationality": [ | ||
| "Argentina", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "Grêmio Foot-Ball Porto Alegrense", | ||
| "height": "1,84m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 15, 2016", | ||
| "joined": "", | ||
| "signedFrom": "Atlas Guadalajara", | ||
| "contract": null, | ||
| "marketValue": "€1.50m", | ||
| "status": "Hip flexor problems - Return unknown" | ||
| }, | ||
| { | ||
| "id": "256453", | ||
| "name": "Bressan", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Jan 15, 1993", | ||
| "age": "23", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "OFI Crete FC", | ||
| "height": "1,85m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2013", | ||
| "joined": "", | ||
| "signedFrom": "Esporte Clube Juventude", | ||
| "contract": null, | ||
| "marketValue": "€1.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "68679", | ||
| "name": "Bruno Rodrigo", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Apr 12, 1985", | ||
| "age": "31", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,86m", | ||
| "foot": "right", | ||
| "joinedOn": "Mar 8, 2017", | ||
| "joined": "", | ||
| "signedFrom": "Without Club", | ||
| "contract": null, | ||
| "marketValue": "€1.25m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "80499", | ||
| "name": "Paulo Miranda", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Aug 16, 1988", | ||
| "age": "28", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Disqualification", | ||
| "height": "1,84m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 5, 2018", | ||
| "joined": "", | ||
| "signedFrom": ": Ablöse €800k", | ||
| "contract": null, | ||
| "marketValue": "€1.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "292152", | ||
| "name": "Rafael Thyere", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "May 17, 1993", | ||
| "age": "23", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Sport Club do Recife", | ||
| "height": "1,90m", | ||
| "foot": "right", | ||
| "joinedOn": "Oct 1, 2013", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA B (-2022)", | ||
| "contract": null, | ||
| "marketValue": "€500k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "216071", | ||
| "name": "Gabriel", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Feb 28, 1989", | ||
| "age": "27", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Without Club", | ||
| "height": "1,91m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2015", | ||
| "joined": "", | ||
| "signedFrom": "CE Lajeadense", | ||
| "contract": null, | ||
| "marketValue": "€250k", | ||
| "status": "Knee surgery - Return unknown" | ||
| }, | ||
| { | ||
| "id": "445101", | ||
| "name": "Rodrigues", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Oct 10, 1997", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "San Jose Earthquakes", | ||
| "height": "1,88m", | ||
| "foot": "right", | ||
| "joinedOn": "Aug 9, 2019", | ||
| "joined": "", | ||
| "signedFrom": "ABC Futebol Clube (RN)", | ||
| "contract": null, | ||
| "marketValue": "€100k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "539183", | ||
| "name": "Anderson", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Mar 2, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Bolívar La Paz", | ||
| "height": "1,86m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "555015", | ||
| "name": "Ruan", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Jun 7, 1999", | ||
| "age": "17", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "São Paulo Futebol Clube", | ||
| "height": "1,87m", | ||
| "foot": "right", | ||
| "joinedOn": "Aug 12, 2021", | ||
| "joined": "", | ||
| "signedFrom": "US Sassuolo", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "689524", | ||
| "name": "Mendonça", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Aug 15, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retrô FC Brasil", | ||
| "height": "1,94m", | ||
| "foot": "left", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "555634", | ||
| "name": "Derlan", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Feb 3, 1996", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Oita Trinita", | ||
| "height": "1,87m", | ||
| "foot": "left", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "476366", | ||
| "name": "Denílson", | ||
| "position": "Centre-Back", | ||
| "dateOfBirth": "Apr 18, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retrô FC Brasil", | ||
| "height": "1,87m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "182216", | ||
| "name": "Bruno Cortez", | ||
| "position": "Left-Back", | ||
| "dateOfBirth": "Mar 11, 1987", | ||
| "age": "29", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Without Club", | ||
| "height": "1,79m", | ||
| "foot": "left", | ||
| "joinedOn": "Jan 30, 2017", | ||
| "joined": "", | ||
| "signedFrom": "São Paulo Futebol Clube", | ||
| "contract": null, | ||
| "marketValue": "€700k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "322781", | ||
| "name": "Breno Lorran", | ||
| "position": "Left-Back", | ||
| "dateOfBirth": "Mar 6, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Marília AC (SP)", | ||
| "height": "1,74m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 1, 2013", | ||
| "joined": "", | ||
| "signedFrom": "Red Bull Brasil (SP)", | ||
| "contract": null, | ||
| "marketValue": "€500k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "406676", | ||
| "name": "Juninho Capixaba", | ||
| "position": "Left-Back", | ||
| "dateOfBirth": "Jul 6, 1997", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Red Bull Bragantino", | ||
| "height": "1,76m", | ||
| "foot": "left", | ||
| "joinedOn": "May 17, 2019", | ||
| "joined": "", | ||
| "signedFrom": "Sport Club Corinthians Paulista", | ||
| "contract": null, | ||
| "marketValue": "€50k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "552548", | ||
| "name": "Guilherme Guedes", | ||
| "position": "Left-Back", | ||
| "dateOfBirth": "May 18, 1999", | ||
| "age": "17", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Navbahor Namangan", | ||
| "height": "1,77m", | ||
| "foot": "left", | ||
| "joinedOn": "Jan 1, 2020", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA B (-2022)", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "75083", | ||
| "name": "Edílson", | ||
| "position": "Right-Back", | ||
| "dateOfBirth": "Jul 27, 1986", | ||
| "age": "30", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,77m", | ||
| "foot": "right", | ||
| "joinedOn": "Apr 1, 2022", | ||
| "joined": "", | ||
| "signedFrom": "Avaí FC", | ||
| "contract": null, | ||
| "marketValue": "€1.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "177845", | ||
| "name": "Madson", | ||
| "position": "Right-Back", | ||
| "dateOfBirth": "Jan 13, 1992", | ||
| "age": "24", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Without Club", | ||
| "height": "1,82m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2018", | ||
| "joined": "", | ||
| "signedFrom": "Clube de Regatas Vasco da Gama", | ||
| "contract": null, | ||
| "marketValue": "€1.50m", | ||
| "status": "Injury to the ankle - Return unknown" | ||
| }, | ||
| { | ||
| "id": "29368", | ||
| "name": "Léo Moura", | ||
| "position": "Right-Back", | ||
| "dateOfBirth": "Oct 23, 1978", | ||
| "age": "38", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,76m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 16, 2017", | ||
| "joined": "", | ||
| "signedFrom": "Santa Cruz FC (PE)", | ||
| "contract": null, | ||
| "marketValue": "€500k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "347016", | ||
| "name": "Léo Gomes", | ||
| "position": "Right-Back", | ||
| "dateOfBirth": "Mar 30, 1996", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Without Club", | ||
| "height": "1,78m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 16, 2017", | ||
| "joined": "", | ||
| "signedFrom": "Boa EC", | ||
| "contract": null, | ||
| "marketValue": "€150k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "555012", | ||
| "name": "Felipe Albuquerque", | ||
| "position": "Right-Back", | ||
| "dateOfBirth": "Sep 27, 1999", | ||
| "age": "17", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "AA Internacional de Limeira", | ||
| "height": "1,74m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "366948", | ||
| "name": "Jailson", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Sep 7, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Celta de Vigo", | ||
| "height": "1,87m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2015", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA U20", | ||
| "contract": null, | ||
| "marketValue": "€1.00m", | ||
| "status": "Adductor pain - Return unknown" | ||
| }, | ||
| { | ||
| "id": "435186", | ||
| "name": "Michel", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Mar 22, 1990", | ||
| "age": "26", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Without Club", | ||
| "height": "1,75m", | ||
| "foot": "both", | ||
| "joinedOn": "Jan 1, 2018", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio Novorizontino", | ||
| "contract": null, | ||
| "marketValue": "€750k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "405727", | ||
| "name": "Kaio Mendes", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Mar 18, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Ituano Futebol Clube (SP)", | ||
| "height": "1,73m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2016", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA U20", | ||
| "contract": null, | ||
| "marketValue": "€250k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "346705", | ||
| "name": "Balbino", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Jan 19, 1997", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "EC Cruzeiro", | ||
| "height": "1,82m", | ||
| "foot": "left", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "€100k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "362842", | ||
| "name": "Arthur Melo", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Aug 12, 1996", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Juventus FC", | ||
| "height": "1,72m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2017", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA B (-2022)", | ||
| "contract": null, | ||
| "marketValue": "€100k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "376867", | ||
| "name": "Moisés Gaúcho", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Sep 24, 1994", | ||
| "age": "22", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Zakho SC", | ||
| "height": "1,81m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "€100k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "520629", | ||
| "name": "Filipe Machado", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Jan 20, 1996", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Esporte Clube Vitória", | ||
| "height": "1,74m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2016", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA U20", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "643282", | ||
| "name": "Rodrigo Ancheta", | ||
| "position": "Defensive Midfield", | ||
| "dateOfBirth": "Jan 2, 1997", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Uruguay", | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Without Club", | ||
| "height": "1,85m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "258070", | ||
| "name": "Ramiro", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "May 22, 1993", | ||
| "age": "23", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "FC Dallas", | ||
| "height": "1,69m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2013", | ||
| "joined": "", | ||
| "signedFrom": "Esporte Clube Juventude", | ||
| "contract": null, | ||
| "marketValue": "€4.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "17663", | ||
| "name": "Cícero", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "Aug 26, 1984", | ||
| "age": "32", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "m", | ||
| "foot": "N/A", | ||
| "joinedOn": "Sep 29, 2017", | ||
| "joined": "", | ||
| "signedFrom": "Fluminense Football Club", | ||
| "contract": null, | ||
| "marketValue": "€4.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "50047", | ||
| "name": "Maicon", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "Sep 14, 1985", | ||
| "age": "31", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,84m", | ||
| "foot": "right", | ||
| "joinedOn": "Aug 30, 2021", | ||
| "joined": "", | ||
| "signedFrom": "São Paulo Futebol Clube", | ||
| "contract": null, | ||
| "marketValue": "€2.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "229736", | ||
| "name": "Alisson", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "Jun 25, 1993", | ||
| "age": "23", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "São Paulo Futebol Clube", | ||
| "height": "1,74m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2018", | ||
| "joined": "", | ||
| "signedFrom": "Cruzeiro Esporte Clube", | ||
| "contract": null, | ||
| "marketValue": "€2.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "405726", | ||
| "name": "Felipe Tontini", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "Jul 16, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "EC São Luiz", | ||
| "height": "1,83m", | ||
| "foot": "both", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "€100k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "552549", | ||
| "name": "Matheus Henrique", | ||
| "position": "Central Midfield", | ||
| "dateOfBirth": "Dec 19, 1997", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Cruzeiro Esporte Clube", | ||
| "height": "1,75m", | ||
| "foot": "right", | ||
| "joinedOn": "Sep 27, 2018", | ||
| "joined": "", | ||
| "signedFrom": "AD São Caetano (SP)", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "313106", | ||
| "name": "Luan", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "Mar 27, 1993", | ||
| "age": "23", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Without Club", | ||
| "height": "1,80m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 27, 2023", | ||
| "joined": "", | ||
| "signedFrom": "Sport Club Corinthians Paulista", | ||
| "contract": null, | ||
| "marketValue": "€10.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "54183", | ||
| "name": "Maicosuel", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "Jun 16, 1986", | ||
| "age": "30", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "m", | ||
| "foot": "N/A", | ||
| "joinedOn": "Feb 8, 2018", | ||
| "joined": "", | ||
| "signedFrom": "São Paulo Futebol Clube", | ||
| "contract": null, | ||
| "marketValue": "€2.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "34332", | ||
| "name": "Douglas", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "Feb 18, 1982", | ||
| "age": "34", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,76m", | ||
| "foot": "left", | ||
| "joinedOn": "Jan 24, 2017", | ||
| "joined": "", | ||
| "signedFrom": "Atlético Monte Azul (SP)", | ||
| "contract": null, | ||
| "marketValue": "€1.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "351738", | ||
| "name": "Lincoln", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "Nov 7, 1998", | ||
| "age": "18", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Fenerbahce", | ||
| "height": "1,78m", | ||
| "foot": "left", | ||
| "joinedOn": "Feb 1, 2015", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA U20", | ||
| "contract": null, | ||
| "marketValue": "€750k", | ||
| "status": "No eligibility - - Süper Lig" | ||
| }, | ||
| { | ||
| "id": "387611", | ||
| "name": "Lima", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "Jun 11, 1996", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Fluminense Football Club", | ||
| "height": "1,81m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "€100k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "392487", | ||
| "name": "Thaciano", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "May 12, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Esporte Clube Bahia", | ||
| "height": "1,82m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 1, 2019", | ||
| "joined": "", | ||
| "signedFrom": "Boa EC", | ||
| "contract": null, | ||
| "marketValue": "€100k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "529646", | ||
| "name": "Patrick Machado", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "Nov 23, 1998", | ||
| "age": "18", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Volta Redonda Futebol Clube (RJ)", | ||
| "height": "1,75m", | ||
| "foot": "left", | ||
| "joinedOn": "May 26, 2019", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA B (-2022)", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "561214", | ||
| "name": "Thonny Anderson", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "Dec 27, 1997", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Red Bull Bragantino", | ||
| "height": "1,84m", | ||
| "foot": "left", | ||
| "joinedOn": "Jan 3, 2019", | ||
| "joined": "", | ||
| "signedFrom": "Cruzeiro Esporte Clube", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "351903", | ||
| "name": "Jean Pyerre", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "May 7, 1998", | ||
| "age": "18", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Ypiranga FC", | ||
| "height": "1,87m", | ||
| "foot": "right", | ||
| "joinedOn": "Jul 16, 2018", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA U20", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "627099", | ||
| "name": "Isaque", | ||
| "position": "Attacking Midfield", | ||
| "dateOfBirth": "Apr 22, 1997", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Guarani Futebol Clube (SP)", | ||
| "height": "1,78m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2020", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA B (-2022)", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "321239", | ||
| "name": "Everton", | ||
| "position": "Left Winger", | ||
| "dateOfBirth": "Mar 22, 1996", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "CR Flamengo", | ||
| "height": "1,74m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2014", | ||
| "joined": "", | ||
| "signedFrom": "Fortaleza Esporte Clube", | ||
| "contract": null, | ||
| "marketValue": "€2.50m", | ||
| "status": "Achilles tendon rupture - Return unknown" | ||
| }, | ||
| { | ||
| "id": "76902", | ||
| "name": "Fernandinho", | ||
| "position": "Left Winger", | ||
| "dateOfBirth": "Nov 25, 1985", | ||
| "age": "31", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retrô FC Brasil", | ||
| "height": "1,73m", | ||
| "foot": "left", | ||
| "joinedOn": "Jul 10, 2014", | ||
| "joined": "", | ||
| "signedFrom": "Al-Jazira Club", | ||
| "contract": null, | ||
| "marketValue": "€1.25m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "520636", | ||
| "name": "Dionathã", | ||
| "position": "Left Winger", | ||
| "dateOfBirth": "Jan 24, 1998", | ||
| "age": "18", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "EC São Luiz", | ||
| "height": "1,74m", | ||
| "foot": "both", | ||
| "joinedOn": "Jan 1, 2018", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA B (-2022)", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "552547", | ||
| "name": "Lucas Poletto", | ||
| "position": "Left Winger", | ||
| "dateOfBirth": "Mar 29, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "AE Kifisias", | ||
| "height": "1,81m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2018", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA B (-2022)", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "520662", | ||
| "name": "Pepê", | ||
| "position": "Left Winger", | ||
| "dateOfBirth": "Feb 24, 1997", | ||
| "age": "19", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "FC Porto", | ||
| "height": "1,75m", | ||
| "foot": "right", | ||
| "joinedOn": "May 1, 2017", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA U20", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "74758", | ||
| "name": "Marinho", | ||
| "position": "Right Winger", | ||
| "dateOfBirth": "May 29, 1990", | ||
| "age": "26", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Fortaleza Esporte Clube", | ||
| "height": "1,69m", | ||
| "foot": "left", | ||
| "joinedOn": "Jun 30, 2018", | ||
| "joined": "", | ||
| "signedFrom": "Changchun Yatai", | ||
| "contract": null, | ||
| "marketValue": "€1.50m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "393839", | ||
| "name": "Léo Tilica", | ||
| "position": "Right Winger", | ||
| "dateOfBirth": "Apr 20, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Al-Najma SC", | ||
| "height": "1,72m", | ||
| "foot": "right", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "€100k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "553470", | ||
| "name": "Vico", | ||
| "position": "Right Winger", | ||
| "dateOfBirth": "Dec 3, 1996", | ||
| "age": "20", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "PSS Sleman", | ||
| "height": "1,74m", | ||
| "foot": "left", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "-", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "104509", | ||
| "name": "André Felipe", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Sep 27, 1990", | ||
| "age": "26", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,84m", | ||
| "foot": "right", | ||
| "joinedOn": "Feb 22, 2019", | ||
| "joined": "", | ||
| "signedFrom": "Sport Club do Recife", | ||
| "contract": null, | ||
| "marketValue": "€4.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "195004", | ||
| "name": "Hernane", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Apr 8, 1986", | ||
| "age": "30", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Nacional FC", | ||
| "height": "1,83m", | ||
| "foot": "right", | ||
| "joinedOn": "Feb 22, 2018", | ||
| "joined": "", | ||
| "signedFrom": "Esporte Clube Bahia", | ||
| "contract": null, | ||
| "marketValue": "€3.00m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "58516", | ||
| "name": "Lucas Barrios", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Nov 13, 1984", | ||
| "age": "32", | ||
| "nationality": [ | ||
| "Paraguay", | ||
| "Argentina" | ||
| ], | ||
| "currentClub": "Retired", | ||
| "height": "1,89m", | ||
| "foot": "right", | ||
| "joinedOn": "Feb 24, 2017", | ||
| "joined": "", | ||
| "signedFrom": "Sociedade Esportiva Palmeiras", | ||
| "contract": null, | ||
| "marketValue": "€1.75m", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "379877", | ||
| "name": "Luis Henrique", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Mar 17, 1998", | ||
| "age": "18", | ||
| "nationality": [ | ||
| "Brazil", | ||
| "Italy" | ||
| ], | ||
| "currentClub": "Paternò Calcio", | ||
| "height": "1,84m", | ||
| "foot": "left", | ||
| "joinedOn": "", | ||
| "joined": "", | ||
| "signedFrom": "", | ||
| "contract": null, | ||
| "marketValue": "€750k", | ||
| "status": "unknown injury - Return unknown" | ||
| }, | ||
| { | ||
| "id": "203136", | ||
| "name": "Yuri Mamute", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "May 7, 1995", | ||
| "age": "21", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "SHB Da Nang FC", | ||
| "height": "1,80m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 1, 2013", | ||
| "joined": "", | ||
| "signedFrom": "Grêmio FBPA B (-2022)", | ||
| "contract": null, | ||
| "marketValue": "€650k", | ||
| "status": "" | ||
| }, | ||
| { | ||
| "id": "80815", | ||
| "name": "Jael", | ||
| "position": "Centre-Forward", | ||
| "dateOfBirth": "Oct 30, 1988", | ||
| "age": "28", | ||
| "nationality": [ | ||
| "Brazil" | ||
| ], | ||
| "currentClub": "Without Club", | ||
| "height": "1,86m", | ||
| "foot": "right", | ||
| "joinedOn": "Jan 18, 2017", | ||
| "joined": "", | ||
| "signedFrom": "Joinville Esporte Clube (SC)", | ||
| "contract": null, | ||
| "marketValue": "€450k", | ||
| "status": "" | ||
| } | ||
| ] | ||
| } No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Standardize player status information.
The status field contains various formats:
- Injury information with inconsistent return dates
- Eligibility issues with varying formats
- Empty strings for no status
Standardize the status format:
{
"status": {
"type": "INJURY"|"INELIGIBLE"|"AVAILABLE",
"details": "Hip flexor problems", // Optional
"returnDate": "2025-01-13", // ISO 8601 format, optional
"reason": "Qatar Stars League" // Optional
}
}8e6497e to
f3158a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (7)
.github/workflows/check.yml (4)
16-21: Update action version and consider Python version strategy
- The
actions/setup-pythonaction has a newer version available.- Consider using a minor version instead of a patch version for better maintainability.
Apply these changes:
- name: Set up Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: - python-version: '3.9.16' + python-version: '3.9' cache: 'pip'🧰 Tools
🪛 actionlint (1.7.4)
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)
22-26: Consider version pinning for development toolsWhile the setup is functional, consider pinning tool versions to ensure consistent behavior across different environments.
Consider either:
- Using a requirements-dev.txt file:
- name: Install dependencies run: | python -m pip install --upgrade pip - pip install ruff black interrogate + pip install -r requirements-dev.txt
- Or pinning versions directly:
- name: Install dependencies run: | python -m pip install --upgrade pip - pip install ruff black interrogate + pip install ruff==0.1.11 black==23.12.1 interrogate==1.5.0
27-34: Consider adding configuration files for toolsThe checks are well-organized, but consider moving tool configurations to dedicated config files for better maintainability.
- For Ruff: Add
ruff.tomlorpyproject.toml- For Black: Add
pyproject.toml- For Interrogate: Move settings to
pyproject.tomlExample
pyproject.toml:[tool.black] line-length = 88 target-version = ['py39'] [tool.interrogate] ignore-init-method = true ignore-init-module = true ignore-magic = false ignore-semiprivate = false ignore-private = false ignore-property-decorators = false ignore-module = false fail-under = 100 exclude = ["setup.py", "docs", "build"] verbose = 2 quiet = false color = true
14-14: Update checkout action versionThe
actions/checkoutaction has a newer version available.- - uses: actions/checkout@v3 + - uses: actions/checkout@v4🧰 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)
tests/services/test_competitions.py (1)
15-20: Consider adding response schema validationBoth test functions use exact matching (
assert response == expected), which makes tests brittle when dealing with dynamic data like market values or player counts that frequently change.Consider adding schema validation to ensure the response structure is correct while being more tolerant of value changes. Example:
from pydantic import BaseModel, Field class CompetitionResponse(BaseModel): name: str market_value: float = Field(gt=0) # Add other fields... def test_competitions_search(query: str, load_test_data: callable): tfmkt = TransfermarktCompetitionSearch(query=query) response = tfmkt.search_competitions() # Validate response structure CompetitionResponse.model_validate(response) # Test stable fields only expected = load_test_data(f"competitions/search/{query}") assert response["name"] == expected["name"]Also applies to: 31-36
tests/services/test_clubs.py (1)
1-60: Document test data structure in READMEThe tests rely heavily on JSON test data files, but their structure is not documented.
Consider adding a README.md in the tests/data directory explaining:
- The expected structure of JSON files
- Naming conventions for test data files
- How to generate/update test data
- Required fields and their types
Would you like me to help create this documentation?
.github/workflows/tests.yml (1)
34-35: Enhance test reporting and artifactsThe current test execution doesn't capture test results or generate reports.
Consider adding:
- JUnit XML reports for better CI integration
- Test coverage reports
- Test result artifacts
- - name: Run tests - run: poetry run pytest + - name: Run tests + run: | + poetry run pytest \ + --junitxml=junit/test-results.xml \ + --cov=app \ + --cov-report=xml \ + --cov-report=html + + - name: Upload test results + uses: actions/upload-artifact@v4 + if: always() # Run even if tests fail + with: + name: test-results + path: | + junit/test-results.xml + coverage.xml + htmlcov
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (40)
.github/workflows/check.yml(2 hunks).github/workflows/tests.yml(1 hunks)pyproject.toml(2 hunks)tests/clubs/test_clubs_players.py(0 hunks)tests/clubs/test_clubs_profile.py(0 hunks)tests/clubs/test_clubs_search.py(0 hunks)tests/competitions/test_competitions_clubs.py(0 hunks)tests/competitions/test_competitions_search.py(0 hunks)tests/conftest.py(1 hunks)tests/data/clubs/players/131_2010.json(1 hunks)tests/data/clubs/players/131_None.json(1 hunks)tests/data/clubs/players/210_2017.json(1 hunks)tests/data/clubs/players/27_2019.json(1 hunks)tests/data/clubs/players/31_2018.json(1 hunks)tests/data/clubs/players/5_2003.json(1 hunks)tests/data/clubs/profile/131.json(1 hunks)tests/data/clubs/profile/210.json(1 hunks)tests/data/clubs/profile/27.json(1 hunks)tests/data/clubs/profile/31.json(1 hunks)tests/data/clubs/profile/5.json(1 hunks)tests/data/clubs/search/Barcelona.json(1 hunks)tests/data/clubs/search/Bayern.json(1 hunks)tests/data/clubs/search/Grêmio.json(1 hunks)tests/data/clubs/search/Liverpool.json(1 hunks)tests/data/clubs/search/Milan.json(1 hunks)tests/data/competitions/clubs/BRA1.json(1 hunks)tests/data/competitions/clubs/ES1.json(1 hunks)tests/data/competitions/clubs/GB1.json(1 hunks)tests/data/competitions/search/Brasileirão.json(1 hunks)tests/data/competitions/search/La Liga.json(1 hunks)tests/data/competitions/search/Premier League.json(1 hunks)tests/players/test_players_achievements.py(0 hunks)tests/players/test_players_injuries.py(0 hunks)tests/players/test_players_market_value.py(0 hunks)tests/players/test_players_profile.py(0 hunks)tests/players/test_players_search.py(0 hunks)tests/players/test_players_stats.py(0 hunks)tests/players/test_players_transfers.py(0 hunks)tests/services/test_clubs.py(1 hunks)tests/services/test_competitions.py(1 hunks)
💤 Files with no reviewable changes (12)
- tests/players/test_players_injuries.py
- tests/competitions/test_competitions_clubs.py
- tests/players/test_players_search.py
- tests/clubs/test_clubs_profile.py
- tests/competitions/test_competitions_search.py
- tests/clubs/test_clubs_players.py
- tests/players/test_players_profile.py
- tests/players/test_players_achievements.py
- tests/clubs/test_clubs_search.py
- tests/players/test_players_transfers.py
- tests/players/test_players_stats.py
- tests/players/test_players_market_value.py
✅ Files skipped from review due to trivial changes (13)
- tests/data/clubs/search/Milan.json
- tests/data/clubs/search/Grêmio.json
- tests/data/competitions/search/Brasileirão.json
- tests/data/clubs/search/Bayern.json
- tests/data/clubs/search/Barcelona.json
- tests/data/clubs/search/Liverpool.json
- tests/data/competitions/clubs/BRA1.json
- tests/data/competitions/clubs/GB1.json
- tests/data/competitions/search/Premier League.json
- tests/data/competitions/search/La Liga.json
- tests/data/clubs/profile/5.json
- tests/data/competitions/clubs/ES1.json
- tests/data/clubs/players/5_2003.json
🚧 Files skipped from review as they are similar to previous changes (11)
- tests/data/clubs/profile/27.json
- tests/data/clubs/profile/131.json
- tests/data/clubs/profile/210.json
- tests/data/clubs/players/131_None.json
- tests/data/clubs/players/131_2010.json
- tests/data/clubs/players/31_2018.json
- tests/data/clubs/profile/31.json
- tests/data/clubs/players/210_2017.json
- tests/data/clubs/players/27_2019.json
- pyproject.toml
- tests/conftest.py
🧰 Additional context used
🪛 GitHub Actions: Tests
tests/services/test_competitions.py
[error] 36-36: Test failure in test_competitions_search[Brasileirão]: Actual API response data doesn't match expected test data. Differences in player counts, market values, and mean market values across Brazilian league divisions.
🪛 actionlint (1.7.4)
.github/workflows/check.yml
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)
.github/workflows/tests.yml
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)
14-14: 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)
26-26: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (2)
.github/workflows/check.yml (1)
Line range hint
1-11: LGTM! Good choice usingubuntu-latestUsing
ubuntu-latestensures you get the most recent stable Ubuntu version with security updates..github/workflows/tests.yml (1)
12-12: Update GitHub Actions to their latest versionsThe workflow uses older versions of GitHub Actions.
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)
| "Brasileirão", | ||
| "Premier League", | ||
| "La Liga", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix failing test for "Brasileirão" search query
The test is failing due to differences in player counts, market values, and mean market values across Brazilian league divisions. This suggests that the test data might be outdated or the API response structure has changed.
Consider these approaches to fix the test:
- Update the test data to match the current API response
- Make the assertions more resilient to dynamic data by:
- Comparing only stable fields
- Using schema validation instead of exact matching
- Adding tolerance ranges for numerical values
Would you like me to help implement any of these solutions?
Also applies to: 34-36
| @pytest.mark.parametrize( | ||
| "club_id, season_id", | ||
| [ | ||
| ("5", "2003"), # Milan AC | ||
| ("27", "2019"), # FC Bayern Munich | ||
| ("31", "2018"), # Liverpool FC | ||
| ("131", "2010"), # Barcelona FC | ||
| ("131", None), # Barcelona FC | ||
| ("210", "2017"), # Grêmio FBPA | ||
| ], | ||
| ) | ||
| def test_club_players(club_id: str, season_id: str, load_test_data: callable): | ||
| tfmkt = TransfermarktClubPlayers(club_id=club_id, season_id=season_id) | ||
| response = tfmkt.get_club_players() | ||
| expected = load_test_data(f"clubs/players/{club_id}_{season_id}") | ||
|
|
||
| assert response == expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add error case tests for club_players endpoint
The test cases cover only successful scenarios. Consider adding tests for error cases:
@pytest.mark.parametrize(
"club_id, season_id, expected_error",
[
("invalid", "2023", ValueError),
("210", "invalid", ValueError),
("999999", "2023", ValueError), # Non-existent club
],
)
def test_club_players_errors(club_id, season_id, expected_error):
tfmkt = TransfermarktClubPlayers(club_id=club_id, season_id=season_id)
with pytest.raises(expected_error):
tfmkt.get_club_players()f3158a5 to
403148b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
.github/workflows/tests.yml (1)
12-14: 🛠️ Refactor suggestionUpdate GitHub Actions versions.
The GitHub Actions versions are outdated and should be updated to their latest versions.
🧰 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)
14-14: 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)
🧹 Nitpick comments (9)
.github/workflows/tests.yml (4)
10-10: Consider upgrading to Ubuntu 22.04.Ubuntu 20.04 is approaching EOL in April 2024. Consider upgrading to Ubuntu 22.04 for longer support and security updates.
- runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04
16-16: Consider upgrading Python version.Python 3.9.16 is quite old. Consider upgrading to a newer version (e.g., 3.12) to benefit from performance improvements and new features.
- python-version: "3.9.16" + python-version: "3.12"
18-23: Consider updating Poetry version.Poetry 1.5.1 could be updated to the latest version for bug fixes and improvements. The virtualenv configuration looks good.
- version: 1.5.1 + version: 1.7.1
34-35: Enhance test execution configuration.Consider adding test coverage reporting and improving test output visibility.
- run: poetry run pytest + run: poetry run pytest -v --cov=. --cov-report=xml --junit-xml=test-results.xmlThis change will:
- Increase test output verbosity (-v)
- Generate coverage reports (--cov)
- Create test results in JUnit format for better CI integration
.github/workflows/check.yml (5)
11-11: Consider pinning the Ubuntu version for reproducibility.While using
ubuntu-latestensures you get the most recent stable version, consider pinning to a specific version (e.g.,ubuntu-22.04) to ensure consistent behavior across workflow runs.- runs-on: ubuntu-latest + runs-on: ubuntu-22.04
14-14: Update checkout action to v4.The
actions/checkoutaction has a newer version (v4) available with performance improvements and bug fixes.- - uses: actions/checkout@v3 + - uses: actions/checkout@v4🧰 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)
16-20: Consider updating to a newer Python version.Python 3.9.16 is relatively old. Consider upgrading to Python 3.11 or 3.12 for better performance and access to newer language features.
with: - python-version: '3.9.16' + python-version: '3.11'🧰 Tools
🪛 actionlint (1.7.4)
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)
27-34: Consider adding configuration files for the linting tools.For better maintainability and consistency, consider adding configuration files:
pyproject.tomlfor Black configurationruff.tomlfor Ruff settings.interrogate.tomlfor Interrogate configurationThis would make it easier to maintain tool settings and share them with local development environments.
Would you like me to help generate these configuration files?
9-12: Add fail-fast and timeout configurations.Consider adding fail-fast and timeout configurations to improve workflow reliability:
jobs: check: + timeout-minutes: 10 runs-on: ubuntu-latest + strategy: + fail-fast: true
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (40)
.github/workflows/check.yml(2 hunks).github/workflows/tests.yml(1 hunks)pyproject.toml(2 hunks)tests/clubs/test_clubs_players.py(0 hunks)tests/clubs/test_clubs_profile.py(0 hunks)tests/clubs/test_clubs_search.py(0 hunks)tests/competitions/test_competitions_clubs.py(0 hunks)tests/competitions/test_competitions_search.py(0 hunks)tests/conftest.py(1 hunks)tests/data/clubs/players/131_2010.json(1 hunks)tests/data/clubs/players/131_None.json(1 hunks)tests/data/clubs/players/210_2017.json(1 hunks)tests/data/clubs/players/27_2019.json(1 hunks)tests/data/clubs/players/31_2018.json(1 hunks)tests/data/clubs/players/5_2003.json(1 hunks)tests/data/clubs/profile/131.json(1 hunks)tests/data/clubs/profile/210.json(1 hunks)tests/data/clubs/profile/27.json(1 hunks)tests/data/clubs/profile/31.json(1 hunks)tests/data/clubs/profile/5.json(1 hunks)tests/data/clubs/search/Barcelona.json(1 hunks)tests/data/clubs/search/Bayern.json(1 hunks)tests/data/clubs/search/Grêmio.json(1 hunks)tests/data/clubs/search/Liverpool.json(1 hunks)tests/data/clubs/search/Milan.json(1 hunks)tests/data/competitions/clubs/BRA1.json(1 hunks)tests/data/competitions/clubs/ES1.json(1 hunks)tests/data/competitions/clubs/GB1.json(1 hunks)tests/data/competitions/search/Brasileirão.json(1 hunks)tests/data/competitions/search/La Liga.json(1 hunks)tests/data/competitions/search/Premier League.json(1 hunks)tests/players/test_players_achievements.py(0 hunks)tests/players/test_players_injuries.py(0 hunks)tests/players/test_players_market_value.py(0 hunks)tests/players/test_players_profile.py(0 hunks)tests/players/test_players_search.py(0 hunks)tests/players/test_players_stats.py(0 hunks)tests/players/test_players_transfers.py(0 hunks)tests/services/test_clubs.py(1 hunks)tests/services/test_competitions.py(1 hunks)
💤 Files with no reviewable changes (12)
- tests/players/test_players_injuries.py
- tests/competitions/test_competitions_clubs.py
- tests/players/test_players_search.py
- tests/competitions/test_competitions_search.py
- tests/clubs/test_clubs_profile.py
- tests/players/test_players_market_value.py
- tests/players/test_players_achievements.py
- tests/clubs/test_clubs_players.py
- tests/clubs/test_clubs_search.py
- tests/players/test_players_profile.py
- tests/players/test_players_stats.py
- tests/players/test_players_transfers.py
🚧 Files skipped from review as they are similar to previous changes (26)
- tests/data/clubs/search/Barcelona.json
- tests/data/competitions/search/Premier League.json
- tests/data/clubs/search/Bayern.json
- tests/data/clubs/search/Grêmio.json
- tests/data/clubs/search/Milan.json
- tests/data/clubs/profile/5.json
- tests/data/competitions/clubs/GB1.json
- tests/data/clubs/profile/210.json
- tests/data/competitions/search/La Liga.json
- tests/data/clubs/profile/31.json
- tests/data/competitions/search/Brasileirão.json
- tests/data/clubs/profile/131.json
- tests/data/clubs/search/Liverpool.json
- tests/data/clubs/profile/27.json
- tests/data/clubs/players/5_2003.json
- tests/data/clubs/players/31_2018.json
- tests/data/clubs/players/131_2010.json
- tests/data/clubs/players/131_None.json
- tests/data/clubs/players/27_2019.json
- tests/data/clubs/players/210_2017.json
- tests/services/test_competitions.py
- tests/conftest.py
- tests/data/competitions/clubs/BRA1.json
- tests/data/competitions/clubs/ES1.json
- tests/services/test_clubs.py
- pyproject.toml
🧰 Additional context used
🪛 actionlint (1.7.4)
.github/workflows/check.yml
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)
.github/workflows/tests.yml
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)
14-14: 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)
26-26: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (2)
.github/workflows/tests.yml (2)
1-6: LGTM! Well-configured workflow triggers.The workflow is properly configured to run on both push and pull request events targeting the main branch, ensuring comprehensive test coverage during development and integration.
25-30: LGTM! Effective caching strategy.The caching configuration is well-implemented, using the poetry.lock hash as the cache key and correctly targeting the virtualenv directory.
🧰 Tools
🪛 actionlint (1.7.4)
26-26: the runner of "actions/cache@v3" 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 |
There was a problem hiding this comment.
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.
| - 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 |
403148b to
f79562c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (6)
tests/data/players/market_value/3373.json (2)
6-6: Consider standardizing data types and formats.A few suggestions to improve data consistency:
- Convert ages from strings to numbers (e.g.,
"24"→24) for easier numerical comparisons in tests.- Use a consistent format for market values, including the "Without Club" case (consider using
nullinstead of"-").Also applies to: 139-143
1-2: Consider adding metadata comments.It would be helpful to add a comment at the top of the file describing:
- The purpose of this test data
- The player it represents (appears to be Ronaldinho)
- The scenarios this data is designed to test
tests/data/players/injuries/8198.json (1)
12-13: Standardize empty value representation.The data shows inconsistent handling of empty values:
- Some records use empty string (
"") forgamesMissed- Some records use empty array (
[]) forgamesMissedClubsConsider standardizing empty value representation across all fields for better maintainability.
Also applies to: 32-33
tests/data/players/transfers/8198.json (2)
17-18: Standardize unknown value representation.The data shows inconsistent representation of unknown or empty values:
- Market values use "-"
- Fees use "-", "?" or "free transfer"
Consider standardizing the representation of unknown values across all fields.
Also applies to: 33-34, 97-98, 113-114, 129-130, 145-146, 161-162, 177-178, 193-194
197-200: Handle empty values in youthClubs array.The
youthClubsarray contains an empty string. Consider:
- Removing empty entries
- Using
nullfor unknown values- Documenting why empty strings are included
tests/data/players/achievements/68290.json (1)
9-12: Standardize season ID representation.The data shows inconsistent handling of season IDs:
- Some records have numeric IDs
- Some records have null IDs
- Both formats represent valid seasons
Consider standardizing the season ID representation across all records.
Also applies to: 21-24, 33-36, 45-48, 57-60, 69-72, 79-82, 89-92, 99-102, 109-112
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
poetry.lockis excluded by!**/*.lock
📒 Files selected for processing (73)
.github/workflows/check.yml(2 hunks).github/workflows/tests.yml(1 hunks)pyproject.toml(2 hunks)tests/clubs/test_clubs_players.py(0 hunks)tests/clubs/test_clubs_profile.py(0 hunks)tests/clubs/test_clubs_search.py(0 hunks)tests/competitions/test_competitions_clubs.py(0 hunks)tests/competitions/test_competitions_search.py(0 hunks)tests/conftest.py(1 hunks)tests/data/clubs/players/131_2010.json(1 hunks)tests/data/clubs/players/131_None.json(1 hunks)tests/data/clubs/players/210_2017.json(1 hunks)tests/data/clubs/players/27_2019.json(1 hunks)tests/data/clubs/players/31_2018.json(1 hunks)tests/data/clubs/players/5_2003.json(1 hunks)tests/data/clubs/profile/131.json(1 hunks)tests/data/clubs/profile/210.json(1 hunks)tests/data/clubs/profile/27.json(1 hunks)tests/data/clubs/profile/31.json(1 hunks)tests/data/clubs/profile/5.json(1 hunks)tests/data/clubs/search/Barcelona.json(1 hunks)tests/data/clubs/search/Bayern.json(1 hunks)tests/data/clubs/search/Grêmio.json(1 hunks)tests/data/clubs/search/Liverpool.json(1 hunks)tests/data/clubs/search/Milan.json(1 hunks)tests/data/competitions/clubs/BRA1.json(1 hunks)tests/data/competitions/clubs/ES1.json(1 hunks)tests/data/competitions/clubs/GB1.json(1 hunks)tests/data/competitions/search/Brasileirão.json(1 hunks)tests/data/competitions/search/La Liga.json(1 hunks)tests/data/competitions/search/Premier League.json(1 hunks)tests/data/players/achievements/28003.json(1 hunks)tests/data/players/achievements/3373.json(1 hunks)tests/data/players/achievements/68290.json(1 hunks)tests/data/players/achievements/8198.json(1 hunks)tests/data/players/injuries/28003.json(1 hunks)tests/data/players/injuries/3373.json(1 hunks)tests/data/players/injuries/68290.json(1 hunks)tests/data/players/injuries/8198.json(1 hunks)tests/data/players/jersey_numbers/28003.json(1 hunks)tests/data/players/jersey_numbers/3373.json(1 hunks)tests/data/players/jersey_numbers/68290.json(1 hunks)tests/data/players/jersey_numbers/8198.json(1 hunks)tests/data/players/market_value/28003.json(1 hunks)tests/data/players/market_value/3373.json(1 hunks)tests/data/players/market_value/68290.json(1 hunks)tests/data/players/market_value/8198.json(1 hunks)tests/data/players/profile/28003.json(1 hunks)tests/data/players/profile/3373.json(1 hunks)tests/data/players/profile/68290.json(1 hunks)tests/data/players/profile/8198.json(1 hunks)tests/data/players/search/Cristiano.json(1 hunks)tests/data/players/search/Messi.json(1 hunks)tests/data/players/search/Neymar.json(1 hunks)tests/data/players/search/Ronaldo.json(1 hunks)tests/data/players/stats/28003.json(1 hunks)tests/data/players/stats/3373.json(1 hunks)tests/data/players/stats/68290.json(1 hunks)tests/data/players/stats/8198.json(1 hunks)tests/data/players/transfers/28003.json(1 hunks)tests/data/players/transfers/3373.json(1 hunks)tests/data/players/transfers/68290.json(1 hunks)tests/data/players/transfers/8198.json(1 hunks)tests/players/test_players_achievements.py(0 hunks)tests/players/test_players_injuries.py(0 hunks)tests/players/test_players_market_value.py(0 hunks)tests/players/test_players_profile.py(0 hunks)tests/players/test_players_search.py(0 hunks)tests/players/test_players_stats.py(0 hunks)tests/players/test_players_transfers.py(0 hunks)tests/services/test_clubs.py(1 hunks)tests/services/test_competitions.py(1 hunks)tests/services/test_players.py(1 hunks)
💤 Files with no reviewable changes (12)
- tests/players/test_players_injuries.py
- tests/players/test_players_search.py
- tests/competitions/test_competitions_clubs.py
- tests/clubs/test_clubs_profile.py
- tests/competitions/test_competitions_search.py
- tests/clubs/test_clubs_search.py
- tests/players/test_players_profile.py
- tests/clubs/test_clubs_players.py
- tests/players/test_players_market_value.py
- tests/players/test_players_transfers.py
- tests/players/test_players_achievements.py
- tests/players/test_players_stats.py
✅ Files skipped from review due to trivial changes (26)
- tests/data/players/jersey_numbers/3373.json
- tests/data/players/jersey_numbers/8198.json
- tests/data/players/jersey_numbers/28003.json
- tests/data/players/profile/8198.json
- tests/data/players/jersey_numbers/68290.json
- tests/data/players/injuries/3373.json
- tests/data/players/search/Neymar.json
- tests/data/players/transfers/3373.json
- tests/data/players/achievements/3373.json
- tests/data/players/profile/68290.json
- tests/data/players/profile/28003.json
- tests/data/players/stats/8198.json
- tests/data/players/market_value/28003.json
- tests/data/players/injuries/68290.json
- tests/data/players/stats/68290.json
- tests/data/players/search/Messi.json
- tests/data/players/stats/28003.json
- tests/data/players/search/Cristiano.json
- tests/data/players/stats/3373.json
- tests/data/players/injuries/28003.json
- tests/data/players/search/Ronaldo.json
- tests/data/players/transfers/68290.json
- tests/data/players/market_value/68290.json
- tests/data/players/market_value/8198.json
- tests/data/players/transfers/28003.json
- tests/data/players/profile/3373.json
🚧 Files skipped from review as they are similar to previous changes (25)
- tests/data/clubs/search/Milan.json
- tests/data/clubs/search/Barcelona.json
- tests/data/clubs/search/Bayern.json
- tests/data/competitions/search/Brasileirão.json
- tests/data/competitions/search/Premier League.json
- tests/data/clubs/profile/5.json
- tests/data/competitions/search/La Liga.json
- tests/data/clubs/search/Grêmio.json
- tests/data/clubs/players/131_None.json
- tests/data/clubs/players/27_2019.json
- tests/data/clubs/players/131_2010.json
- tests/data/clubs/search/Liverpool.json
- tests/data/clubs/players/5_2003.json
- tests/data/clubs/profile/131.json
- tests/data/clubs/profile/27.json
- tests/data/clubs/players/31_2018.json
- tests/data/clubs/profile/31.json
- tests/data/clubs/profile/210.json
- tests/data/clubs/players/210_2017.json
- tests/services/test_clubs.py
- tests/data/competitions/clubs/GB1.json
- pyproject.toml
- tests/data/competitions/clubs/ES1.json
- tests/services/test_competitions.py
- tests/data/competitions/clubs/BRA1.json
🧰 Additional context used
🪛 Ruff (0.8.2)
tests/services/test_players.py
103-103: Undefined name load_test_data
(F821)
🪛 GitHub Actions: Code Check
tests/services/test_players.py
[error] 103-103: Undefined name load_test_data. The function load_test_data is referenced but not defined or imported.
🪛 actionlint (1.7.4)
.github/workflows/check.yml
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)
.github/workflows/tests.yml
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)
14-14: 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)
26-26: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🔇 Additional comments (11)
tests/data/players/market_value/3373.json (1)
1-147: LGTM! Well-structured test data.The JSON structure is well-organized and provides comprehensive market value history data suitable for testing various scenarios.
tests/services/test_players.py (1)
1-156: Well-structured test suite with comprehensive coverage!The test implementation follows best practices:
- Parameterized tests for multiple players
- Consistent test structure across all player services
- Data-driven testing using JSON fixtures
- Strong validation using Pydantic models
🧰 Tools
🪛 Ruff (0.8.2)
103-103: Undefined name
load_test_data(F821)
🪛 GitHub Actions: Code Check
[error] 103-103: Undefined name
load_test_data. The functionload_test_datais referenced but not defined or imported..github/workflows/check.yml (1)
24-25: Pin dependency versions for reproducibility.Installing dependencies without version constraints can lead to inconsistent behavior across different environments and times.
.github/workflows/tests.yml (2)
1-35: Well-structured test workflow!The workflow implementation follows best practices:
- Uses Poetry for dependency management
- Implements caching for dependencies
- Separates test dependencies installation
- Clear and focused test execution step
🧰 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)
14-14: 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)
26-26: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
12-30: 🛠️ Refactor suggestionUpdate 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 - uses: actions/cache@v3 + uses: actions/cache@v4Likely invalid or redundant comment.
🧰 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)
14-14: 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)
26-26: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
tests/conftest.py (1)
1-37: Excellent fixture implementation!The fixtures follow best practices:
- Well-documented purpose
- Clean and focused implementation
- Proper resource cleanup in override_pydantic_eq
- Type hints for better code clarity
tests/data/players/injuries/8198.json (1)
7-14: Review future dates in test data.The injury record contains dates in the future (24/25 season), which might affect test reliability. Consider using historical data or documenting that this is intentional test data.
✅ Verification successful
Future dates are intentional test fixtures
The presence of "24/25" season data is consistent across multiple test files (stats, injuries, jersey numbers, achievements) and players, following the same structure as historical data. This systematic pattern indicates these are intentionally designed test fixtures to verify the system's handling of future seasons.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for other test files containing future dates # Expected: No other occurrences of future dates in test data rg -l "24/25" tests/data/Length of output: 388
Script:
#!/bin/bash # Check the structure of files containing future dates for file in $(rg -l "24/25" tests/data/); do echo "=== $file ===" head -n 20 "$file" echo -e "\n" doneLength of output: 5513
tests/data/players/transfers/8198.json (1)
3-196: Verify chronological order of transfers.The transfers appear to be in reverse chronological order. Let's verify this is consistent across all test data files.
✅ Verification successful
Chronological ordering verified
All transfer records across the test data files are correctly maintained in reverse chronological order (newest to oldest).
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify chronological ordering in transfer data files # Expected: All transfer records should be in reverse chronological order # Find all transfer data files fd -t f . tests/data/players/transfers/ -x sh -c ' echo "Checking {}" jq -r ".transfers[] | .date" {} | while read -r date; do date -d "$date" +%s done | awk "{ if (NR>1 && prev<\$1) { print \"Order mismatch at line \" NR exit 1 } prev=\$1 }" 'Length of output: 476
tests/data/players/achievements/68290.json (1)
3-508: Verify achievement counts match details.Let's verify that the
countfield matches the length of thedetailsarray for each achievement.✅ Verification successful
Achievement counts verified successfully
All achievement counts correctly match their corresponding details array lengths in the file.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify achievement counts match details array length # Expected: All count fields should match the number of details fd -t f . tests/data/players/achievements/ -x sh -c ' echo "Checking {}" jq -r ".achievements[] | select(.count != (.details | length)) | \"\(.title): count=\(.count) details=\(.details | length)\"" {} 'Length of output: 415
tests/data/players/achievements/8198.json (1)
239-249: Review duplicate season entries.The "Footballer of the Year" achievement contains duplicate entries for the 2007 season. Verify if this is intentional or needs deduplication.
✅ Verification successful
Duplicate seasons appear to be valid data entries
The duplicate season entries are consistent across multiple player achievement files and appear to be intentional, representing multiple instances of the same award won in a single season. This pattern is observed across different players and achievement types, suggesting it's a valid data design choice.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for duplicate seasons within achievement details # Expected: No unintentional duplicate seasons fd -t f . tests/data/players/achievements/ -x sh -c ' echo "Checking {}" jq -r ".achievements[] | select(.details | map(.season.name) | group_by(.) | map(select(length > 1)) | length > 0) | \"\(.title): \(.details | map(.season.name) | group_by(.) | map(select(length > 1)))\"" {} 'Length of output: 911
tests/data/players/achievements/28003.json (1)
211-219: Review future dates in test data.The achievement record contains dates in the future (23/24 season). This is consistent with the injury data but might affect test reliability. Consider documenting that this is intentional test data.
✅ Verification successful
Future dates are part of the test data design
The presence of future dates (23/24 season) in the test data is intentional and consistent across multiple test files. This data is used for model validation testing and follows a systematic pattern across different entity types (achievements, injuries, transfers, etc.). No documentation is required as this is standard test fixture data used consistently throughout the test suite.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Check for test files containing future dates # Expected: Document all occurrences of future dates rg -l "23/24|24/25" tests/data/Length of output: 598
Script:
#!/bin/bash # Check for documentation about test data rg -i "test.*(data|fixture)" README.md || echo "No matches in README.md" fd README tests/ cat tests/README.md 2>/dev/null || echo "No tests/README.md found" rg -i "test.*(data|fixture)" tests/ -g "!*.json"Length of output: 3269
| "clubId": "515" | ||
| } | ||
| ], | ||
| "ranking": {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Add ranking data following the established structure
The empty ranking object deviates from the established pattern. Other test files consistently include:
- Worldwide ranking
- League ranking
- Club ranking
- Country ranking
- Position ranking
- Birth year ranking
🔗 Analysis chain
Consider adding ranking test data.
The empty ranking object might not provide sufficient test coverage. Consider adding sample ranking data to test ranking-related functionality.
Let me check if ranking data is used in the tests:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for ranking-related test cases
rg -l "ranking" tests/
Length of output: 192
Script:
#!/bin/bash
# Examine ranking data structure in other test files
for file in tests/data/players/market_value/{68290,8198,28003}.json; do
echo "=== $file ==="
jq '.ranking' "$file"
done
Length of output: 1102
| def test_players_profile(player_id: str): | ||
| tfmkt = TransfermarktPlayerProfile(player_id=player_id) | ||
| response = PlayerProfile.model_validate(tfmkt.get_player_profile()) | ||
| expected = PlayerProfile.model_validate(load_test_data(f"players/profile/{player_id}")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add missing load_test_data parameter to function signature.
The test_players_profile function uses load_test_data but it's not declared in the function parameters.
Apply this diff to fix the function signature:
-def test_players_profile(player_id: str):
+def test_players_profile(player_id: str, load_test_data: callable):📝 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.
| def test_players_profile(player_id: str): | |
| tfmkt = TransfermarktPlayerProfile(player_id=player_id) | |
| response = PlayerProfile.model_validate(tfmkt.get_player_profile()) | |
| expected = PlayerProfile.model_validate(load_test_data(f"players/profile/{player_id}")) | |
| def test_players_profile(player_id: str, load_test_data: callable): | |
| tfmkt = TransfermarktPlayerProfile(player_id=player_id) | |
| response = PlayerProfile.model_validate(tfmkt.get_player_profile()) | |
| expected = PlayerProfile.model_validate(load_test_data(f"players/profile/{player_id}")) |
🧰 Tools
🪛 Ruff (0.8.2)
103-103: Undefined name load_test_data
(F821)
🪛 GitHub Actions: Code Check
[error] 103-103: Undefined name load_test_data. The function load_test_data is referenced but not defined or imported.
| - 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' |
There was a problem hiding this comment.
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.
| - 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)
Summary by CodeRabbit
Based on the comprehensive summary, here are the updated release notes:
Testing
Workflow
Dependencies
pydanticto version 2.10.5.python-dateutildependency.schemadependency.Infrastructure