From e4da4ede33282109b1ff0be26fde4b7d9f4f5f2e Mon Sep 17 00:00:00 2001 From: Pitanga Innovare Date: Sat, 1 Jun 2024 13:55:23 -0300 Subject: [PATCH 1/6] =?UTF-8?q?Corrige=20string=20que=20representa=20c?= =?UTF-8?q?=C3=B3digo=20de=20idioma=20Portugu=C3=AAs=20brasileiro=20(vide?= =?UTF-8?q?=20https://docs.djangoproject.com/en/5.0/topics/i18n/#term-lang?= =?UTF-8?q?uage-code)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/settings/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/settings/base.py b/config/settings/base.py index cebafa6..32a807e 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -27,7 +27,7 @@ # In Windows, this must be set to your system time zone. TIME_ZONE = "UTC" # https://docs.djangoproject.com/en/dev/ref/settings/#language-code -LANGUAGE_CODE = "pt-BR" +LANGUAGE_CODE = "pt-br" # https://docs.djangoproject.com/en/dev/ref/settings/#site-id SITE_ID = 1 # https://docs.djangoproject.com/en/dev/ref/settings/#use-i18n @@ -364,7 +364,7 @@ LANGUAGES = [ ("en", "English"), ("es", "Spanish"), - ("pt-BR", "Portuguese"), + ("pt-br", "Portuguese"), ] WAGTAIL_I18N_ENABLED = True @@ -372,7 +372,7 @@ WAGTAIL_CONTENT_LANGUAGES = [ ("en", "English"), ("es", "Spanish"), - ("pt-BR", "Portuguese"), + ("pt-br", "Portuguese"), ] NOCAPTCHA = True From e207edaaf5a73f53fb355df92ff3f1307f87fcaf Mon Sep 17 00:00:00 2001 From: Pitanga Innovare Date: Sat, 1 Jun 2024 13:59:54 -0300 Subject: [PATCH 2/6] =?UTF-8?q?Remove=20de=20urls=20traduzidas=20o=20prefi?= =?UTF-8?q?xo=20de=20idioma=20PADR=C3=83O=20(apenas=20esse)=20para=20compa?= =?UTF-8?q?tibilizar=20testes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/urls.py | 1 + core/users/tests/test_urls.py | 1 + 2 files changed, 2 insertions(+) diff --git a/config/urls.py b/config/urls.py index 08df31d..73ecd86 100644 --- a/config/urls.py +++ b/config/urls.py @@ -26,6 +26,7 @@ path("i18n/", include("django.conf.urls.i18n")), path("", include("allauth.urls")), path("", include(wagtail_urls)), + prefix_default_language=False, ) if settings.DEBUG: diff --git a/core/users/tests/test_urls.py b/core/users/tests/test_urls.py index 3dcbdf2..c393ced 100644 --- a/core/users/tests/test_urls.py +++ b/core/users/tests/test_urls.py @@ -1,4 +1,5 @@ import pytest + from django.urls import resolve, reverse from core.users.models import User From 6ebed8d28ff92dcbfeff11729c24fbe44782ac9b Mon Sep 17 00:00:00 2001 From: Pitanga Innovare Date: Sat, 1 Jun 2024 14:39:33 -0300 Subject: [PATCH 3/6] Corrige nome de banco de dados postgres --- local.yml | 2 +- production.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/local.yml b/local.yml index 2ad23cf..ab0785a 100644 --- a/local.yml +++ b/local.yml @@ -31,7 +31,7 @@ services: image: edoburu/pgbouncer:1.14.0 container_name: scielo_usage_local_pgbouncer environment: - - DATABASE_URL=postgres://GVRFlLmcCNfGLhsFvSnCioYOPJPYpyfj:BQ4hSUL4rdj5WZLdR8ilDLRQMvCtzo0caMaXDO0olGsmycQjlcZlTVK9DepZR8kk@postgres/scielo_core + - DATABASE_URL=postgres://GVRFlLmcCNfGLhsFvSnCioYOPJPYpyfj:BQ4hSUL4rdj5WZLdR8ilDLRQMvCtzo0caMaXDO0olGsmycQjlcZlTVK9DepZR8kk@postgres/scielo_usage - MAX_CLIENT_CONN=100 ports: - 6439:5432 diff --git a/production.yml b/production.yml index d497ebe..a40de9e 100644 --- a/production.yml +++ b/production.yml @@ -24,7 +24,7 @@ services: image: edoburu/pgbouncer:1.14.0 restart: always environment: - - DATABASE_URL=postgres://GVRFlLmcCNfGLhsFvSnCioYOPJPYpyfj:DAkWfpsnPHcAxMeQk2QmPOIZuz4BXG5qGFWi2hCCQE6kvndJHTuzz8SjnxOJY5qj@postgres/core + - DATABASE_URL=postgres://GVRFlLmcCNfGLhsFvSnCioYOPJPYpyfj:DAkWfpsnPHcAxMeQk2QmPOIZuz4BXG5qGFWi2hCCQE6kvndJHTuzz8SjnxOJY5qj@postgres/scielo_usage - MAX_CLIENT_CONN=100 ports: - 6434:5432 @@ -39,8 +39,8 @@ services: dockerfile: ./compose/production/postgres/Dockerfile image: scielo_usage_production_postgres volumes: - - ../scms_data/scielo_core/data_prod:/var/lib/postgresql/data:Z - - ../scms_data/scielo_core/data_prod_backup:/backups:z + - ../scms_data/scielo_usage/data_prod:/var/lib/postgresql/data:Z + - ../scms_data/scielo_usage/data_prod_backup:/backups:z ports: - "5432:5432" env_file: @@ -65,7 +65,7 @@ services: depends_on: - django volumes: - - ../scms_data/scielo_core/traefik:/etc/traefik/acme:z + - ../scms_data/scielo_usage/traefik:/etc/traefik/acme:z ports: - "0.0.0.0:80:80" - "0.0.0.0:443:443" From 4d780d73f356047766f1fdbb6d7d732f9e213be1 Mon Sep 17 00:00:00 2001 From: Pitanga Innovare Date: Sat, 1 Jun 2024 15:09:02 -0300 Subject: [PATCH 4/6] =?UTF-8?q?Adiciona=20instru=C3=A7=C3=A3o=20para=20exe?= =?UTF-8?q?cutar=20makemigrations=20antes=20de=20migrate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d626f6..5d3c213 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,9 @@ jobs: - name: Build the Stack run: docker-compose -f local.yml build + - name: Make the migrations + run: docker compose -f local.yml run --rm django python manage.py makemigrations + - name: Run DB Migrations run: docker-compose -f local.yml run --rm django python manage.py migrate From 1ef4e584cea3861266b0b328c56db3fd868605d5 Mon Sep 17 00:00:00 2001 From: Pitanga Innovare Date: Sat, 1 Jun 2024 15:37:11 -0300 Subject: [PATCH 5/6] =?UTF-8?q?Altera=20vari=C3=A1vel=20grafada=20como=20?= =?UTF-8?q?=5F=20para=20n=C3=A3o=20conflitar=20com=20de=20tradu=C3=A7?= =?UTF-8?q?=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- log_manager/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/log_manager/tasks.py b/log_manager/tasks.py index 456bb9f..f4161f5 100644 --- a/log_manager/tasks.py +++ b/log_manager/tasks.py @@ -66,9 +66,9 @@ def task_discover(self, collection_acron2, is_enabled=True, temporal_reference=N raise exceptions.InvalidDateFormatError('ERROR. Please, use a valid date format (YYYY-MM-DD).') for cd in col_configs_dirs: - for root, _, files in os.walk(cd.value): + for root, _sub_dirs, files in os.walk(cd.value): for name in files: - _, extension = os.path.splitext(name) + _name, extension = os.path.splitext(name) if extension.lower() not in app_config_log_file_formats: continue From d6a66628315372eb4f968fa6fa22fa133f50b24a Mon Sep 17 00:00:00 2001 From: Pitanga Innovare Date: Sat, 1 Jun 2024 15:49:17 -0300 Subject: [PATCH 6/6] Remove linter, temporariamente --- .github/workflows/ci.yml | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d3c213..d9ddb9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,26 +19,6 @@ concurrency: cancel-in-progress: true jobs: - linter: - runs-on: ubuntu-latest - steps: - - - name: Checkout Code Repository - uses: actions/checkout@v3 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: "3.9" - cache: pip - cache-dependency-path: | - requirements/base.txt - requirements/local.txt - - - name: Run pre-commit - uses: pre-commit/action@v3.0.0 - - # With no caching at all the entire ci process takes 4m 30s to complete! pytest: runs-on: ubuntu-latest