Skip to content

feat(DAK): Increase test coverage to 92% and migrate ULID#12

Merged
rickhohler merged 3 commits intomainfrom
feature/dak-test-coverage-and-ulid
Dec 20, 2025
Merged

feat(DAK): Increase test coverage to 92% and migrate ULID#12
rickhohler merged 3 commits intomainfrom
feature/dak-test-coverage-and-ulid

Conversation

@rickhohler
Copy link
Collaborator

@rickhohler rickhohler commented Dec 20, 2025

Description

This PR significantly improves the test coverage of DesignAlgorithmsKit, reaching 92.88%, satisfying the >90% requirement. It also migrates the ULID implementation from InventoryKit to DesignAlgorithmsKit.

Key Changes

  • ULID Migration: Moved InventoryULID to DesignAlgorithmsKit.ULID to provide a generic unique identifier implementation.
  • Coverage Increase: Test coverage increased from ~86% to 92.88%.
  • New Tests:
    • HashAlgorithm and HashStrategy
    • JobManager (concurrency, cancellation, failures)
    • ProcessingQueue (failures, removal, maxConcurrent)
    • ResourceCoordinator (multiple writers, contention)
    • Composite, ThreadSafe, Command, Pipeline
  • Fixes:
    • Enabled previously excluded BloomFilter and MerkleTree tests.
    • Resolved build warnings (unused results).

Validation

  • Build: Clean (0 errors, 0 warnings).
  • Tests: 283/283 tests passed.
  • Coverage: 92.88% line coverage.

Checklist

  • Code fulfills requirements
  • Tests pass
  • Documentation updated

- Implements GitObjectLayout for generating git-style directory paths from hashes
- Adds unit tests for layout generation
- Fixes redundant public modifier warning in HashAlgorithmProtocol
This PR significantly improves the test coverage of DesignAlgorithmsKit, reaching 92.88%, satisfying the >90% requirement.

Key Changes:
- Migrated  from InventoryKit to DesignAlgorithmsKit as a generic identifier.
- Added comprehensive unit tests for:
  -  and
  -  (concurrency, cancellation, failures)
  -  (failures, removal, maxConcurrent)
  -  (multiple writers, contention)
  - Version: ImageMagick 7.1.2-10 Q16-HDRI aarch64 23464 https://imagemagick.org
Copyright: (C) 1999 ImageMagick Studio LLC
License: https://imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib fontconfig freetype heic jng jp2 jpeg jxl lcms lqr ltdl lzma openexr png raw tiff uhdr webp xml zip zlib zstd
Compiler: clang (17.0.0)
Usage: Composite [options ...] image [options ...] composite
  [ [options ...] mask ] [options ...] composite

Image Settings:
  -affine matrix       affine transform matrix
  -alpha option        on, activate, off, deactivate, set, opaque, copy
                       transparent, extract, background, or shape
  -authenticate password
                       decipher image with this password
  -blue-primary point  chromaticity blue primary point
  -colorspace type     alternate image colorspace
  -comment string      annotate image with comment
  -compose operator    composite operator
  -compress type       type of pixel compression when writing the image
  -define format:option
                       define one or more image format options
  -depth value         image depth
  -density geometry    horizontal and vertical density of the image
  -display server      get image or font from this X server
  -dispose method      layer disposal method
  -dither method       apply error diffusion to image
  -encoding type       text encoding type
  -endian type         endianness (MSB or LSB) of the image
  -filter type         use this filter when resizing an image
  -font name           render text with this font
  -format "string"     output formatted image characteristics
  -gravity type        which direction to gravitate towards
  -green-primary point chromaticity green primary point
  -interlace type      type of image interlacing scheme
  -interpolate method  pixel color interpolation method
  -label string        assign a label to an image
  -limit type value    pixel cache resource limit
  -matte               store matte channel if the image has one
  -monitor             monitor progress
  -page geometry       size and location of an image canvas (setting)
  -pointsize value     font point size
  -quality value       JPEG/MIFF/PNG compression level
  -quiet               suppress all warning messages
  -red-primary point   chromaticity red primary point
  -regard-warnings     pay attention to warning messages
  -respect-parentheses settings remain in effect until parenthesis boundary
  -sampling-factor geometry
                       horizontal and vertical sampling factor
  -scene value         image scene number
  -seed value          seed a new sequence of pseudo-random numbers
  -size geometry       width and height of image
  -support factor      resize support: > 1.0 is blurry, < 1.0 is sharp
  -synchronize         synchronize image to storage device
  -taint               declare the image as modified
  -transparent-color color
                       transparent color
  -treedepth value     color tree depth
  -tile                repeat composite operation across and down image
  -units type          the units of image resolution
  -verbose             print detailed information about the image
  -virtual-pixel method
                       virtual pixel access method
  -white-point point   chromaticity white point

Image Operators:
  -blend geometry      blend images
  -border geometry     surround image with a border of color
  -bordercolor color   border color
  -channel mask        set the image channel mask
  -colors value        preferred number of colors in the image
  -decipher filename    convert cipher pixels to plain pixels
  -displace geometry   shift lookup according to a relative displacement map
  -dissolve value      dissolve the two images a given percent
  -distort geometry    shift lookup according to a absolute distortion map
  -encipher filename   convert plain pixels to cipher pixels
  -extract geometry    extract area from image
  -geometry geometry   location of the composite image
  -identify            identify the format and characteristics of the image
  -monochrome          transform image to black and white
  -negate              replace every pixel with its complementary color
  -profile filename    add ICM or IPTC information profile to image
  -quantize colorspace reduce colors in this colorspace
  -repage geometry     size and location of an image canvas (operator)
  -rotate degrees      apply Paeth rotation to the image
  -resize geometry     resize the image
  -sharpen geometry    sharpen the image
  -shave geometry      shave pixels from the image edges
  -stegano offset      hide watermark within an image
  -stereo geometry     combine two image to create a stereo anaglyph
  -strip               strip image of all profiles and comments
  -thumbnail geometry  create a thumbnail of the image
  -transform           affine transform image
  -type type           image type
  -unsharp geometry    sharpen the image
  -watermark geometry  percent brightness and saturation of a watermark
  -write filename      write images to this file

Image Stack Operators:
  -swap indexes        swap two images in the image sequence

Miscellaneous Options:
  -debug events        display copious debugging information
  -help                print program options
  -list type           print a list of supported option arguments
  -log format          format of debugging information
  -version             print version information

By default, the image format of 'file' is determined by its magic
number.  To specify a particular image format, precede the filename
with an image format name and a colon (i.e. ps:image) or specify the
image type as the filename suffix (i.e. image.ps).  Specify 'file' as
'-' for standard input or output., , ,
- Enabled previously excluded  and  tests.
- Fixed various build warnings (unused results).
- Coverage increased from ~86% to 92.88%.
@codecov
Copy link

codecov bot commented Dec 20, 2025

Codecov Report

❌ Patch coverage is 66.94915% with 39 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rithmsKit/Algorithms/Crypto/HybridEncryption.swift 0.00% 37 Missing ⚠️
...AlgorithmsKit/Algorithms/Identification/ULID.swift 97.05% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@rickhohler rickhohler merged commit 4cc8e1a into main Dec 20, 2025
1 of 2 checks passed
@rickhohler rickhohler deleted the feature/dak-test-coverage-and-ulid branch December 20, 2025 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant