Skip to main content

No project description provided

Project description

prioq

In what follows python is an alias for python3.7 or pypy3.7 or any later version (python3.8, pypy3.8 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 prioq

Developer

Download the latest version from GitHub repository

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

Install dependencies

python -m pip install -r requirements.txt

Install

python setup.py install

Usage

>>> from prioq.base import PriorityQueue
>>> queue = PriorityQueue(*range(10))
>>> len(queue)
10
>>> queue.peek()
0
>>> queue.pop()
0
>>> len(queue)
9
>>> queue.peek()
1
>>> queue.push(0)
>>> len(queue)
10
>>> queue.peek()
0

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

prioq-0.6.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

prioq-0.6.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file prioq-0.6.0.tar.gz.

File metadata

  • Download URL: prioq-0.6.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for prioq-0.6.0.tar.gz
Algorithm Hash digest
SHA256 af4bf4f973e9b0b20e84c980539c613042d7b7cd11bfdd7294ae2118a57e585c
MD5 85cccf9606689f2895040192c428e14c
BLAKE2b-256 d8dfe9520d667389fa7624d262ad861c5ce05b1230d1072d4b99111744e6cd19

See more details on using hashes here.

File details

Details for the file prioq-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: prioq-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.2

File hashes

Hashes for prioq-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24c7e138766fa4a2946fd959684a2e9c029df5134499152cff371dd346b3e7e0
MD5 6d0f999213807bc5af12a0951dbcd776
BLAKE2b-256 a6cc10dc07727368415217928cd166facad5a429041df38f605ac0c70006ced7

See more details on using hashes here.

Supported by

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