Skip to content

corcoja/worker.python

Repository files navigation

Python Flow Worker

Testing (pytest) and linting (Flake8) CodeQL Analysis

Table of Contents

Design

TBD

Develop

How to run in a virtual environment with Python (Recommended)

Prerequisites for virtual environment

  • Python 3.6 or higher
  • Pip 19.0 or higher

Steps to run in virtual environment

  1. Create a virtual environment. To create a new virtual environment, decide upon a directory where you want to place it, and run the venv module as a script with the directory path. We recommend naming directory .venv, since it is also ignored by git through .gitignore rules.

    python3 -m venv .venv
  2. Once you’ve created a virtual environment, you may activate it.

    source .venv/bin/activate
  3. After activating the virtual environment, you can run the pyworker module.

    python3 -m pyworker
  4. To leave the virtual environment, simply deactivate it.

    deactivate
  5. You may also want to delete the created virtual environment to free up space on your disk.

    rm -r .venv

How to run locally with Python

Prerequisites for local environment

  • Python 3.6 or higher

Steps to run in local environment

  1. Run the pyworker module.

    python3 -m pyworker

Test

TBD

Package

Through IBM Services Essentials CICD

Note: In order to use CICD tool of IBM Services Essentials platform, you must be a member of a team, have CICD service added and approved for the same team, configure a new CICD component to build and deploy from this repository. See more in the docs.

To start a new build and/or deploy activity in CICD, create a new tag trigger, then create and push a new tag in your repository.

  1. Create a new git tag matching the CICD trigger regular expression.
  2. Push the created git tag to the remote.
  3. Check the activity screen in IBM Services Essentials CICD.

Manual packaging

Build a new Docker image.

docker build --tag worker-python:0.0.1 .

Licence

Apache License 2.0

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published