semvec/pypi-packages huggingface dataset:
circleci-envs-cli 0.1.1
CLI tool for manage CircleCI contexts and environment vars
License: MIT
Requires Python: >=3.7
Keywords: circleci cli api

# circleci-envs-cli
CLI tool for manage CircleCI contexts and environment vars

## Installation
### Install locally
```
pip install -r requirements.txt
./circleci_envs_cli.py [OPTIONS]
```

### Install via Pip
```
pip install circleci-envs-cli
```

### Install via Docker
```
docker run --rm phsmith/circleci-envs-cli:latest [OPTIONS]
```

## Usage

A [CircleCI personal API token](https://circleci.com/docs/managing-api-tokens/#creating-a-personal-api-token) must be create before use this tool.

> All options can be specified as environment variables in the format: `CIRCLE_<OPTION>`.
>
> Example: `CIRCLE_TOKEN=********`

```
Usage: circleci-envs-cli [OPTIONS]

  CLI tool for manage CircleCI contexts and environment vars

Options:
  -u, --api-url <circleci_api_url>
                                  [default: https://circleci.com/api]
  -t, --token <circleci_token>    [default: (CIRCLE_TOKEN)]
  -c, --context <context_name>    It will ask for create if does not exists
  -p, --project <project_slug>    Example: github/org-name/project-name
                                  [required]
  -e, --env <environment_var>
  -ef, --env-file <environment_vars_file>
  -d, --delete                    Context only, will delete the context
                                  Context + vars, will delete the context vars
                                  Vars only, will delete the environment vars
  -ot, --owner-type <owner_type>  [default: organization]
  --debug
  --help                          Show this message and exit.
```

### Examples

#### Add project environment variables
```
$ circleci-envs-cli -p github/myorg/myproject -e KEY1=VAL1 -e KEY2=VAL2 -ef project.envs.txt
> Successfully add/update variable: KEY1
> Successfully add/update variable: KEY2
> Successfully add/update variable: KEY3
> Successfully add/update variable: KEY4
```

#### Delete project environment variables
```
$ circleci-envs-cli -p github/myorg/myproject -e KEY1 -e KEY2 -d
> Successfully delete variable: KEY1
> Successfully delete variable: KEY2
```

#### Create/update a context and add variables
```
$ circleci-envs-cli -p github/myorg/myproject -c mycontext -e KEY1=VAL1 -e KEY2=VAL2
The context named "mycontext" was not found. Do you want to create it? [y/n]: y
> Successfully create context: mycontext
> Successfully add/update context variable: KEY1
> Successfully add/update context variable: KEY2
```

#### Delete context variables
```
$ circleci-envs-cli -p github/myorg/myproject -c mycontext -e KEY1 -e KEY2 -d
> Successfully delete context variable: KEY1
> Successfully delete context variable: KEY2
```

#### Delete context
```
$ circleci-envs-cli -p github/myorg/myproject -c mycontext -d
Are you sure want to delete the context "mycontext"? [y/n]: y
> Successfully delete context
```
tinyspline 0.6.0.post2
Spline Library for a Multitude of Programming Languages
License: MIT

TinySpline is a small, yet powerful library for interpolating, transforming, and querying arbitrary NURBS, B-Splines, and Bézier curves. The core of the library is written in ANSI C (C89) with a C++ wrapper for an object-oriented programming model. Based on the C++ wrapper, auto-generated bindings for C#, D, Go, Java, Javascript, Lua, Octave, PHP, Python, R, and Ruby are provided.
cvrplib 0.1.2
Python library for reading and downloading CVRPLIB instances.
License: MIT
Requires Python: >=3.7,<4.0

# DEPRECATED
This package has been renamed to [`vrplib`](https://github.com/leonlan/VRPLIB). Use `pip install vrplib` instead.

# CVRPLIB
This Python package provides functions to read and download instances from the Capacitated Vehicle Routing Problem Library ([CVRPLIB](http://vrp.atd-lab.inf.puc-rio.br/index.php/en/)). CVRPLIB contains a large collection of CVRP and VRPTW benchmark instances and also keeps track of the currently best known solutions.


# Installation
This library works with Python 3.7+.

```shell
pip install cvrplib
```


# Usage
Using this package is simple. We expose three functions:

-   `read`: Read an instance (and optionally solution) from a local file.
-   `download`: Download an instance (and optionally solution) directly from the CVRPLIB website.
-   `list_names`: List all instance names that can be passed to `download`.


## Example
```python
import cvrplib

# Read instances
instance = cvrplib.read('/path/to/A-n32-k5.vrp')
instance, solution = cvrplib.read(instance_path='/path/to/A-n32-k5.vrp',
                                  solution_path='/path/to/A-n32-k5.sol')

# Download instances
instance = cvrplib.download('A-n32-k5')
instance, solution = cvrplib.download('A-n32-k5', solution=True)

# List instance names 
cvrplib.list_names()                      # All instance names
cvrplib.list_names(low=100, high=200)     # Instances with between [100, 200] customers
cvrplib.list_names(vrp_type='vrptw')      # Only VRPTW instances
```
## Dataclasses
Instance fields depend on the VRP type of the instance. `Instance` defines the base instance, which is extended by the `CVRP` and `VRPTW` classes. `Solution` defines the solution and is the same for CVRP and VRPTW. 
```python
class Instance:
    name: str
    dimension: int
    n_customers: int
    depot: int
    customers: List[int]
    capacity: int
    distances: List[List[float]]
    demands: List[int]
    service_times: List[float]
    coordinates: Optional[List[List[float]]]

class CVRP(Instance):
    distance_limit: float

class VRPTW(Instance):
    n_vehicles: int
    earliest: List[int]
    latest: List[int]

class Solution:
    routes: List[int]
    cost: float
```

     
# Conventions
All instances are parsed according to the CVRPLIB convention. See Section 3.3 in [Uchoa et al. (2014)](http://www.optimization-online.org/DB_FILE/2014/10/4597.pdf) for more details. In short:
- The depot has index `0`. Customers are indexed from `1` to `n`.
- The distances are rounded to the nearest integer. 
    - Note that some benchmark sets were originally proposed without integer rounding. This is the case for the following sets: `CMT`, `Rochat and Taillard (tai)`, `Golden`, `Li`, `Solomon`, `Homberger and Gehring`.
    
# Remarks
- Downloading instances may take a few seconds. 
- The `XML100` benchmark set is not listed in `list_names` and cannot be downloaded using `download`. Please download these instances directly from [CVRPLIB](http://vrp.atd-lab.inf.puc-rio.br/index.php/en/) and use the `read` function instead.