Skip to content

Commit 038dc97

Browse files
AdrianordpCopilot
andcommitted
Refactor code structure for improved readability and maintainability
Co-authored-by: Copilot <copilot@github.com>
1 parent 2c24d5c commit 038dc97

9 files changed

Lines changed: 579 additions & 519 deletions

File tree

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ WORKDIR /app
99

1010
RUN apt-get update \
1111
&& apt-get install -y --no-install-recommends \
12-
build-essential \
12+
build-essential \
1313
&& rm -rf /var/lib/apt/lists/*
1414

1515
RUN pip install poetry
@@ -32,15 +32,15 @@ EXPOSE 8050
3232
CMD [ \
3333
"poetry", "run", \
3434
"python", "-m", "api.main" \
35-
]
35+
]
3636

3737
# ── dashboard ──────────────────────────────────────────────────────────────────
3838
FROM base AS dashboard
3939

4040
RUN poetry install --only main,dashboard --no-root
4141

4242
ENV API_HOST=localhost \
43-
API_PORT=8000
43+
API_PORT=8050
4444

4545
EXPOSE 8501
4646

@@ -49,4 +49,4 @@ CMD [ \
4949
"streamlit", "run", "src/dashboard/dashboard.py", \
5050
"--server.address=0.0.0.0", \
5151
"--server.port=8501" \
52-
]
52+
]

main.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
def main():
2+
print("Hello from pokemon-unite-meta-analysis!")
3+
4+
5+
if __name__ == "__main__":
6+
main()

pyproject.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ dev = [
3333
api = [
3434
"fastapi (>=0.116.1,<0.117.0)",
3535
"uvicorn (>=0.41.0,<0.42.0)",
36-
"pydantic-settings (>=2.11.0,<3.0.0)"
37-
,
36+
"pydantic-settings (>=2.11.0,<3.0.0)",
37+
"pydantic>=2.12.5",
38+
"httpx>=0.28.1",
3839
]
3940
dashboard = [
4041
"streamlit (>=1.50.0,<2.0.0)",
@@ -58,7 +59,7 @@ run = "python -m src.pokemon_unite_meta_analysis"
5859
coverage = "pytest --cov=src --cov-report=xml --cov-report=html --cov-fail-under=90"
5960
cli = "python -m cli"
6061
api = "uvicorn api.main:app --reload"
61-
dashboard = "streamlit run src/dashboard/dashboard.py"
62+
dashboard = "uv run --group dashboard streamlit run src/dashboard/dashboard.py"
6263

6364
[tool.coverage.run]
6465
omit = [

pyproject_.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[project]
2+
name = "pokemon-unite-meta-analysis"
3+
version = "0.1.0"
4+
description = "Add your description here"
5+
readme = "README.md"
6+
requires-python = ">=3.13"
7+
dependencies = []

src/api/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class APISettings(BaseSettings):
66
api_name: str = "Pokemon Unite Meta Analysis API"
77
debug: bool = True
88
host: str = "127.0.0.1"
9-
port: int = 8000
9+
port: int = 8050
1010

1111
model_config = ConfigDict(env_file=".env", env_prefix="API_")
1212

src/dashboard/dashboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# API Base URL
1212
API_HOST = os.getenv("API_HOST", "localhost")
13-
API_PORT = os.getenv("API_PORT", "8000")
13+
API_PORT = os.getenv("API_PORT", "8050")
1414

1515
API_BASE = f"http://{API_HOST}:{API_PORT}"
1616

src/pokemon_unite_meta_analysis/__init__.py

Whitespace-only changes.

uv.lock

Lines changed: 555 additions & 510 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)