diff --git a/.circleci/config.yml b/.circleci/config.yml index bb9f05f3..0d6c702c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -134,6 +134,7 @@ jobs: - image: tyvik/geopuzzle:backend-tester environment: DJANGO_SETTINGS_MODULE: "mercator.settings.circleci" + SECRET_KEY: "mY_sup#r_sec3t+KEY" working_directory: ~/repo resource_class: small steps: @@ -143,7 +144,7 @@ jobs: command: mkdir ~/repo/logs - run: name: Run pylint - command: pylint common maps mercator puzzle quiz users workshop + command: PYTHONPATH="$PYTHONPATH:." pylint common maps mercator puzzle quiz users workshop messages: docker: diff --git a/.pylintrc b/.pylintrc index e2aec5c2..e140b48f 100644 --- a/.pylintrc +++ b/.pylintrc @@ -65,7 +65,6 @@ disable=missing-function-docstring, missing-class-docstring, missing-module-docstring, too-few-public-methods, - no-self-use, no-member, unsubscriptable-object, unused-wildcard-import, @@ -183,8 +182,8 @@ max-module-lines=1000 # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. # `trailing-comma` allows a space between comma and closing bracket: (a, ). # `empty-line` allows space-only lines. -no-space-check=trailing-comma, - dict-separator +#no-space-check=trailing-comma, +# dict-separator # Allow the body of a class to be on the same line as the declaration if body # contains single statement. diff --git a/Dockerfile.backend b/Dockerfile.backend index dce11962..301ef69e 100644 --- a/Dockerfile.backend +++ b/Dockerfile.backend @@ -4,15 +4,16 @@ RUN mkdir /app && mkdir /app/logs WORKDIR /app RUN apt update \ - && apt install -y --no-install-recommends build-essential make gcc gdal-bin wget git \ + && apt install -y --no-install-recommends build-essential make gcc gdal-bin curl wget git \ && wget -q https://github.com/jwilder/dockerize/releases/download/v0.6.1/dockerize-linux-amd64-v0.6.1.tar.gz && tar -C /usr/local/bin -xzvf dockerize-linux-amd64-v0.6.1.tar.gz && rm dockerize-linux-amd64-v0.6.1.tar.gz \ && apt-get autoremove -y \ && apt-get clean -RUN wget -q https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py && POETRY_HOME=/opt/poetry python get-poetry.py \ +ENV POETRY_HOME="/opt/poetry" +RUN curl -sSL https://install.python-poetry.org | python3 - \ && find / -name "*.pyc" -exec rm -f {} \; -ENV PATH="${PATH}:/opt/poetry/bin" +ENV PATH="${PATH}:${POETRY_HOME}/bin" ADD poetry.lock pyproject.toml /app/ RUN poetry config virtualenvs.create false \ && poetry install --no-dev --no-interaction --no-ansi \ diff --git a/frontend/__tests__/__snapshots__/Congratulation.test.js.snap b/frontend/__tests__/__snapshots__/Congratulation.test.js.snap index c6789d70..1584092d 100644 --- a/frontend/__tests__/__snapshots__/Congratulation.test.js.snap +++ b/frontend/__tests__/__snapshots__/Congratulation.test.js.snap @@ -2,29 +2,31 @@ exports[`shallow components render 1`] = ` components render 1`] = ` "formatRelativeTime": [Function], "formatTime": [Function], "formatTimeToParts": [Function], - "formats": Object {}, - "formatters": Object { + "formats": {}, + "formatters": { "getDateTimeFormat": [Function], "getDisplayNames": [Function], "getListFormat": [Function], @@ -52,8 +54,9 @@ exports[`shallow components render 1`] = ` "getRelativeTimeFormat": [Function], }, "locale": "en", - "messages": Object {}, + "messages": {}, "onError": [Function], + "onWarn": [Function], "textComponent": Symbol(react.fragment), "timeZone": undefined, "wrapRichTextChunksInFragment": undefined, @@ -61,11 +64,11 @@ exports[`shallow components render 1`] = ` } name="Belarus" options={ - Object { + { "score": 60, } } - parts={Array []} + parts={[]} text="congratulations.puzzle" > components render 1`] = ` autoFocus={true} backdrop={true} dialogAs={ - Object { + { "$$typeof": Symbol(react.forward_ref), "displayName": "ModalDialog", "render": [Function], @@ -96,8 +99,8 @@ exports[`shallow components render 1`] = ` BootstrapModalManager { "handleContainerOverflow": true, "isRTL": false, - "modals": Array [ - Object { + "modals": [ + { "add": [Function], "backdrop":