Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: updated dependencies to last version #183

Merged
merged 1 commit into from
Aug 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ COPY pyproject.toml uv.lock /code/

# Sync the project into a new environment (no dev dependencies)
WORKDIR /code
RUN uv sync --frozen --no-cache --no-dev

# Copy code and static folders
COPY ./app /code/app
COPY ./static /code/static

# Install the project
RUN uv sync --frozen --no-cache --no-dev

# Copy crontabs file and make it executable
COPY ./build/overfast-crontab /etc/crontabs/root
RUN chmod +x /etc/crontabs/root
Expand Down
36 changes: 18 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "overfast-api"
version = "2.34.0"
version = "2.34.1"
description = "Overwatch API giving data about heroes, maps, and players statistics."
license = {file = "LICENSE"}
authors = [
Expand All @@ -9,14 +9,14 @@ authors = [
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"beautifulsoup4 >=4.12.3,<4.13",
"fastapi[standard] >=0.112.1,<0.113",
"httpx[http2] >=0.27.0,<0.28",
"loguru >=0.7.2,<0.8",
"lxml >=5.3.0,<5.4",
"redis >=5.0.8,<5.1",
"pydantic >=2.8.2,<2.9",
"pydantic-settings >=2.4.0,<2.5"
"beautifulsoup4==4.12.*",
"fastapi[standard]==0.112.*",
"httpx[http2]==0.27.*",
"loguru==0.7.*",
"lxml==5.3.*",
"redis==5.0.*",
"pydantic==2.8.*",
"pydantic-settings==2.4.*",
]

[project.urls]
Expand All @@ -31,15 +31,15 @@ packages = ["app"]
[tool.uv]
compile-bytecode = true
dev-dependencies = [
"fakeredis >=2.23.5,<2.24",
"ipdb >=0.13.13,<0.14",
"pytest >=8.3.2,<8.4",
"pytest-asyncio >=0.23.8,<0.24",
"pytest-cov >=5.0.0,<5.1",
"pytest-randomly >=3.15.0,<3.16",
"pytest-xdist >=3.6.1,<3.7",
"ruff >=0.5.7,<0.6",
"pre-commit >=3.8.0,<3.9"
"fakeredis==2.24.*",
"ipdb==0.13.*",
"pytest==8.3.*",
"pytest-asyncio==0.24.*",
"pytest-cov==5.0.*",
"pytest-randomly==3.15.*",
"pytest-xdist==3.6.*",
"ruff==0.6.*",
"pre-commit==3.8.*",
]

[tool.ruff]
Expand Down
4 changes: 2 additions & 2 deletions tests/commands/test_check_and_delete_parser_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
from app.config import settings


@pytest.fixture()
@pytest.fixture
def cache_manager():
return CacheManager()


@pytest.fixture()
@pytest.fixture
def locale():
return Locale.ENGLISH_US

Expand Down
4 changes: 2 additions & 2 deletions tests/commands/test_check_and_update_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
from app.config import settings


@pytest.fixture()
@pytest.fixture
def cache_manager():
return CacheManager()


@pytest.fixture()
@pytest.fixture
def locale():
return Locale.ENGLISH_US

Expand Down
2 changes: 1 addition & 1 deletion tests/commands/test_update_search_data_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from app.common.enums import SearchDataType


@pytest.fixture()
@pytest.fixture
def cache_manager():
return CacheManager()

Expand Down
4 changes: 2 additions & 2 deletions tests/common/test_cache_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
from app.config import settings


@pytest.fixture()
@pytest.fixture
def cache_manager():
return CacheManager()


@pytest.fixture()
@pytest.fixture
def locale():
return Locale.ENGLISH_US

Expand Down
2 changes: 1 addition & 1 deletion tests/parsers/test_gamemodes_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from app.parsers.gamemodes_parser import GamemodesParser


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_gamemodes_page_parsing(home_html_data: str):
parser = GamemodesParser()

Expand Down
4 changes: 2 additions & 2 deletions tests/parsers/test_hero_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[(h.value, h.value) for h in HeroKey],
indirect=["hero_html_data"],
)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_hero_page_parsing(hero_key: str, hero_html_data: str):
if not hero_html_data:
pytest.skip("Hero HTML file not saved yet, skipping")
Expand All @@ -32,7 +32,7 @@ async def test_hero_page_parsing(hero_key: str, hero_html_data: str):


@pytest.mark.parametrize("hero_html_data", ["unknown-hero"], indirect=True)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_not_released_hero_parser_blizzard_error(hero_html_data: str):
parser = HeroParser()

Expand Down
2 changes: 1 addition & 1 deletion tests/parsers/test_heroes_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from app.parsers.heroes_parser import HeroesParser


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_heroes_page_parsing(heroes_html_data: str):
parser = HeroesParser()

Expand Down
2 changes: 1 addition & 1 deletion tests/parsers/test_maps_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from app.parsers.maps_parser import MapsParser


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_maps_page_parsing():
parser = MapsParser()

