<commit_before>ut    = require('upon').ut
merge = require('deepmerge')

# Fills in the input with convenient niceties / default settings.

module.exports = (input, further) ->

  # Location of the ephemeris data, unless explicitly elsewhere.
  input.data ?= "node_modules/gravity/data"

  # Insist the data path be absolute - relative means relative to precious.
  unless input.data?.match /^\//
    input.data = "#{__dirname}/../#{input.data}"

  # Unless input.ut is set (unlikely), converts input.utc (optional) to it.
  # No input.utc does _now_.
  input.ut = ut.c(input.utc) unless input.ut?

  # In case nothing specific is asked for.
  # Get the planets - longitude and speed.
  input.stuff ?= [
      [0, 3]
      [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
      []
    ]

  # No houses, unless both geo-coordinates and house system preference given.
  input.houses ?= false

  # Extra needs to be present, because of the deepmerge below.
  input.extra ?= {}

  # Keep it here (last), in part because of a deepmerge bug.
  # Can't merge a key of key that doesn't exist in the first place...
  input = merge input, further if further?

  input<commit_msg>[About: #30463109] deepmerge issue fixed<commit_after>ut    = require('upon').ut
merge = require('deepmerge')

# Fills in the input with convenient niceties / default settings.

module.exports = (input, further) ->

  # Location of the ephemeris data, unless explicitly elsewhere.
  input.data ?= "node_modules/gravity/data"

  # Insist the data path be absolute - relative means relative to precious.
  unless input.data?.match /^\//
    input.data = "#{__dirname}/../#{input.data}"

  # Unless input.ut is set (unlikely), converts input.utc (optional) to it.
  # No input.utc does _now_.
  input.ut = ut.c(input.utc) unless input.ut?

  # In case nothing specific is asked for.
  # Get the planets - longitude and speed.
  input.stuff ?= [
      [0, 3]
      [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
      []
    ]

  # No houses, unless both geo-coordinates and house system preference given.
  input.houses ?= false

  # Merge some further settings here last.
  input = merge input, further if further?

  input
{'fraction_non_alphanumeric': 0.11925754060324827, 'fraction_numerical': 0.014849187935034803, 'mean_word_length': 3.0223880597014925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6775695', 'n_tokens_mistral': 722, 'n_tokens_neox': 664, 'n_words': 252}