diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d626f6..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 @@ -50,6 +30,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 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 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 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/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 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"