Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: config validation cannot deal with ResultPath #226

Open
willu47 opened this issue Jun 4, 2024 · 1 comment
Open

[Bug]: config validation cannot deal with ResultPath #226

willu47 opened this issue Jun 4, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@willu47
Copy link
Member

willu47 commented Jun 4, 2024

The Issue

There are two related bugs to do with ResultsPath.

  1. If ResultsPath is not specified in the config.yaml file, but listed in the datafile, the validation does not provide the correct error.
  2. If the ResultsPath is specified in the config.yaml file, the type of the parameter (string) is not handled correctly by the validation.

Expected Behavior

  1. The validation code should identify that ResultsPath is not listed (amply returns an error)
  2. The validation code should handle parameters with a string type

Steps To Reproduce

  1. a. Add ResultsPath := ./a/path/to/results to datafile called file_with_resultspath.txt
    b. Run otoole convert datafile datafile file_with_resultspath.txt test.txt config.yaml

  2. a. Add entry to config.yaml file for ResultsPath

     ResultsPath:
       indices: []
       type: param
       dtype: str
       default: results
    

    b. Add ResultsPath := ./a/path/to/results to datafile called file_with_resultspath.txt
    c. Run otoole convert datafile datafile file_with_resultspath.txt test.txt config.yaml

Log output

ParseException: Expected end of text, found 'p'  (at char 2069), (line:23, col:1)  (at char 0), (line:1, col:1)

Operating System

MacOS

What version of otoole are you running?

1.1.2

Possible Solution

No response

Anything else?

No response

@willu47 willu47 added the bug Something isn't working label Jun 4, 2024
@trevorb1
Copy link
Member

trevorb1 commented Jun 4, 2024

This can supersede issue #103. That issue describes adding ResultsPath to the now deprecated datapackage, but notes a similar issue in trying to use ResultsPath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants