Configuring pybuilder for developing command-line application.
Conda as a package manager is currently not supported by pybuilder. pybuilder/pybuilder#581
-
Create conda-env environment
$ conda env create -n conda-env -f dev_environment.yml $ source activate conda-env
If conda-env already present
$ conda env update -f dev_environment.yml $ source activate conda-env
-
Run main method
$ pyb run -P arg1="param1" -P arg2="param1" -P conf="./default_conf"
-
Run unittests
$ conda env update -f unittest/test_environment.yml $ pyb run_unit_tests
-
Generate pip package
$ pyb publish
-
package location
target/dist/pybuilder-demo-/dist/pybuilder-demo-.tar.gz
-
Create conda-env environment
$ conda create -n prod-conda-env python=3.6 $ source activate prod-conda-env
Environment name should be similar to the name present in environment.yml and main/scripts/pyb-demo-setup
-
Install pybuilder-demo package
$ pip install <pybuilder-demo-package-path>
-
Install pybuilder-demo dependencies
$ pyb-demo-setup
-
Run main method
$ pyb-demo --help $ pyb-demo --arg1="<param1>" --arg2="<param2>" --conf="<custom_conf_dir>"
OR
$ pyb-demo
--conf has default value set to <prod-venv-name>/etc/configs