Compare commits
4
Commits
4e94468315
..
docker
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d25e5aac60 | ||
|
|
c88695f1e7 | ||
|
|
8413a89a47 | ||
|
|
6bb11a206b |
No files matched your search
+21
@@ -0,0 +1,21 @@
|
|||||||
|
FROM python:3.13-alpine
|
||||||
|
|
||||||
|
# Install uv
|
||||||
|
RUN pip install uv
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy project files
|
||||||
|
COPY pyproject.toml ./
|
||||||
|
COPY README.md ./
|
||||||
|
|
||||||
|
# Install dependencies using uv without venv
|
||||||
|
RUN uv pip compile pyproject.toml -o requirements.txt && \
|
||||||
|
uv pip install --system -r requirements.txt
|
||||||
|
|
||||||
|
# Copy the rest of the application
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Default command
|
||||||
|
CMD ["python", "tests/test.py"]
|
||||||
+1
-1
@@ -48,7 +48,7 @@ def get_set(set_number: int) -> dict:
|
|||||||
}
|
}
|
||||||
# add PW 10% b4 tax
|
# add PW 10% b4 tax
|
||||||
our_set.update(
|
our_set.update(
|
||||||
{"set_adjustredprice": our_set + ((10 / 100) * our_set["set_retailprice"])}
|
{"set_adjustredprice": our_set["set_retailprice"] + ((10 / 100) * our_set["set_retailprice"])}
|
||||||
)
|
)
|
||||||
our_set["pw_name"] = (
|
our_set["pw_name"] = (
|
||||||
f"{our_set['set_num']} - {our_set["set_theme"].upper()} {our_set['set_name']}"
|
f"{our_set['set_num']} - {our_set["set_theme"].upper()} {our_set['set_name']}"
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
import get_sq_env
|
from . import get_sq_env
|
||||||
|
|
||||||
SQUARE_TOKEN = get_sq_env.SQUARE_TOKEN
|
SQUARE_TOKEN = get_sq_env.SQUARE_TOKEN
|
||||||
LEGO_CAT_ID = get_sq_env.LEGO_CAT_ID
|
LEGO_CAT_ID = get_sq_env.LEGO_CAT_ID
|
||||||
|
|||||||
+26
-1
@@ -1,6 +1,31 @@
|
|||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
from pprint import pprint
|
||||||
|
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||||
|
|
||||||
|
import socket
|
||||||
|
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
|
||||||
import src.libsquare as sq
|
import src.libsquare as sq
|
||||||
import src.bricksetapi as lego
|
import src.bricksetapi as lego
|
||||||
|
|
||||||
|
print("=" * 80)
|
||||||
|
result = sock.connect_ex(('127.0.0.1', 7432))
|
||||||
|
if result == 0:
|
||||||
|
print("PORT 7432 IS IN USE")
|
||||||
|
else:
|
||||||
|
print("PORT 7432 IS AVAILABLE")
|
||||||
|
sock.close()
|
||||||
|
|
||||||
|
print("=" * 80)
|
||||||
|
print("SQUARE OBJECT FOR SET 71417:")
|
||||||
|
print("=" * 80)
|
||||||
oursq = sq.get_itm("71417")
|
oursq = sq.get_itm("71417")
|
||||||
|
pprint(oursq, width=120, depth=None)
|
||||||
|
|
||||||
|
print("\n" + "=" * 80)
|
||||||
|
print("LEGO SET INFORMATION FOR SET 71417:")
|
||||||
|
print("=" * 80)
|
||||||
ourlego = lego.get_set(71417)
|
ourlego = lego.get_set(71417)
|
||||||
print(f"{oursq}\n\n{ourlego}\n\n")
|
print("=" * 80)
|
||||||
|
pprint(ourlego, width=120, depth=None)
|
||||||
Reference in new issue
Block a user