Package: pyboozo
PyBoozoPython based command line utility for bare bone software development directory structure setup and configuration generator._,..,,,_'``````^~"-,_`"-,_.-~c~-.                    `~:. ^-.`~~~-.c    ;                      `:.  `-,     _.-~~^^~:.`.   ;      _,--~~~~-._       `:.   ~. .~          `..` ;'.:``:`:.`_.:-,.`..' .:   :'_.-~^~-.`.`..'   .:      `.    ':.' _:'.-'        `.    :.     .:   .'`.:;:`-'   .:'`.`^~~^`.:.`.;;`-.__,-~~-.,' ':'.__.`    :'~--..--'     ':..:'':..___.:'PyBoozo is an opinionated software development environment setup and configuration generator.
It provides the bare bone directory structure for setting up software development environment. It generate respective configurations, environment variables to be used across seamlessly.These conventions and configurations can easily be customized or extended. The created directory structures gives you the barebone development environment with required configuration files.These convention of directories and choices let you work with docker containers and host system in parallel, such that all the data and code remains outside the containers, but separate configuration gets generated inside the containers still pointing out to the same relative and absolute paths.HighlightsCore separate components (directories):CodeDataConfigurationsMobileVirtualenvAuto configuration generation:<name>.yml-> load this file from any application code; this has one-to-one-mapping with environment variables<name>.export.sh-> all the path and required environment variables for command line setup<name>.alias.sh-> useful shortcuts for directory navigation<name>.env.sh-> include theexportandaliasscripts. This is the single file to be included inside the~/.bashrcfile as:source/<name>-hub/<name>/config/<name>.env.shNOTE:<name>is the name given by you at the time of project setup; default name is:boozoThis directory is meant to work seamlessly with stateless docker containersSharing the host's directories having code, data and virtualenv with the docker container (using Volume mapping)This allows the docker container to be completely stateless yet fully functionalThe configuration files (.yml and .sh) are separate between host and dockerThis ensures docker container are only loosely coupled to host and allows to change the application behavior independent to the host systemOne example is having separate CUDA version nvidia gpu docker containers for ML/AI and computer vision development, but everything resides on host system - this saves unnecessary duplication installation/un-installation of python dependencies / virtualenvsInteractive failsafe system setupConsistent conventions allows sharing with others in the team or otherwise less painfulNOTE:Only Linux is supported (Tested on Ubuntu 18.04 LTS).shfiles are tested forbashshell.SetupNOTE:Creating a application root directory manually in the system root/and using that for setup is recommended as it provides username independent configurations and allows to seamlessly across physical systems and docker containers.To create at/level; first create top level directory and give the user level permission, before running the scriptsudomkdir-p/boozo-hub&&sudochown-R$(id-u):$(id-g)/boozo-hubcd/
boozoThis will create the required directory structure and generate the configuration files.NOTE:name supports onlya-z,/and-; maximum 7 chars long namesprefix is onlya-zand maximum 3 chars long; implicitly_will be appended to the prefix automatically--gitkeepcreates empty .gitkeep file in each directory--timestampcreates timestamped based data directory symlinked to common name, allows to easily link to different mount partitions by changing the symlinks--nameand--prefixoptions provides for the unique namespace and configurations;more the one stack can be setup within the same application root directory provided it has all apps have unique name space i.e.unique nameandunique prefix. This is the recommendedA single unique name space generates unique directories, configuration filenames, environment variables, aliasesAvoid using default name and prefix for custom application setupA pre-configured.gitignorefile will be created for the main app folder:/boozo-hub/boozoOnce setup is done,git initis required to initialize the main application directory i.e./boozo-hub/boozoSetup using pip packageInstall pip package:pipinstallpyboozoCreate new project setup## check the help menu for optionsboozo--help## run interactivelyboozo## different silent executionboozo--root=/boozo-hub--name=boozo--prefix=bzo
boozo--root=/boozo-hub--name=boozo--prefix=bzo--gitkeep
boozo--root=/boozo-hub--name=boozo--prefix=bzo--gitkeep--timestampSetup using source codeClone the git repoExecute from the cloned source codepython-mboozoHow the directory structure looks like?NOTE:Application root directory name (/boozo-hub)can be anything and different than the app name (boozo)Providing the appname provides unique 4 directories bound to the app name:boozo,boozo-dat,boozo-mobileandboozo-configMore then one appname can be setup given that they have different app name. but same application root directory. This can be given at the time of running the project setup installer.Observe the use of soft links that separates the code with the data, logs and mobile sdks.while creating stateless docker container, map only the directories:boozo,boozo-dat,boozo-mobile, andvirtualmachinesDo NOT mapboozo-configdirectory to the docker container, instead run thepyboozoagain inside the container to generate new configuration that lives inside the container only and separate from hostFor all application usage use only the environment variables with*HOMEsuffix instead of*ROOTsuffix. The difference is all the*HOMEsuffix variables are the soft link inside the main application, in the exampleboozo/config.A default.gitignoreis provided as the starting point; if it's already exists it will NOT be overridden.Directory Stack - Minimal viewThe directory and files created (minimal view)boozo-hub/
├──boozo
│├──apps
│├──common
│├──config->/boozo-hub/boozo-config
│├──data->/boozo-hub/boozo-dat
│├──dist
│├──docs
│├──logs->/boozo-hub/boozo/data/logs
│├──mobile->/boozo-hub/boozo-mobile
│├──plugins
│├──practice
│├──scripts
│├──tests
│├──tmp->/boozo-hub/boozo/data/tmp
│├──virtualenvs->/boozo-hub/virtualmachines/virtualenvs
│└──www
├──boozo-config
│├──boozo.alias.sh
│├──boozo.env.sh
│├──boozo.export.sh
│└──boozo.yml
├──boozo-dat
│├──aid
││└──tfrecords
│├──ant
│├──auth
│├──cfg
│├──cloud
│├──databases
││└──mongodb
││├──configdb
││├──db
││├──key
││└──logs
│├──docker
│├──downloads
│├──external
│├──kbank
│├──logs
││└──www
│├──mnt
│├──mobile
│├──npm-packages
│├──public
│├──public_html
│├──release
││├──keras
││└──torch
│├──reports
│├──samples
│├──_site
│├──team
││└──images
│├──tmp
│├──tools
│├──uploads
│└──workspaces
├──boozo-mobile
│└──android
│├──apps
│├──dist
│├──external
│├──plugins
│└──sdk
└──virtualmachines└──virtualenvs62directories,4filesDirectory Stack - Complete Expanded viewThe directory and files created (Complete Expanded view, shown for non-timestamped data directory setup)boozo-hub/
├──boozo
│├──apps
││└──.gitkeep
│├──common
││└──.gitkeep
│├──config->/boozo-hub/boozo-config
││├──boozo.alias.sh
││├──boozo.env.sh
││├──boozo.export.sh
││├──boozo.yml
││└──.gitkeep
│├──data->/boozo-hub/boozo-dat
││├──aid
│││├──.gitkeep
│││└──tfrecords
│││└──.gitkeep
││├──ant
│││└──.gitkeep
││├──auth
│││└──.gitkeep
││├──cfg
│││└──.gitkeep
││├──cloud
│││└──.gitkeep
││├──databases
│││├──.gitkeep
│││└──mongodb
│││├──configdb
││││└──.gitkeep
│││├──db
││││└──.gitkeep
│││├──.gitkeep
│││├──key
││││└──.gitkeep
│││└──logs
│││└──.gitkeep
││├──docker
│││└──.gitkeep
││├──downloads
│││└──.gitkeep
││├──external
│││└──.gitkeep
││├──kbank
│││└──.gitkeep
││├──logs
│││├──.gitkeep
│││└──www
│││└──.gitkeep
││├──mnt
│││└──.gitkeep
││├──mobile
│││└──.gitkeep
││├──npm-packages
│││└──.gitkeep
││├──public
│││└──.gitkeep
││├──public_html
│││└──.gitkeep
││├──release
│││├──.gitkeep
│││├──keras
││││└──.gitkeep
│││└──torch
│││└──.gitkeep
││├──reports
│││└──.gitkeep
││├──samples
│││└──.gitkeep
││├──_site
│││└──.gitkeep
││├──team
│││├──.gitkeep
│││└──images
│││└──.gitkeep
││├──tmp
│││└──.gitkeep
││├──tools
│││└──.gitkeep
││├──uploads
│││└──.gitkeep
││└──workspaces
││└──.gitkeep
│├──dist
││└──.gitkeep
│├──docs
││└──.gitkeep
│├──.gitignore
│├──logs->/boozo-hub/boozo/data/logs
│├──mobile->/boozo-hub/boozo-mobile
││└──android
││├──apps
│││└──.gitkeep
││├──dist
│││└──.gitkeep
││├──external
│││└──.gitkeep
││├──.gitkeep
││├──plugins
│││└──.gitkeep
││└──sdk
││└──.gitkeep
│├──plugins
││└──.gitkeep
│├──practice
││└──.gitkeep
│├──scripts
││└──.gitkeep
│├──tests
││└──.gitkeep
│├──tmp->/boozo-hub/boozo/data/tmp
│├──virtualenvs->/boozo-hub/virtualmachines/virtualenvs
││└──.gitkeep
│└──www
│└──.gitkeep
├──boozo-config
│├──boozo.alias.sh
│├──boozo.env.sh
│├──boozo.export.sh
│├──boozo.yml
│└──.gitkeep
├──boozo-dat
│├──aid
││├──.gitkeep
││└──tfrecords
││└──.gitkeep
│├──ant
││└──.gitkeep
│├──auth
││└──.gitkeep
│├──cfg
││└──.gitkeep
│├──cloud
││└──.gitkeep
│├──databases
││├──.gitkeep
││└──mongodb
││├──configdb
│││└──.gitkeep
││├──db
│││└──.gitkeep
││├──.gitkeep
││├──key
│││└──.gitkeep
││└──logs
││└──.gitkeep
│├──docker
││└──.gitkeep
│├──downloads
││└──.gitkeep
│├──external
││└──.gitkeep
│├──kbank
││└──.gitkeep
│├──logs
││├──.gitkeep
││└──www
││└──.gitkeep
│├──mnt
││└──.gitkeep
│├──mobile
││└──.gitkeep
│├──npm-packages
││└──.gitkeep
│├──public
││└──.gitkeep
│├──public_html
││└──.gitkeep
│├──release
││├──.gitkeep
││├──keras
│││└──.gitkeep
││└──torch
││└──.gitkeep
│├──reports
││└──.gitkeep
│├──samples
││└──.gitkeep
│├──_site
││└──.gitkeep
│├──team
││├──.gitkeep
││└──images
││└──.gitkeep
│├──tmp
││└──.gitkeep
│├──tools
││└──.gitkeep
│├──uploads
││└──.gitkeep
│└──workspaces
│└──.gitkeep
├──boozo-mobile
│└──android
│├──apps
││└──.gitkeep
│├──dist
││└──.gitkeep
│├──external
││└──.gitkeep
│├──.gitkeep
│├──plugins
││└──.gitkeep
│└──sdk
│└──.gitkeep
└──virtualmachines├──.gitkeep└──virtualenvs└──.gitkeep103directories,105filesDebuggingPython log level are supported to set the module/package logger settings:CRITICALERRORWARNINGINFODEBUGNOTSETExport the environment variable to the required log levelexport_PYBOOZO_LOG_LEVEL_='DEBUG'CreditSnek logo byAmir RachumCli color coding inspired from:colorama,termcolorCli inputs usingclick