Skip to main content

Python tools for data type handling and validation

Project description

splurge-tools

A Python package providing tools for data type handling, validation, and text processing.

Description

splurge-tools is a collection of Python utilities focused on:

  • Data type handling and validation
  • Text file processing and manipulation
  • String tokenization and parsing
  • Text case transformations
  • Delimited separated value parsing
  • Tabular data model class
  • Typed tabular data model class
  • Data validator class
  • Random data class
  • Data transformation class
  • Text normalizer class
  • Python 3.10+ compatibility

Installation

pip install splurge-tools

Features

  • type_helper.py: Comprehensive type validation and conversion utilities
  • text_file_helper.py: Text file processing and manipulation tools
  • string_tokenizer.py: String parsing and tokenization utilities
  • case_helper.py: Text case transformation utilities
  • dsv_helper.py: Delimited separated value utilities
  • tabular_data_model.py: Data model for tabular datasets
  • typed_tabular_data_model.py: Type data model based on tabular data model
  • data_validator.py: Data validator class
  • random_helper.py: Random data class and methods for generating data
  • data_transformer.py: Data transformation utility class
  • text_normalizer.py: Text normalization utility class

Development

Requirements

  • Python 3.10 or higher
  • setuptools
  • wheel

Setup

  1. Clone the repository:
git clone https://github.com/jim-schilling/splurge-tools.git
cd splurge-tools
  1. Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install development dependencies:
pip install -e ".[dev]"

Testing

Run tests using pytest:

python -m pytest tests/

Code Quality

The project uses several tools to maintain code quality:

  • Black: Code formatting
  • isort: Import sorting
  • flake8: Linting
  • mypy: Type checking
  • pytest: Testing with coverage

Run all quality checks:

black .
isort .
flake8 splurge_tools/ tests/ --max-line-length=88
mypy splurge_tools/
python -m pytest tests/ --cov=splurge_tools

Build

Build distribution:

python -m build

Changelog

[0.1.13] - 2025-06-30

Added

  • Enhanced time type handling with comprehensive test coverage
  • Added support for 12-hour time format with microseconds (e.g., "2:30:45.123456 PM")
  • Added boundary condition tests for time parsing (midnight, noon, end of day)
  • Added edge case testing for invalid time formats and invalid boundary conditions
  • Added comprehensive time type inference tests

Fixed

  • Fixed parsing bug for 4-digit time format "1430" (was incorrectly parsed as 14:03, now correctly parsed as 14:30)
  • Reordered time parsing patterns to prioritize more specific formats before general ones
  • Added missing pattern "%I:%M:%S.%f %p" for 12-hour time with microseconds and AM/PM

Changed

  • Improved time type detection and conversion robustness
  • Enhanced test coverage for time-related functionality to 96% overall coverage

[0.1.12] - 2025-06-30

  • Rename to splurge-tools

[0.1.11] - 2025-06-29

Added

  • Added String.is_time_like() and String.to_time() for time value detection and conversion in type_helper.py
  • DataType.TIME is now fully supported in type inference and profiling
  • Added tests for time detection, conversion, and inference
  • Enhanced pyproject.toml configuration following Python best practices
  • Added comprehensive development dependencies (pytest, black, isort, flake8, mypy, pre-commit)
  • Added project URLs for better discoverability
  • Added keywords and improved classifiers for PyPI
  • Added py.typed marker for type checking support
  • Added tool configurations for Black, isort, mypy, pytest, and coverage
  • Added optional dependency groups (dev, test, build)

Changed

  • Updated development workflow to use modern Python packaging standards
  • Improved test configuration with coverage reporting
  • Enhanced code formatting and import organization

Fixed

  • Code formatting issues across all modules
  • Import sorting and organization

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Jim Schilling

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

splurge_tools-0.1.13.tar.gz (39.9 kB view details)

Uploaded Source

Built Distribution

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

splurge_tools-0.1.13-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file splurge_tools-0.1.13.tar.gz.

File metadata

  • Download URL: splurge_tools-0.1.13.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for splurge_tools-0.1.13.tar.gz
Algorithm Hash digest
SHA256 cb6529e8a2e59bfedf3b3af71d6b045c60919d86c23413e2c8f4c312676c2e60
MD5 de9b5e28184e56a60edb446497cfac9f
BLAKE2b-256 bf4ddfa854ee445f8fff625bafaafaaba22012a9573a89ab549ddc31dbe0aa24

See more details on using hashes here.

File details

Details for the file splurge_tools-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: splurge_tools-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for splurge_tools-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 e5c3270192c577e81c2c8c0fd587658f73319e379fabdc9d7f15e4280bd9c4b9
MD5 f5ace16d8ef96dff0f4f13357a3645df
BLAKE2b-256 86612a6721049ce169d144d74f70ac609cffea7a1c306d09e09b1de86ced6d95

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