Skip to content

Commit

Permalink
Merge branch 'release/24.10' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
delcroip committed Nov 1, 2024
2 parents d4020da + d2326c8 commit a36e310
Show file tree
Hide file tree
Showing 27 changed files with 1,184 additions and 1,008 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ RATELIMIT_RATE=150/m # Rate limit (150 requests per minute)
RATELIMIT_METHOD=ALL # HTTP methods to rate limit; 'ALL' means all methods
RATELIMIT_GROUP=graphql # Group name for the rate limit
RATELIMIT_SKIP_TIMEOUT=False # Whether to skip rate limiting during c


OPENSEARCH_ADMIN=admin
OPENSEARCH_PASSWORD=B9wc9VrqX7pY
31 changes: 27 additions & 4 deletions .github/workflows/ci_assembly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 10
opensearch:
image: opensearchproject/opensearch:latest
ports:
- 9200:9200
env:
discovery.type: single-node
cluster.name: my_opensearch_local
http.port: 9200
plugins.security.ssl.http.enabled: false
OPENSEARCH_INITIAL_ADMIN_PASSWORD: B9wc9VrqX7pY
options: >-
--health-cmd "curl -f -u admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} http://localhost:9200/_cluster/health || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -145,8 +160,8 @@ jobs:
SECRET_KEY: secret
MODE: DEV
DB_DEFAULT: postgresql
CELERY_BROKER_URL": "memory://openIMIS-test//"
CELERY_RESULT_BACKEND": "cache+memory://openIMIS-test//"
CELERY_BROKER_URL: "memory://openIMIS-test//"
CELERY_RESULT_BACKEND: "cache+memory://openIMIS-test//"
#DJANGO_SETTINGS_MODULE: hat.settings
DB_HOST: localhost
DB_PORT: 5432
Expand All @@ -156,6 +171,10 @@ jobs:
#DEV_SERVER: true
SITE_ROOT: api
CI_EXCLUDED_MODULE: ${{ vars.CI_EXCLUDED_MODULE }}
OPENSEARCH_ADMIN: admin
OPENSEARCH_PASSWORD: B9wc9VrqX7pY
OPEN_SEARCH_HTTP_PORT: 9200
OPENSEARCH_HOSTS: "localhost:9200"

- name: Django tests MSSQL
working-directory: ./openIMIS
Expand All @@ -171,8 +190,8 @@ jobs:
SECRET_KEY: secret
MODE: DEV
DB_DEFAULT: mssql
CELERY_BROKER_URL": "memory://openIMIS-test//"
CELERY_RESULT_BACKEND": "cache+memory://openIMIS-test//"
CELERY_BROKER_URL: "memory://openIMIS-test//"
CELERY_RESULT_BACKEND: "cache+memory://openIMIS-test//"
#DJANGO_SETTINGS_MODULE: hat.settings
DB_HOST: localhost
DB_PORT: 1433
Expand All @@ -183,3 +202,7 @@ jobs:
SITE_ROOT: api
#REMOTE_USER_AUTHENTICATION: False
CI_EXCLUDED_MODULE: ${{ vars.CI_EXCLUDED_MODULE }}
OPENSEARCH_ADMIN: admin
OPENSEARCH_PASSWORD: B9wc9VrqX7pY
OPEN_SEARCH_HTTP_PORT: 9200
OPENSEARCH_HOSTS: "localhost:9200"
8 changes: 2 additions & 6 deletions .github/workflows/ci_module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,7 @@ jobs:
MODE: DEV
OPENSEARCH_ADMIN: admin
OPENSEARCH_PASSWORD: B9wc9VrqX7pY
OPEN_SEARCH_HTTP_PORT: 9200
OPENSEARCH_HOST: localhost
OPENSEARCH_HOSTS: "http://localhost:9200"
OPENSEARCH_HOSTS: "localhost:9200"
ci_module_psql_test:
name: Run All Tests (PSQL)
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -518,9 +516,7 @@ jobs:
MODE: DEV
OPENSEARCH_ADMIN: admin
OPENSEARCH_PASSWORD: B9wc9VrqX7pY
OPEN_SEARCH_HTTP_PORT: 9200
OPENSEARCH_HOST: localhost
OPENSEARCH_HOSTS: "http://localhost:9200"
OPENSEARCH_HOSTS: "localhost:9200"
- name: Generate Coverage Report
if: always()
working-directory: ./openimis/openIMIS
Expand Down
2 changes: 2 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"product",
"insuree",
"policy",
"calcrule_validations",
"contribution",
"payer",
"payment",
Expand Down Expand Up @@ -213,6 +214,7 @@
"opensearch_reports",
"payment_cycle",
"calcrule_social_protection",
"calcrule_validations",
"payroll"
],
"django": true,
Expand Down
382 changes: 191 additions & 191 deletions README.md

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ services:
- database-mssql:/var/opt/mssql/data
ports:
- 1433:1433
opensearch:
image: opensearchproject/opensearch:latest
env_file:
- ".env.openSearch"
environment:
- "discovery.type=single-node"
- "cluster.name=${CLUSTER_NAME:-my_opensearch_local}"
- "http.port=${OPEN_SEARCH_HTTP_PORT:-9200}"
- "plugins.security.ssl.http.enabled=${SLL_HTTP_ENABLED:-false}"
- "plugins.security.disabled=true"
- "OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD}"

volumes:
- "opensearch-data1:/usr/share/opensearch/data"
networks:
openimis-net:
volumes:
database:
database-mssql:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import uuid
##from {{module_name}}.apps import AbsCalculationRule
##from {{module_name}}.config import CLASS_RULE_PARAM_VALIDATION, DESCRIPTION_CONTRIBUTION_VALUATION, FROM_TO
from django.core.exceptions import ValidationError
from gettext import gettext as _
from django.utils.translation import gettext as _
##from core.signals import *
##from core import datetime
from django.contrib.contenttypes.models import ContentType
Expand Down
2 changes: 1 addition & 1 deletion openIMIS/openIMIS/openimisapps.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_locale_folders():
with resources.path(mod_name, "__init__.py") as path:
apps.append(path.parent.parent)
except ModuleNotFoundError:
raise logger.error(f"Module \"{mod_name}\" not found.")
logger.error(f"Module \"{mod_name}\" not found.")

for topdir in ["."] + apps:
for dirpath, dirnames, filenames in os.walk(topdir, topdown=True):
Expand Down
Loading

0 comments on commit a36e310

Please sign in to comment.