Refactor: Oddělení business logiky + inline editor
Some checks failed
Build & Push Docker / build (push) Has been cancelled
Some checks failed
Build & Push Docker / build (push) Has been cancelled
- Nový modul scenar/core.py (491 řádků čisté logiky)
- Refactored cgi-bin/scenar.py (450 řádků CGI wrapper)
- Inline editor s JavaScript row managementem
- Custom exceptions (ScenarsError, ValidationError, TemplateError)
- Kompletní test coverage (10 testů, všechny ✅)
- Fixed Dockerfile (COPY scenar/, requirements.txt)
- Fixed requirements.txt (openpyxl==3.1.5)
- Fixed pytest.ini (pythonpath = .)
- Nové testy: test_http_inline.py, test_inline_builder.py
- HTTP testy označeny jako @pytest.mark.integration
- Build script: scripts/build_image.sh
- Dokumentace: COMPLETION.md
This commit is contained in:
@@ -16,9 +16,11 @@ RUN a2enmod cgid && a2disconf serve-cgi-bin || true
|
||||
RUN mkdir -p /var/www/htdocs
|
||||
WORKDIR /var/www/htdocs
|
||||
|
||||
# Copy app
|
||||
# Copy app (including scenar package for imports)
|
||||
COPY cgi-bin ./cgi-bin
|
||||
COPY templates ./templates
|
||||
COPY scenar ./scenar
|
||||
COPY requirements.txt ./requirements.txt
|
||||
|
||||
# Ensure CGI scripts are executable
|
||||
RUN find /var/www/htdocs/cgi-bin -type f -name "*.py" -exec chmod 0755 {} \;
|
||||
@@ -29,8 +31,8 @@ RUN mkdir -p /var/www/htdocs/tmp \
|
||||
&& chown -R www-data:www-data /var/www/htdocs/tmp /var/www/htdocs/scripts \
|
||||
&& chmod 0775 /var/www/htdocs/tmp /var/www/htdocs/scripts/tmp
|
||||
|
||||
# --- Python dependencies (add more as needed) ---
|
||||
RUN pip install --no-cache-dir pandas openpyxl
|
||||
# --- Python dependencies (from requirements.txt) ---
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Listen on 8080
|
||||
RUN sed -ri 's/Listen 80/Listen 8080/g' /etc/apache2/ports.conf
|
||||
|
||||
Reference in New Issue
Block a user