Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/24.04 #239

Merged
merged 116 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
6362126
Update openimis.json
dragos-dobre Sep 15, 2023
9e32361
Update openimis.json
dragos-dobre Sep 15, 2023
fd87f38
Added coverage to ci_module.yml
dborowiecki Sep 17, 2023
686efde
Revert "Added coverage to ci_module.yml"
dborowiecki Sep 17, 2023
9db4757
Sonar update (#179)
dborowiecki Sep 19, 2023
bf5c07c
add sripts to clone..
delcroip Sep 25, 2023
d57a81e
add branch checkout
delcroip Sep 25, 2023
f8dbc62
fixing pip cmd
delcroip Sep 25, 2023
642164e
docker database using image
delcroip Sep 25, 2023
b2efa4e
DO NOT LOAD TEST db
delcroip Sep 28, 2023
f6f1c2e
stop using special test db schema
delcroip Oct 4, 2023
ce12240
Merge remote-tracking branch 'refs/remotes/origin/setup-tools' into s…
delcroip Oct 4, 2023
32350de
add-sonar-ci: add ci file (#184)
jdolkowski Oct 12, 2023
63047c9
Setup tools (#186)
delcroip Oct 18, 2023
e2c917b
Update ci_module.yml (#180)
dborowiecki Oct 18, 2023
5e4b16d
fix: requirements.txt to reduce vulnerabilities
snyk-bot Oct 26, 2023
5378f52
Setup tools (#187)
delcroip Nov 9, 2023
0e315cb
Update ci_module.yml (#190)
delcroip Nov 23, 2023
64ccec6
Revert "Update ci_module.yml (#190)"
delcroip Nov 24, 2023
060bf15
Merge pull request #191 from openimis/revert-190-test-self-hosted-runner
delcroip Nov 24, 2023
a5e1311
support several database config
delcroip Dec 5, 2023
df259d2
move to list
delcroip Dec 5, 2023
68b355f
Added support for environment variable OPENIMIS_CONF
hirensoni913 Dec 7, 2023
fe42e29
Merge pull request #193 from openimis/hirensoni913-patch-1
delcroip Dec 7, 2023
654c71d
Update openimis.json
dragos-dobre Dec 21, 2023
782eef8
debug console by default
delcroip Jan 24, 2024
de0e00f
small improvement
delcroip Jan 24, 2024
2e8e219
add control
delcroip Jan 29, 2024
6678ea6
reset
delcroip Jan 29, 2024
92d98ee
change default rabitmq
delcroip Jan 29, 2024
43050bc
Merge branch 'develop' into feature/debug-console
delcroip Jan 29, 2024
a8a459f
fix default
delcroip Jan 29, 2024
4224989
Update settings.py
delcroip Jan 30, 2024
2963aed
fixing db option logic
delcroip Jan 30, 2024
4788600
fix: requirements.txt to reduce vulnerabilities
snyk-bot Feb 1, 2024
ba74658
django 4.2
delcroip Feb 6, 2024
8ea0c8a
Merge pull request #199 from openimis/feature/debug-console
delcroip Feb 8, 2024
fffb6cf
fix appscheduler
delcroip Feb 8, 2024
f13a517
Merge pull request #205 from openimis/feature/fix-apscheduler
delcroip Feb 8, 2024
560ce58
Merge pull request #204 from openimis/snyk-fix-558068475895e0cf72aeaa…
delcroip Feb 9, 2024
487dd8e
Merge branch 'develop' into snyk-fix-74487949e90f11297b2b5eb310347564
delcroip Feb 9, 2024
81802a3
Merge pull request #188 from openimis/snyk-fix-74487949e90f11297b2b5e…
delcroip Feb 9, 2024
b43de43
Update requirements.txt
hirensoni913 Feb 12, 2024
84bcc3b
Added trusted proxy for waitress setup (#208)
malinowskikam Feb 16, 2024
a4b6910
Update .env.example
delcroip Feb 28, 2024
b4fff1e
PSQL as default
delcroip Mar 1, 2024
f644bb2
comment
delcroip Mar 1, 2024
3533ef2
Merge pull request #211 from openimis/delcroip-patch-1
delcroip Mar 1, 2024
0c478cb
add grievance
delcroip Mar 3, 2024
4907966
make setup-local-dev compatible with module-requirement
delcroip Mar 5, 2024
5b414ae
Merge pull request #213 from openimis/feature/setuplocal-modulereq
delcroip Mar 8, 2024
1676c18
release 24.04
delcroip Mar 8, 2024
9611623
Dev containers added
hirensoni913 Mar 11, 2024
16dc7c1
Dev containers added
hirensoni913 Mar 11, 2024
33bb233
hotfix: openfix
delcroip Mar 12, 2024
de25878
Merge pull request #214 from openimis/delcroip-patch-1
delcroip Mar 12, 2024
4c90f9e
Feature/optimize dockerfile (#215)
hirensoni913 Mar 25, 2024
9119bc3
use repo vars to exclude some module in CI (#218)
delcroip Mar 26, 2024
1528490
use main db only for main CI
delcroip Mar 26, 2024
34b0935
Environment variables table added
hirensoni913 Mar 28, 2024
34bb497
We can now configure multiple database connections through routers (#…
hirensoni913 Apr 2, 2024
161cfd0
Extra database related changes + other configurations added (#222)
hirensoni913 Apr 2, 2024
e8a15bd
Change default caching method to pymemecache
dborowiecki Apr 2, 2024
544d93e
Merge pull request #223 from openimis/cacheHotfix
hirensoni913 Apr 2, 2024
7ad19d3
fix: requirements.txt to reduce vulnerabilities
snyk-bot Apr 2, 2024
6dbe8ff
Added cache env to readme.md
dborowiecki Apr 2, 2024
f751eec
Fixed django channels setup
hirensoni913 Apr 3, 2024
6443c4d
Merge pull request #225 from openimis/feature/fixed_django_channels
delcroip Apr 4, 2024
c98aa30
Debug is now based on the evnironment variable. True if mode is DEV o…
hirensoni913 Apr 5, 2024
3c6557d
DEBUG as Boolean
delcroip Apr 5, 2024
94409cd
Merge pull request #226 from openimis/feature/introduce-mode-env
delcroip Apr 5, 2024
d248d51
Fix settings.py
Apr 5, 2024
906e790
MOIDe = DEV for CI
delcroip Apr 5, 2024
6fc82d2
Merge pull request #227 from openimis/feature/mode-dev-for-ci
delcroip Apr 5, 2024
4e74194
HOTFIX cache and channel
delcroip Apr 5, 2024
e789854
Fixed settings for caching
Apr 5, 2024
e668485
HOTFIX CELERY_RESULT_BACKEND
delcroip Apr 5, 2024
a361450
HOTFIX CI python 3.10
delcroip Apr 8, 2024
31ee331
Fixed settings.py
hirensoni913 Apr 8, 2024
132fa1d
Merge branch 'develop' into fix_settings
hirensoni913 Apr 8, 2024
e42f757
HOTFIX unblock test
delcroip Apr 9, 2024
70cb1f2
fix python version parsing
delcroip Apr 10, 2024
d428040
take latest mssql django version (1.4.*)
delcroip Apr 10, 2024
956b305
Merge pull request #224 from openimis/snyk-fix-d68e9c3abaa4ffe9050cd5…
delcroip Apr 10, 2024
dc36194
Update openimis.json
hirensoni913 Apr 10, 2024
ad27edb
Removed default rabitmq while configuring redis
hirensoni913 Apr 10, 2024
633cd56
Merge pull request #228 from openimis/fix_settings
delcroip Apr 10, 2024
97fa2c1
coreMIS modules
delcroip Apr 11, 2024
9b08b33
Merge branch 'release/24.04' into pre-24-04
delcroip Apr 12, 2024
d2cc81e
Merge pull request #230 from openimis/pre-24-04
delcroip Apr 12, 2024
32b925e
CM-875: added missing modules
sniedzielski Apr 12, 2024
287668e
Merge pull request #220 from openimis/feature/update_readme
delcroip Apr 18, 2024
cbb48d9
Adding DJANGO_DB_LOG_HANDLER and
delcroip Apr 18, 2024
cf02a00
add DJANGO_DB_LOG_HANDLER
delcroip Apr 18, 2024
0e5cc63
dev setup fixes
delcroip Apr 23, 2024
5f22342
Merge pull request #233 from openimis/delcroip-patch-1
delcroip Apr 23, 2024
dff18d4
test to raise warning only
delcroip Apr 23, 2024
5597c3f
fix missing var
delcroip Apr 23, 2024
e546da8
Fix warning message
delcroip Apr 23, 2024
46ee22e
YAML error fix
delcroip Apr 23, 2024
536c673
fix location
delcroip Apr 23, 2024
1317c9f
fix psql
delcroip Apr 23, 2024
5a7d911
fixing warning
delcroip Apr 23, 2024
23f9343
Merge pull request #234 from openimis/develop
delcroip Apr 23, 2024
7c669ae
CM-875: added command to upload opensearch dashboard configurations
sniedzielski Apr 29, 2024
05fa47e
CM-875: fixed typo in command example in README section
sniedzielski Apr 29, 2024
ccf7e09
CM-875: added important step to remember in documentation
sniedzielski Apr 29, 2024
ed8ac10
CM-875: added important step to remember in documentation part 2
sniedzielski Apr 29, 2024
99c7c00
remove grievance
delcroip Apr 29, 2024
470dd17
use pip
delcroip Apr 30, 2024
cd853f7
remove grievance
delcroip Apr 30, 2024
07350c3
CM-875: replaced env with arguments of commands
sniedzielski Apr 30, 2024
64e8ed4
Merge pull request #237 from openimis/feature/CM-875
delcroip Apr 30, 2024
b44530d
minor updates
delcroip May 1, 2024
b639a28
Merge branch 'main' into release/24.04
delcroip May 2, 2024
81cdb12
ENV Typo
delcroip May 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "BE Dev Container",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "../Dockerfile"
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Uncomment the next line to run commands after the container is created.
"postCreateCommand": "cd openimis && python manage.py runserver",

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"formulahendry.code-runner"
]
}
}

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"
}
52 changes: 36 additions & 16 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,26 +1,46 @@
# Database engine, should be changed for mssql
DB_ENGINE=django.db.backends.postgresql
# Database host
DB_HOST=<host>
# Database port
DB_PORT=<port>
# Database name
DB_NAME=<db>
# Database username
DB_USER=<username>
# Database user password
DB_PASSWORD=<password>
# Database PSQL
PSQL_DB_USER=IMISuser
PSQL_DB_PASSWORD=IMISuser@1234
PSQL_DB_PORT=5432
PSQL_DB_ENGINE=django.db.backends.postgresql
PSQL_DB_HOST=127.0.0.1
PSQL_DB_NAME=test_imis
# Database MSSQL
MSSQL_DB_PORT=1433
MSSQL_DB_ENGINE=mssql
MSSQL_DB_USER=SA
MSSQL_DB_PASSWORD=IMISuser@1234
MSSQL_DB_NAME=test_imis
MSSQL_DB_HOST=127.0.0.1

DB_NAME=test_imis
DB_TEST_NAME=test_imis

# Site root that will prefix all exposed endpoints. It's required when working with openIMIS frontend
SITE_ROOT=api
# Should the debug be on (i.e. debug information will be displayed)
DEBUG=True
# Log level to be used. Remove for default.
DJANGO_LOG_LEVEL=WARNING
# Log handler to be used, reffer to openIMIS/openIMIS/settings.py. Remove for default.
DJANGO_LOG_HANDLER=debug-log
MODE=DEV
# this will also show the DB request in the console
DJANGO_DB_LOG_HANDLER=console
# Photo path root used in insuree module. Only used if InsureeConfig value not specified. Comment out for default.
PHOTO_ROOT_PATH=<photo path>
#PHOTO_ROOT_PATH=<photo path>
# Should the database be migrated before start (entrypoint.sh - docker setup). Will be migrated anyway if $SITE_ROOT=api. Comment out for False
DJANGO_MIGRATE=True
# Should the modules be searched for scheduled tasks. Comment out for false
# SCHEDULER_AUTOSTART=True
PROJECT_NAME=dev
NEW_OPENIMIS_HOST=dev-openimis.org
HTTP_PORT=80
HTTPS_PORT=443
DB_DEFAULT=PSQL
# Comment if you don't want to initialize with the demo dataset
INIT_MODE=demo
DB_BRANCH=develop
GW_BRANCH=develop
BE_BRANCH=develop
FE_BRANCH=develop



11 changes: 10 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ exclude =
.coverage,
openIMIS/wsgi.py,
dist,
openIMIS/migrations
openIMIS/migrations,
../**/migrations/*.py, # Relative paths for other modules
../**/.git,
../**/.gitignore,
../**/*.pot,
../**/*.py[co],
../**/__pycache__,

ignore =
# At least two spaces before inline comment.
Expand All @@ -19,5 +25,8 @@ ignore =
E303,
# Ambiguous variable name.
E741,
# Unused imports - sometimes required in modular version, fixes in __init__.py may break builds
# Ideally added for every __init__ file manually but for the time it's added globally
F401

max-line-length = 120
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for more information:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
# https://containers.dev/guide/dependabot

version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: weekly
23 changes: 23 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Sonar CI pipeline
on:
push:
branches:
- main
- 'release/**'
- develop
- 'feature/**'
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
16 changes: 10 additions & 6 deletions .github/workflows/ci_assembly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.8
python-version: "3.10"

- name: Cache dependencies
uses: actions/cache@v2
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
run: |
export DB_NAME_TEST="test_$DB_NAME"

if [ ${GITHUB_REF##*/} = "develop" ]; then export DBBRANCH="main"; else export DBBRANCH="develop"; fi
if [ ${GITHUB_REF##*/} = "main" ]; then export DBBRANCH="main"; else export DBBRANCH="develop"; fi
echo "Branch ${GITHUB_REF##*/}, usign ${DBBRANCH} branch for database"
git clone --depth=1 --branch=$DBBRANCH https://github.com/openimis/database_postgresql.git ./sql_psql

Expand All @@ -108,7 +108,7 @@ jobs:
run: |
export DB_NAME_TEST="test_$DB_NAME"

if [ ${GITHUB_REF##*/} = "develop" ]; then export DBBRANCH="main"; else export DBBRANCH="develop"; fi
if [ ${GITHUB_REF##*/} = "main" ]; then export DBBRANCH="main"; else export DBBRANCH="develop"; fi
echo "Branch ${GITHUB_REF##*/}, usign ${DBBRANCH} branch for database"
git clone --depth=1 --branch=$DBBRANCH https://github.com/openimis/database_ms_sqlserver.git ./sql_mssql
cd sql_mssql/ && bash concatenate_files.sh && cd ..
Expand Down Expand Up @@ -139,11 +139,12 @@ jobs:
run: |
python -V
export MODULES=$(jq -r '(.modules[].name)' ../openimis.json | xargs)
MODULES=$(echo "$MODULES" | sed -E "s/\b$(echo "${CI_EXCLUDED_MODULE// /\\b|\\b}")\b/ /g" | xargs)
echo $MODULES
python manage.py test --keepdb $MODULES
env:
SECRET_KEY: secret
DEBUG: true
MODE: DEV
DB_ENGINE: django.db.backends.postgresql
#DJANGO_SETTINGS_MODULE: hat.settings
DB_HOST: localhost
Expand All @@ -153,6 +154,7 @@ jobs:
DB_PASSWORD: GitHub999
#DEV_SERVER: true
SITE_ROOT: api
CI_EXCLUDED_MODULE: ${{ vars.CI_EXCLUDED_MODULE }}

- name: Django tests MSSQL
working-directory: ./openIMIS
Expand All @@ -161,11 +163,12 @@ jobs:
run: |
python -V
export MODULES=$(jq -r '(.modules[].name)' ../openimis.json | xargs)
MODULES=$(echo "$MODULES" | sed -E "s/\b$(echo "${CI_EXCLUDED_MODULE// /\\b|\\b}")\b/ /g" | xargs)
echo $MODULES
python manage.py test --debug-mode --timing --keepdb $MODULES
env:
SECRET_KEY: secret
DEBUG: true
MODE: DEV
DB_ENGINE: mssql
#DJANGO_SETTINGS_MODULE: hat.settings
DB_HOST: localhost
Expand All @@ -176,3 +179,4 @@ jobs:
#DEV_SERVER: true
SITE_ROOT: api
#REMOTE_USER_AUTHENTICATION: False
CI_EXCLUDED_MODULE: ${{ vars.CI_EXCLUDED_MODULE }}
Loading
Loading