-
Notifications
You must be signed in to change notification settings - Fork 0
APP : Module : Structure
The app modules follow a strict structure. Developers must follow the structure to ensure coherence across the app as well as the rezaware platform. We describe the know-how for managing app modular entities and functional packages.
| app | -- has -- | modules | -- with -- |entities | -- that have -- | packages | -- performing -- |functions |
App [rezaware (base), mining, wrangler, visuals] |
------ Modules |
------------ Entities |
------------------ Packages |
----------------------------- Functional [classes]:
An entity folder embedded inside the app/modules folder holds a set of functional packages specific to that entity. For example, wrangler/modules/ota/scraper
defines the Online-Travel-Agency (OTA) related functionality for housing classes (or packages) of scraper functions for scraping OTA website data. Central to configuring a particular app's environment variables is the app.cfg file and the rezaware.py class.
The class contains the main methods:
- Setting up the app.ini for the functional packages
- reading and writing the configuration data
- reading and writing log files
The app.cfg file follows the python ConfigParser taxonomy. Each app's (datamart, mining, utils, visuals, & wrangler) configuration information is described in this file. Information from the app.cfg will be copied into individual module functions app.ini files. Thereby, bringing deployment-independent coherence for all the packages to function easily. The relevant sections are discussed in the section below.
The applicable module entities and functions must be defined in the app.cfg file. They are defined in the [MODULES] section.
##
## e.g. wrangler/app.cfg
## [MODULES]
## ota = scraper
##
[MODULES]
entity_X = function_X1, function_X2, function_X3
entity_Y = function_Y1
Set the default data storage mode; i.e. local or cloud file system. Furthermore, specifies the root directory, which is also used to define the AWS Bucket name.
# e.g., mode = AWS-S3-BUCKET & root = rezaware-wrangler-source-code (bucket name)
# e.g., mode = LOCAL-FS & root = rezaware (directory name rezaware app is in)
mode = local-fs
root = rezaware
Defines the server IP. Required for establishing database and web connections. The application hosting location can be replaced with deployed URL.
# default localhost
hostIP = 127.0.0.1
Defines the database connectivity information
#--database types: mysql, postgresql (default: postgres)
dbType = postgresql
#--port default 5432
dbPort = 5432
#--database driver
# postgresql: 'org.postgresql.Driver'
dbDriver = org.postgresql.Driver
#--database name
dbName = rezstage
#--schema name
dbSchema = lakehouse
#--username and password to connect
# default db_user=postgres, db_pswd = postgres
dbUser = postgres
dbPswd = postgres
All logging parameters are defined here.
#--directory path to store logs
# defaulat logs/
Path = logs/
File = app.log
#--logging level to set DEBUG, ERROR, WARNING, INFO
Level = DEBUG
#--append or write over the logs
# default: 'a' to append, 'w+' to overwrite
Mode = w+
#--loggin format
# default: %(asctime)s - %(name)s - %(levelname)s - %(message)s'
# logFormat = %(asctime)s - %(name)s - %(levelname)s - %(message)s
Format = asctime,name,levelname,message
Rezaware abstract BI augmented AI/ML entity framework © 2022 by Nuwan Waidyanatha is licensed under Creative Commons Attribution 4.0 International