Skip to content

pre-release/v0.0.1

Latest

Choose a tag to compare

@karnsab karnsab released this 01 Aug 21:09
· 2 commits to main since this release
3a045df

PyCommon Library Release (v0.0.1)

Overview

This PR represents the first official pre-release of the PyCommon library, transforming it from a collection of utility files to a proper Python package with comprehensive documentation, test coverage, and improved functionality.

Major Changes

Package Restructuring

  • Converted the codebase to a proper installable Python package (pycommon)
  • Added pyproject.toml with complete package configuration
  • Reorganized code structure for better modularity
  • Moved all modules under the pycommon namespace

New Features

1. File Operations

  • Added comprehensive file upload functionality
  • Implemented file deletion capability with proper key sanitization
  • Added AWS Lambda codebase scanning with exclusion filtering

2. User Management

  • Enhanced Amplify user validation to handle multiple emails
  • Added user data loading functionality
  • Implemented email suggestion capabilities
  • Improved access type management

3. API Operations

  • Added API tools registration handler for Lambda operations
  • Enhanced debugging and error handling in authorization functions
  • Fixed JSON validation for nested data structures
  • Added support for multiple event formats in validation

4. LLM Integration

  • Added new LLM chat common utilities
  • Enhanced token format support

5. Data Handling

  • Updated CustomPydanticJSONEncoder to use SmartDecimalEncoder
  • Improved validation for empty schemas
  • Enhanced rate limit handling

Bug Fixes

  • Fixed get_claims function to handle missing accounts gracefully
  • Fixed request data body parsing in _parse_and_validate function
  • Fixed api_tools route data initialization and condition checks
  • Fixed typos in function names and updated API endpoints
  • Corrected JSON validation for nested data structures

Documentation & Testing

  • Added detailed README with comprehensive project description
  • Added specific README for validation and authorization system
  • Expanded development setup documentation with command examples
  • Added detailed docstrings for file upload functions
  • Increased test coverage to 100% across all modules
  • Restructured tests to match the new package organization

Development Tools

  • Updated Makefile with additional development commands
  • Enhanced test coverage configuration
  • Updated GitHub workflow for tests and coverage
  • Improved pre-commit configuration

Stats

  • 68 files changed
  • 9,945 insertions(+), 291 deletions(-)
  • Package version: v0.0.1

Testing & Verification

All tests are passing with 100% coverage. The package has been restructured as a proper Python library that can be installed via pip.

Breaking Changes

  • The import structure has changed - all imports should now use the pycommon namespace
  • Some function signatures have been modified for improved type safety
  • Environment variable requirements are now more strictly enforced