Skip to content

Development Install¤

In order to develop applications or projects derived on devapps (or on devapps itself):

  1. clone this or the derived application's repository
  2. configure artifactory credentials (for packages referred to in your pyproject.toml file) as explained before
  3. pip install poetry if you not yet have the build system (does not need to match your target python version)
  4. run poetry install

It takes around a minute for poetry to resolve all dependencies.
After this you can enter the virtual environment via poetry shell with all required packages and commands available:

$ poetry shell
$ ops -h

$ poetry shell
Virtual environment already activated: /home/runner/miniconda3/envs/devapps_py3.7
$
$ ops -h

Usage: ops ACTION [--flag[=value] ...]

Available Action Plugins:
    - container_build
    - container_pull
    - fs_build
    - infra_aws_cloud
    - infra_digital_ocean
    - infra_hetzner_cloud
    - kubectl
    - life_cycle
    - log_view
    - pkgs
    - project
    - run
    - system

Help:
    ops <action> <-h|--helpfull> [match]

Note:
    - Action shortcuts understood, e.g. action "foo_bar_baz" = fbb
    - Plugins are taken on first found basis
    - Flags also have shortcut versions (e.g. -hf for --helpfull)

Example:
    ops container_build -hf log # all flags about logging

Co-Developing Dependent Packages¤

If you want to develop not only on the poetry installed package but also on others than using a PYTHONPATH based trick is convenient:

Clone the other repositories under development as well and export $PYTHONPATH like so:

$ (lc-python-Z3KKTfGL-py3.7) 2.lc-python$ type ldp
ldp is aliased to `export PYTHONPATH="/home/joe/repos/devapps/src:/home/joe/repos/lc-doctools/src"; cd /home/joe/repos/lc-python; poetry shell'

The devapps dependent lc-python environment will now use e.g. devapps from the checkout and not from the configured package.

Scripts from cloned repos

The PYTHONPATH trick works also when those other packages ship with scripts, e.g. the doc script from lc-doctools, or ops from devapps.
You do need to have at least one version with such a script in your pyproject.yml, so that the script is installed and found in your $PATH within the virtual environment.

Back to top