Expand Down
14 changes: 7 additions & 7 deletions tests/parsers/test_namecard_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from app.parsers.search_data_parser import NamecardParser


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_namecard_parser_no_cache(
search_players_blizzard_json_data: dict,
search_html_data: str,
Expand Down Expand Up @@ -48,7 +48,7 @@ async def test_namecard_parser_no_cache(
update_parser_cache_last_update_mock.assert_called_once()


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_namecard_parser_blizzard_error():
parser = NamecardParser(player_id="Dekk-2677")

Expand All @@ -72,7 +72,7 @@ async def test_namecard_parser_blizzard_error():
)


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_namecard_parser_error_key_error(search_tekrop_blizzard_json_data: dict):
# Search data without battletag
search_data = [search_tekrop_blizzard_json_data[0].copy()]
Expand All @@ -97,7 +97,7 @@ async def test_namecard_parser_error_key_error(search_tekrop_blizzard_json_data:
assert error.value.message == "KeyError('battleTag')"


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_namecard_parser_player_not_found():
parser = NamecardParser(player_id="Unknown-1234")

Expand All @@ -121,7 +121,7 @@ async def test_namecard_parser_player_not_found():
assert parser.data == {"namecard": None}


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_namecard_parser_player_without_namecard():
search_data = [
{
Expand Down Expand Up @@ -158,7 +158,7 @@ async def test_namecard_parser_player_without_namecard():
assert parser.data == {"namecard": None}


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_namecard_parser_no_cache_no_namecard(
search_players_blizzard_json_data: dict,
):
Expand Down Expand Up @@ -200,7 +200,7 @@ async def test_namecard_parser_no_cache_no_namecard(
assert parser.data == {"namecard": None}


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_namecard_parser_with_cache(
search_players_blizzard_json_data: dict,
search_data_json_data: dict,
Expand Down
4 changes: 2 additions & 2 deletions tests/parsers/test_player_career_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
indirect=["player_html_data", "player_career_json_data"],
)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_player_page_parsing_with_filters(
player_id: str,
player_html_data: str,
Expand Down Expand Up @@ -47,7 +47,7 @@ async def test_player_page_parsing_with_filters(


@pytest.mark.parametrize("player_html_data", ["Unknown-1234"], indirect=True)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_unknown_player_parser_blizzard_error(player_html_data: str):
parser = PlayerCareerParser(player_id="Unknown-1234")
with (
Expand Down
10 changes: 5 additions & 5 deletions tests/parsers/test_player_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
],
indirect=["player_html_data", "player_json_data"],
)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_player_page_parsing_with_filters(
player_id: str,
player_html_data: str,
Expand Down Expand Up @@ -54,7 +54,7 @@ async def test_player_page_parsing_with_filters(


@pytest.mark.parametrize("player_html_data", ["Unknown-1234"], indirect=True)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_unknown_player_parser_blizzard_error(player_html_data: str):
parser = PlayerParser(player_id="Unknown-1234")
with (
Expand All @@ -69,7 +69,7 @@ async def test_unknown_player_parser_blizzard_error(player_html_data: str):


@pytest.mark.parametrize("player_html_data", ["TeKrop-2217"], indirect=True)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_player_parser_parsing_error_attribute_error(player_html_data: str):
player_attr_error = player_html_data.replace(
'class="Profile-player--summaryWrapper"',
Expand All @@ -94,7 +94,7 @@ async def test_player_parser_parsing_error_attribute_error(player_html_data: str


@pytest.mark.parametrize("player_html_data", ["TeKrop-2217"], indirect=True)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_player_parser_parsing_error_key_error(player_html_data: str):
player_key_error = re.sub(
'class="Profile-playerSummary--endorsement" src="[^"]*"',
Expand All @@ -117,7 +117,7 @@ async def test_player_parser_parsing_error_key_error(player_html_data: str):


@pytest.mark.parametrize("player_html_data", ["TeKrop-2217"], indirect=True)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_player_parser_parsing_error_type_error(player_html_data: str):
player_type_error = player_html_data.replace(
'class="Profile-playerSummary--endorsement"',
Expand Down
4 changes: 2 additions & 2 deletions tests/parsers/test_player_stats_summary_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
indirect=["player_html_data", "player_stats_json_data"],
)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_player_page_parsing(
player_id: str,
player_html_data: str,
Expand Down Expand Up @@ -44,7 +44,7 @@ async def test_player_page_parsing(


@pytest.mark.parametrize("player_html_data", ["Unknown-1234"], indirect=True)
@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_unknown_player_parser_blizzard_error(player_html_data: str):
parser = PlayerStatsSummaryParser(player_id="Unknown-1234")
with (
Expand Down
2 changes: 1 addition & 1 deletion tests/parsers/test_roles_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from app.parsers.roles_parser import RolesParser


@pytest.mark.asyncio()
@pytest.mark.asyncio
async def test_roles_page_parsing(home_html_data: str):
parser = RolesParser()

Expand Down
Loading