Skip to main content

Helper methods for generating synthetic data for testing and development.

Project description

synthetic-data-generators

github-release implementation version 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 a set of tools for generating synthetic data for various use cases. The package includes a variety of data generators, including random number generators, text generators, image generators, and time series generators. The package is designed to be easy to use and flexible, allowing users to customize the generated data to meet their specific needs.

Key URLs

For reference, these URL's are used:

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

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 synthetic-data-generators
    
  2. Or, in your requirements.txt file, add:

    synthetic-data-generators
    

    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]
    synthetic-data-generators = "*"
    

    Then run:

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

    synthetic-data-generators
    

    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 synthetic-data-generators
    

Using poetry:

  1. In your pyproject.toml file, add:

    [project]
    dependencies = [
        synthetic-data-generators = "*",
    ]
    

    Then run:

    poetry install
    
  2. Or just run this:

    poetry add synthetic-data-generators
    poetry install
    poetry sync
    

Using uv:

  1. In your pyproject.toml file, add:

    [project]
    dependencies = [
        synthetic-data-generators = "*",
    ]
    

    Then run:

    uv sync
    
  2. Or just run this:

    uv add synthetic-data-generators
    uv 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 run pre-commit autoupdate
      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 run pre-commit autoupdate
      python3 -m poetry shell
      
    3. With poetry on Windows:

      python -m pip install --upgrade pip
      python -m pip install poetry
      python -m poetry config virtualenvs.create true
      python -m poetry config virtualenvs.in-project true
      python -m poetry init
      python -m poetry lock
      python -m poetry install --no-interaction --with dev,docs,test
      python -m poetry run pre-commit install
      python -m poetry run pre-commit autoupdate
      python -m poetry shell
      
    4. With poetry on Linux:

      python3 -m pip install --upgrade pip
      python3 -m pip install poetry
      python3 -m poetry config virtualenvs.create true
      python3 -m poetry config virtualenvs.in-project true
      python3 -m poetry init
      python3 -m poetry lock
      python3 -m poetry install --no-interaction --with dev,docs,test
      python3 -m poetry run pre-commit install
      python3 -m poetry run pre-commit autoupdate
      python3 -m poetry shell
      
    5. With uv on Windows:

      python -m pip install --upgrade pip
      python -m pip install uv
      python -m uv sync --all-groups
      python -m uv run pre-commit install
      python -m uv run pre-commit autoupdate
      
    6. With uv on Linux:

      python3 -m pip install --upgrade pip
      python3 -m pip install uv
      python3 -m uv sync --all-groups
      python3 -m uv run pre-commit install
      python3 -m uv run pre-commit autoupdate
      
  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

    uv run src/utils/scripts.py check
    
  • Or run them individually:

    • Black

      uv run src/utils/scripts.py check-black
      
    • PyTests:

      uv run src/utils/scripts.py check-pytest
      
    • MyPy:

      uv run src/utils/scripts.py 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

synthetic_data_generators-1.2.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synthetic_data_generators-1.2.0-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file synthetic_data_generators-1.2.0.tar.gz.

File metadata

File hashes

Hashes for synthetic_data_generators-1.2.0.tar.gz
Algorithm Hash digest
SHA256 78c28315e5728f7519685c2fab5104cd33a2b3ccef6510302376e32aade1de87
MD5 f993b2014d6e42228b7413b06a4aabeb
BLAKE2b-256 f4f3fcb234277d6f6c3d17531447e04beb8f5e5402025e02a43942f6a4ad7673

See more details on using hashes here.

File details

Details for the file synthetic_data_generators-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for synthetic_data_generators-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a9cc11de5028213e0ac3c7ef0afc63bc27ef820e7f1d7c97c880d289dcd7d0c
MD5 4bbec9f58509985e9b6865e7736ddaeb
BLAKE2b-256 d224ccf524f545bff27351e9e35f9fc54ac8a4c73b32764ad95f774f52ccbc95

See more details on using hashes here.

Supported by

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