philwalk / uni   0.6.2

Apache License 2.0 GitHub

universal alternative to java.nio.file.Paths that understands MSYS2 filesystem paths and works everywhere

Scala versions: 3.x

Universal Scripting Library

A comprehensive Scala library for portable scripting, data processing, and scientific computing.

Overview

The Universal Scripting Library (uni) provides a complete toolkit for writing portable, cross-platform scripts in Scala. Whether you're processing data files, performing linear algebra operations, or building command-line tools, uni offers a familiar, NumPy-inspired API with the safety and performance of Scala.

Key Features

  • πŸ–₯️ Portable Programming - Write once, run anywhere (Windows, macOS, Linux)
  • πŸ“Š Data Import & Processing - CSV parsing, date/time handling, data cleaning
  • πŸ”’ Linear Algebra - NumPy-compatible matrix operations with 99% API coverage
  • ⚑ Performance - BLAS-optimized operations, zero-copy views, efficient broadcasting
  • βœ… Reliability - 1461+ comprehensive tests ensuring correctness

Documentation

Write scripts that work seamlessly across all platforms:

  • Cross-platform file paths and operations
  • Environment variable handling
  • Process execution and piping
  • Platform-specific conditionals
  • Resource management

Build professional command-line tools:

  • Argument parsing with type safety
  • Flag and option handling
  • Subcommand support
  • Automatic help generation
  • Validation and error handling

πŸ“₯ Importing Data

Comprehensive data import capabilities:

  • Parse various date/time formats to LocalDateTime
  • Handle ISO 8601, RFC 3339, custom formats
  • Timezone-aware parsing
  • Flexible format detection
  • Fast CSV parsing with configurable delimiters
  • Header detection and custom column names
  • Type inference and conversion
  • Handle quoted fields, escaped characters
  • Memory-efficient streaming
  • Load matrices from CSV/TSV files
  • Direct NumPy .npy file import
  • Integration with Mat library
  • Automatic type conversion

πŸ”’ Linear Algebra

Complete NumPy-compatible matrix operations:

Quick Example:

TODO

Documentation

Essential operations to get started:

Comprehensive documentation with examples from all 1461 tests: