semvec/pypi-packages huggingface dataset:
ppline 0.2.5
Pipeline framework.
License: MIT
Requires Python: >=3.6
Keywords: PIPELINE,PIPE

To install the library:
```bash
pip install ppline
```


# 1. About

The library `ppline` can execute any class or any sequance of classes in any order. In other words, it is able to execute both:
- a specific class from a particular python file that can contain multiple classes, or 
- an ordered sequence of specified classes from different python files.


# 2. How it works

## 2.1. Triggering a sequence of classes in order

To build a pipeline with classes to execute, you have to create a config .yml file in a root directory in the following form:

```text
steps:
    [step name]:
        exec: [relative path to a file]:[class to execute]
    [step name]:
        exec: [relative path to a file]:[class to execute]
    [step name]:
        exec: [relative path to a file]:[class to execute]
```
Let's create a config .yml file with the name `collect.yml`:

```text
steps:
    preProcessing:
        exec: src/calculation.py:Calculate
    kMeans:
        exec: src/models.py:Kmeans
    hyperTuning:
        exec: src/tuning.py:GridSearch
```

The executable classes specified in collect.yml should have a ``__call__`` method. For instance, if we open aforementioned in collect.yml file in `src/calculation.py` and look at `Calculate` class that we trigger, we see __call__ method in the end.

```python
#this is src/calculation.py

class Calculate(object):
	def sum(self):
		a=2
		b=4
		self.c=a+b

	def divide(self):
		f=4
		self.d = self.c/f

    def show_result(self):
            print(self.d)

	def __call__(self):
		self.sum()
		self.divide()
        self.show_result()
```

In order for the ppline to work, you have to make sure that 
- your code is module-enabled (you have to have `__init__.py` in every directory with `.py` files that you desire to execute classes from;
- the names of your steps in `.yml` are unique;

After creating a configuration .yml file in your root directory, use the following command to trigger the pipeline in terminal:

```bash
python -m ppline.cli --config_file collect.yml
```


## 2.2. Triggering one class from .py file
Ppline can also trigger a specific class from a specific .py file.

```bash
python -m ppline.cli --trigger_class path/to/file.py:TestClass
```

Below is an example of command that triggers a `Calculate` class from `calculation.py` file.

```bash
python -m ppline.cli --trigger_class src/calculation.py:Calculate
```
Note: `Calculate` class should have a `__call__` method that executes desired class functions, and `src/calculation.py` should contain `__init__.py` file. 


# To do

- dependency map between steps
- independent steps in parallel
- make png export of visualized pipeline w/ names


# Changes

#### `0.2.5` (2021-08-08)
- feature to trigger a single class
- feature to generate gitlab-ci.yml file from the pipeline config file
- minor bug fixes

#### `0.2.2` (2021-03-15)
- \_\_call\_\_ method is implemented 
- minor bug fixes
devdeck-slack 1.0.5
Slack deck and controls for DevDeck.
License: MIT

# DevDeck - Slack
![CI](https://github.com/jamesridgway/devdeck-slack/workflows/CI/badge.svg?branch=main)

Slack deck and controls for  [DevDeck](https://github.com/jamesridgway/devdeck).

In this example, you can manage your presence, status and do-not-disturb settings from your StreamDeck:

![Stream Deck - Slack Integration using DevDeck](https://www.jamesridgway.co.uk/content/images/2020/12/streamdeck-slack.jpg)


## Installing
Simplify install *DevDeck - Slack* into the same python environment that you have installed DevDeck.

    pip install devdeck-slack

You can then update your DevDeck configuration to use decks and controls from this package.

## Configuration

Example configuration:

    decks:
      - serial_number: "ABC123"
        name: 'devdeck.decks.single_page_deck_controller.SinglePageDeckController'
        settings:
          controls:
            - name: 'devdeck_slack.slack_deck.SlackDeck'
              key: 0
              settings:
                api_key: 'YOUR_API_KEY_GOES_HERE'
                actions:
                  - action: online
                    key: 0
                  - action: away
                    key: 1
                  - action: status
                    key: 2
                    text: At my desk
                    emoji: ':desktop_computer:'
                    clear_dnd: true
                  - action: status
                    key: 5
                    text: In a meeting
                    emoji: ':calendar:'
                  - action: status
                    key: 6
                    text: Lunch
                    emoji: ':sandwich:'
                  - action: status
                    key: 7
                    text: Off sick
                    emoji: ':face_with_thermometer:'
                    until: tomorrow at 8am
                  - action: status
                    key: 8
                    text: On holiday
                    emoji: ':palm_tree:'
                  - action: dnd
                    key: 10
                    duration: 15
                  - action: dnd
                    key: 11
                    duration: 30
                  - action: dnd
                    key: 12
                    duration: 45
                  - action: dnd
                    key: 13
                    duration: 60
                  - action: dnd
                    key: 14
                    duration: 120


## Registering your app and creating permissions
This plugin requires a Slack API key to function.

Head over to https://api.slack.com/apps to create your app.

Once you have created your app you will be able to access your OAuth Access Token under **OAuth & Permissions** - this
is your `api_key` value.

### Scopes
Under **User Token Scopes** you need want to enable the following scopes:

* `dnd:read`
* `dnd:write`
* `users.profile:write`
* `users:write`