<commit_before>

# dex-image-build expects __imsgstr and builds images(s) from detected sources.
#  accepts [optional] namespace, sets __built_images array.
#
# usage: dex-image-build [namespace]
#    ex: __imgstr="alpine" ; dex-image-build => 1: __built_images=( "dex/v1/alpine:latest" )
#    ex: __imgstr="alpine" ; dex-image-build dex/v1-install => 1: __built_images=( "dex/v1-install/alpine:latest" )
#    ex: __imgstr="invalid-image-name" ; dex-image-build => 1: __built_images=( )

dex-image-build(){
  # when installing, we prefix with "dex/$DEX_API-install"
  local namespace=${1:-$DEX_NAMESPACE}
  local __built_images=()

  [ -z "$__imgstr" ] && error_exception \
    "image-build requires an [repository/]<image>[:tag] imgstr"

  dex-detect-imgstr $__imgstr || error "lookup failed to parse $__imgstr"

  for repo_dir in $(ls -d $DEX_HOME/checkouts/$__source_match 2>/dev/null); do
    for image_dir in $(ls -d $repo_dir/images/$__image_match 2>/dev/null); do<commit_msg>fix __built_images export when building images<commit_after>

# dex-image-build expects __imsgstr and builds images(s) from detected sources.
#  accepts [optional] namespace, sets __built_images array.
#
# usage: dex-image-build [namespace]
#    ex: __imgstr="alpine" ; dex-image-build => 1: __built_images=( "dex/v1/alpine:latest" )
#    ex: __imgstr="alpine" ; dex-image-build dex/v1-install => 1: __built_images=( "dex/v1-install/alpine:latest" )
#    ex: __imgstr="invalid-image-name" ; dex-image-build => 1: __built_images=( )

dex-image-build(){
  # when installing, we prefix with "dex/$DEX_API-install"
  local namespace=${1:-$DEX_NAMESPACE}
  __built_images=()

  [ -z "$__imgstr" ] && error_exception \
    "image-build requires an [repository/]<image>[:tag] imgstr"

  dex-detect-imgstr $__imgstr || error "lookup failed to parse $__imgstr"

  for repo_dir in $(ls -d $DEX_HOME/checkouts/$__source_match 2>/dev/null); do
    for image_dir in $(ls -d $repo_dir/images/$__image_match 2>/dev/null); do
{'fraction_non_alphanumeric': 0.15268709191361124, 'fraction_numerical': 0.009040683073832245, 'mean_word_length': 4.518005540166205, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2312238', 'n_tokens_mistral': 732, 'n_tokens_neox': 695, 'n_words': 163}