Welcome to power-daps
About
power-daps is a build tool that can build apps in multiple languages. It also has templates to speed up creation of "hello world" apps in different languages. It has a plugin architecture which allows people to add support for more languages and styles easily.
Installation
Across platforms with Python 3
pip3 install power-daps
Mac OS (not yet supported)
brew install power-daps
CentOS or RedHat (not yet supported)
yum install power-daps
Ubuntu or Debian (not yet supported)
apt-get install power-daps
Usage (currently)
Create a new app
Specify the type of app by specifying which meta model you want to use.
Meta models can be specified by the --meta-model or -m flag
Few built-in meta models are provided with power-daps: Java, Python 3, ES 6 and Rust. Here is how you initialize apps with dap in these languages.
Java
dap init --meta-model power_daps/java
Python
dap init --meta-model power_daps/python3
ECMA Script
dap init --meta-model power_daps/es6
Rust
dap init --meta-model power_daps/rust
Build the app
If you have initialized the application with dap init, then just dap will do what is needed
by looking at actions.yml at the root of your project. However, you can use the following commands
depending on the language:
dap depsto install dependenciesdap compileif your language requires compilingdap compile_testdap unit_testdap package
Adding dependencies
Edit dependencies.yml at the root level of your project and add dependencies. 'default' here will eventually be 'run' or 'test' etc depending the scope of the dependency. A given app can have dependencies using different package managers. For example, sometimes you may want something that is installed using 'brew_cask' in a python app.
Examples:
Java
default:
junit:
version: "4.13"
installer: jar
group_id: junit
Python
default:
pyyaml:
version: 5.3
installer: pip3
ES6
default:
bulma:
version: latest
installer: npm
Cargo / Rust
default:
ripgrep:
version: latest
installer: cargo
Usage (eventually)
As a suite of tools
Creating something new
dap create suite
dap create app <app-name>
dap create data-source <app-name>/<data-source-name>[:<data-source-type>] where <data-source-type> is postgres, mysql, oracle, mongodb, cassandra, csv-fetch etc.
Working with existing application suites
The basic structure for using dap is: dap <target>. This will run all preceding targets in the chain, unless you tell it to only run that target by running dap only <target>. Only targets that need to run will run unless you force it by running dap force <target>. If you only want to force one target, run dap force only <target>.
The following targets are provided by default for Java development:
deps: Resolve, download and verify dependencies.compile: Compile application and test code for compiled languages.unit-test: Run unit tests.package: Package the jar or the war or the pip or the gem or the rpm or the docker image.deploy: Spin up necessary environment, and deploy the necessary components and apps.functional-test: Run functional tests on the deployed app.
As stand-alone tools
Each Power Daps target comes as a stand-alone command:
dap-createdap-depsdap-compiledap-unit-testdap-packagedap-deploydap-functional-test
Appendix
Complete target tree:
allordefaultor if you omit a targetdepsresolve-depsdownload-depsverify-deps
validatecompilecompile-appcompile-test
unit-testpackageorjarorwardeploydeploy-machinescheck-machinesstop-machinesclean-machinesstart-machines
deploy-dependenciesload-datacheck-data-storesclean-data-storescreate-schemapopulate-datamigrate-schemamigrate-data
component-testcontract-testintegration-testfunctional-test
Details of what happens when creating a new application suite
Create a new suite by running dap create suite [dir]. This will create the following directory structure in the current directory or the specified directory:
appsbindashboardenvtestintegration-testfunctional-test
Details of what happens when creating a new application in the current suite
dap create app <name> will create the following structure under the <name> directory under apps:
configidentitydatasourcessample-rdbmsschema-migrations000-initial-schema.sql
data-migrations000-000-initial-data.sql
srctestunit-testcomponent-testcontract-test
Creating a data source for an app
dap create data-source <app-name>/<data-source-name>[:<data-source-type>] where <data-source-type> is postgres, mysql, oracle, mongodb, cassandra, csv-fetch etc.
csv-fetch will allow you to setup a periodic sftp download of CSV files from multiple sources and load them into a particular location accessible to the application.
License
Power Daps is released under GNU Public License v3.0
Copyright
Copyright © 2016, Prasanna Pendse
Release files for power-daps 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| power-daps-0.0.6.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| power_daps-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / power-daps-0.0.6.tar.gz
| Download URL | power-daps-0.0.6.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
202e6606c7c0a713548da372bc0b333e6b36306232223ca50949365c66abbe6a
|
|
BLAKE2b-256 checksum How to use checksums |
90e6d030aac871f291b606b62719d27873b38792b548fbfe470406571862bd4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|
Release files / power_daps-0.0.6-py3-none-any.whl
| Download URL | power_daps-0.0.6-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eaad9aa117e1ecd45d3fd1884d31581dd4645f9f2005f45f681a687ccfb427db
|
|
BLAKE2b-256 checksum How to use checksums |
9ba7c7f2b74da115203c9696d96009c137c5c1019ae7f7c441a9be75638c0f56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
|