title: How to validate variables in ducttape files?
body: <p>I have two ducttape files: <code>globals.tape</code> and <code>myfile.tape</code> and I am importing <code>globals.tape</code> in <code>myfile.tape</code> as shown below:</p>
  <p>globals.tape</p>
  <pre><code>global {
      ducttape_experimental_imports=enable
      ducttape_experimental_packages=true
  
      num_days=(NumDays: 1=&quot;1&quot; 2=&quot;2&quot;)
  }
  </code></pre>
  <p>myfile.tape</p>
  <pre><code>import &quot;../tapes/globals.tape&quot;
  plan planA {
      reach do_some_task via (NumDays: 5)
  }
  </code></pre>
  <p>Since <code>NumDays</code> can only take values <code>1</code> and <code>2</code>, I want to add a validation step which will make sure that <code>NumDays</code> always take one of the available/valid values.</p>
  <p>How do I do the validation? For example, is there any parsing tool that loads all imported tape files and checks if the variables resolve correctly? Alternatively, is there any ducttape API that can be used to do the validation?</p>