semvec/pypi-packages huggingface dataset:
enumatch 0.2.0
Strictly match all the possibilities of an enum
License: MIT
Requires Python: >=3.6,<4.0
Keywords: enum,match,functional

enumatch
========

[![PyPI version](https://img.shields.io/pypi/v/enumatch.svg)](https://pypi.org/project/enumatch)
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/enumatch.svg)](https://pypi.org/project/enumatch)
[![Test Coverage](https://api.codeclimate.com/v1/badges/36a72f1bf1a4979a765c/test_coverage)](https://codeclimate.com/github/sayanarijit/enumatch/test_coverage)

Strictly match all the possibilities of an enum.

Use case
--------

This little `match` function makes matching Python's enum fields safer by forcing
us to match all the possibilities either explicitly or by using a wildcard.

Use `...` (ellipsis) for the wildcard.


> ***TIPs***
> 
> - Avoid the use of `...` (wildcard) to make sure any modification to the enums are safe.
> - Create the matcher at compile-time to have compile-time validation and zero runtime cost.


Example: Flat matcher
---------------------

```python
from enum import Enum, auto
from enumatch import match

class Side(Enum):
    left = auto()
    right = auto()

# Define a simple matcher
matcher1 = match({Side.left: "Go left", Side.right: "Go right"})

assert matcher1[Side.left] == "Go left"
assert matcher1[Side.right] == "Go right"

# Define a matcher with a default case
matcher2 = match({Side.left: "Go left", ...: "Go right"})

assert matcher2[Side.left] == "Go left"
assert matcher2[Side.right] == "Go right"

# If all the possibilities are not handled, we get error
with pytest.raises(ValueError, match="missing possibilities: Side.right"):
    match({Side.left: "Go left"})
```


Example: Nested matcher
-----------------------

```python
from enum import Enum, auto
from enumatch import match, forall

class Switch(Enum):
    on = auto()
    off = auto()

# is_on[main_switch][bedroom_switch]: bool
is_on = match({
    Switch.on: match({Switch.on: True, Switch.off: False}),
    Switch.off: forall(Switch, False),
})

assert is_on[Switch.on][Switch.on] == True
assert is_on[Switch.on][Switch.off] == False
assert is_on[Switch.off][Switch.on] == False
assert is_on[Switch.off][Switch.off] == False
```
bmlx-argo-workflows 1.0.5
Community Maintained Python client for Argo Workflows
License: MIT

# Argo Workflows Python Client

Python client for Argo Workflows (bigo 内部使用版本)

![](https://github.com/argoproj-labs/argo-client-python/workflows/CI/badge.svg)


#### 为什么要维护bigo 内部的版本？  
    github上官方的版本的代码是使用官方的 openapi-generator-cli (https://github.com/OpenAPITools/openapi-generator)  自动生成  
    生成的代码中 openapi model 的 to_dict 函数产生的dict 如果直接去序列化到json，则无法被argo 的golang package 正确解析。  
    因此需要对官方版本的 to_dict 方法进行改写，从而可以让 bmlx client端产生的argo workflow的json 文件被bmlx api-server端正确解析。  

#### 开发  
  1. 本地需要在 /usr/local/openapi/ 目录下安装 openapi-generator-cli.jar (从 https://github.com/gtarcoder/openapi-generator 下载编译)  
  2. 本地修改代码之后，执行 make client 产生最新的sdk 代码  
  3. 修改 argo/workflows/client/__about__.py 中的 __version__ 为新的版本号  
  4. 将改动提交到远端，并触发CICD， CICD 会自动打包新的python package 并发布到私有 pypi 服务器  
   

#### 使用  
```bash
pip install bmlx-argo-workflows #(需要设置好私有pypi 源)  
```