Skip to main content

Decision making problems.

Project description

decision

In what follows python is an alias for python3.6 or pypy3.6 or any later version (python3.7, pypy3.7 and so on).

Installation

Install the latest pip & setuptools packages versions

python -m pip install --upgrade pip setuptools

User

Download and install the latest stable version from PyPI repository

python -m pip install --upgrade decision

Developer

Download the latest version from GitHub repository

git clone https://github.com/lycantropos/decision.git
cd decision

Install

python setup.py install

Usage

>>> from decision.partition import coin_change
>>> coin_change(10, [2])
(2, 2, 2, 2, 2)
>>> coin_change(10, [2, 3])
(2, 2, 3, 3)
>>> coin_change(10, [2, 3, 4])
(2, 4, 4)
>>> coin_change(10, [2, 3, 4, 5])
(5, 5)

Development

Bumping version

Preparation

Install bump2version.

Pre-release

Choose which version number category to bump following semver specification.

Test bumping version

bump2version --dry-run --verbose $CATEGORY

where $CATEGORY is the target version number category name, possible values are patch/minor/major.

Bump version

bump2version --verbose $CATEGORY

This will set version to major.minor.patch-alpha.

Release

Test bumping version

bump2version --dry-run --verbose release

Bump version

bump2version --verbose release

This will set version to major.minor.patch.

Running tests

Install dependencies

python -m pip install -r requirements-tests.txt

Plain

pytest

Inside Docker container:

  • with CPython
    docker-compose --file docker-compose.cpython.yml up
    
  • with PyPy
    docker-compose --file docker-compose.pypy.yml up
    

Bash script:

  • with CPython

    ./run-tests.sh
    

    or

    ./run-tests.sh cpython
    
  • with PyPy

    ./run-tests.sh pypy
    

PowerShell script:

  • with CPython
    .\run-tests.ps1
    
    or
    .\run-tests.ps1 cpython
    
  • with PyPy
    .\run-tests.ps1 pypy
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decision-0.3.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

decision-0.3.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file decision-0.3.1.tar.gz.

File metadata

  • Download URL: decision-0.3.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for decision-0.3.1.tar.gz
Algorithm Hash digest
SHA256 346038b3fac278fe0ce60e8b8d52845f07a83990fdd134737e9c11658e1421aa
MD5 b920d5e95a24bdd0d85c0ff4793c6d1d
BLAKE2b-256 228dddb8e8b35fc9157ed7b68ec6b310d0502e249a68e0c8284b0c48f7b10f5d

See more details on using hashes here.

Provenance

File details

Details for the file decision-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: decision-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for decision-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2575cd18b8dcc11ad11fd05b0cb849f75de1756cbfc42663750cd3741d30c75c
MD5 1a09c85d9d8504e1fbc782be2d93c2cc
BLAKE2b-256 26b2adf47d8dfd4e6e9ffe6d4d9d58a2a666628644e3be9515c8dc0ef0b337b7

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page