Skip to content

Uncertainty in time-histories #116

@jsantner

Description

@jsantner

Background

While working on #115 , I had gotten to a point where I thought I had solved my issues - the error message had changed significantly but all Travis tests passed. I figured I now had some problem with my particular input file. But, after working further, it seems there is an issue when using uncertainty in time-histories.
Am I formatting the uncertainty incorrectly somehow? Should I just skip the validation step? Or, is PyKED unable to handle uncertainty in time-histories?

Code sample, preferably able to be copy-pasted and run with no changes

See my forked version of the code here: https://github.com/jsantner/PyKED/tree/uncertainty
In this commit, I altered one of the yaml files to include uncertainty in the time history:

time-histories:
       - type: volume
         time:
           units: s
           column: 0
         quantity:
           units: cm3
           column: 1
        uncertainty:  
            type: relative
            value: 0.01
         values:
           filename: rcm_history.csv 

Expected behavior

I didn't expect any error messages

Actual behavior, including any error messages

I receive the following traceback, with equivalent results in the Travis job linked here.

  File "C:/Users/jsantne/Documents/GitHub/rcm-workshop/workshop.py", line 84, in load_files
    database.append(pyked.ChemKED(fpath))

  File "c:\users\jsantne\documents\github\pyked-jsantner\pyked\chemked.py", line 122, in __init__
    self.validate_yaml(self._properties)

  File "c:\users\jsantne\documents\github\pyked-jsantner\pyked\chemked.py", line 183, in validate_yaml
    for key, value in validator.errors.items():

  File "C:\Users\jsantne\AppData\Local\Continuum\Anaconda3\lib\site-packages\cerberus\validator.py", line 391, in errors
    return self.error_handler(self._errors)

  File "C:\Users\jsantne\AppData\Local\Continuum\Anaconda3\lib\site-packages\cerberus\errors.py", line 473, in __call__
    self.extend(errors)

  File "C:\Users\jsantne\AppData\Local\Continuum\Anaconda3\lib\site-packages\cerberus\errors.py", line 375, in extend
    self.add(error)

  File "C:\Users\jsantne\AppData\Local\Continuum\Anaconda3\lib\site-packages\cerberus\errors.py", line 482, in add
    self.insert_logic_error(error)

  File "C:\Users\jsantne\AppData\Local\Continuum\Anaconda3\lib\site-packages\cerberus\errors.py", line 549, in insert_logic_error
    raise NotImplementedError

NotImplementedError

PyKED/ChemKED version, Python version, OS version

PyKED version: my own forked repo that can read csv files for tiem history
Python version: 3.6
OS version: Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions