Skip to main content

Helper files/functions/classes for generic Python processes

Project description

toolbox-python

version github-release implementation python-versions os pypi-status pypi-format github-license pypi-downloads codecov-repo style
contributions
CI CD

Introduction

The purpose of this package is to provide some helper files/functions/classes for generic Python processes.

Key URLs

For reference, these URL's are used:

Type Source URL
Git Repo GitHub https://github.com/data-science-extensions/toolbox-python
Python Package PyPI https://pypi.org/project/toolbox-python
Package Docs ... ...

Installation

You can install and use this package multiple ways by using pip, pipenv, or poetry.

Using pip:

  1. In your terminal, run:

    python3 -m pip install --upgrade pip
    python3 -m pip install toolbox-python
    
  2. Or, in your requirements.txt file, add:

    toolbox-python
    

    Then run:

    python3 -m pip install --upgrade pip
    python3 -m pip install --requirement=requirements.txt
    

Using pipenv:

  1. Install using environment variables:

    In your Pipfile file, add:

    [[source]]
    url = "https://pypi.org/simple"
    verify_ssl = false
    name = "pypi"
    
    [packages]
    toolbox-python = "*"
    

    Then run:

    python3 -m pip install pipenv
    python3 -m pipenv install --verbose --skip-lock --categories=root index=pypi toolbox-python
    
  2. Or, in your requirements.txt file, add:

    toolbox-python
    

    Then run:

    python3 -m run pipenv install --verbose --skip-lock --requirements=requirements.txt
    
  3. Or just run this:

    python3 -m pipenv install --verbose --skip-lock toolbox-python
    

Using poetry:

  1. In your pyproject.toml file, add:

    [tool.poetry.dependencies]
    toolbox-python = "*"
    

    Then run:

    poetry install
    
  2. Or just run this:

    poetry add toolbox-python
    poetry install
    poetry sync
    

Contribution

Contribution is always welcome.

  1. First, either fork or branch the main repo.

  2. Clone your forked/branched repo.

  3. Build your environment:

    1. With pipenv on Windows:

      if (-not (Test-Path .venv)) {mkdir .venv}
      python -m pipenv install --requirements requirements.txt --requirements requirements-dev.txt --skip-lock
      python -m poetry run pre-commit install
      python -m poetry shell
      
    2. With pipenv on Linux:

      mkdir .venv
      python3 -m pipenv install --requirements requirements.txt --requirements requirements-dev.txt --skip-lock
      python3 -m poetry run pre-commit install
      python3 -m poetry shell
      
    3. With poetry on Windows:

      python -m pip install --upgrade pip
      python -m pip install poetry
      python -m poetry init
      python -m poetry add $(cat requirements/root.txt)
      python -m poetry add --group=dev $(cat requirements/dev.txt)
      python -m poetry add --group=test $(cat requirements/test.txt)
      python -m poetry add --group=docs $(cat requirements/docs.txt)
      python -m poetry install
      python -m poetry run pre-commit install
      python -m poetry shell
      
    4. With poetry on Linux:

      python3 -m pip install --upgrade pip
      python3 -m pip install poetry
      python3 -m poetry init
      python3 -m poetry add $(cat requirements/root.txt)
      python3 -m poetry add --group=dev $(cat requirements/dev.txt)
      python3 -m poetry add --group=test $(cat requirements/test.txt)
      python3 -m poetry add --group=docs $(cat requirements/docs.txt)
      python3 -m poetry install
      python3 -m poetry run pre-commit install
      python3 -m poetry shell
      
  4. Start contributing.

  5. When you're happy with the changes, raise a Pull Request to merge with the main branch again.

Build and Test

To ensure that the package is working as expected, please ensure that:

  1. You write your code as per PEP8 requirements.
  2. You write a UnitTest for each function/feature you include.
  3. The CodeCoverage is 100%.
  4. All UnitTests are passing.
  5. MyPy is passing 100%.

Testing

  • Run them all together

    poetry run make check
    
  • Or run them individually:

    • Black

      poetry run make check-black
      
    • PyTests:

      poetry run make ckeck-pytest
      
    • MyPy:

      poetry run make check-mypy
      

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

toolbox_python-0.10.1.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

toolbox_python-0.10.1-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file toolbox_python-0.10.1.tar.gz.

File metadata

  • Download URL: toolbox_python-0.10.1.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Linux/6.5.0-1025-azure

File hashes

Hashes for toolbox_python-0.10.1.tar.gz
Algorithm Hash digest
SHA256 0c3fc0e3dd1fad5772de976fa981639c5014f92b40f1c2a9182056f86688ee4e
MD5 5bce1db0d2ea3466815ee598fe77d6b8
BLAKE2b-256 a99e7bda4a332e4e7154af3ed0630e858065af7a50b8822365af12ae529e2f5a

See more details on using hashes here.

File details

Details for the file toolbox_python-0.10.1-py3-none-any.whl.

File metadata

  • Download URL: toolbox_python-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Linux/6.5.0-1025-azure

File hashes

Hashes for toolbox_python-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b66a53505c9d5bd330de87d5b62fd2651442933431b5a25fb794660b1efb440
MD5 022b0ebe0e6c651f85ab5d014b6fb4bb
BLAKE2b-256 fcbdec5d06a2a912783665ea30e5bc9ed5d1a91f8d42a0428f6ebd341e835b50

See more details on using hashes here.

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