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

Could not run some tests #69

Open
Raynman67 opened this issue Nov 17, 2021 · 5 comments
Open

Could not run some tests #69

Raynman67 opened this issue Nov 17, 2021 · 5 comments

Comments

@Raynman67
Copy link

Raynman67 commented Nov 17, 2021

Hi I've just switched to using the streams and stores, but now I seem to be having problems with my : climatology_test, flat_line_test, location_test

Could not run "qartod.climatology_test: climatology_test() missing 1 required positional argument: 'zinp'
Could not run "qartod.flat_line_test: int() argument must be a string, a bytes-like object or a number, not 'list'
Could not run "qartod.location_test: location_test() missing 2 required positional arguments: 'lon' and 'lat'

store

self.stream = PandasStream(self.data.ps)

results = self.stream.run( self.con

store = PandasStore(
            results,
            axes={
                't': self.data.ps[self.var_dict['time']],
                'z': self.data.ps[self.var_dict['water_depth']],
                'y': self.data.ps[self.var_dict['lat']],
                'x': self.data.ps[self.var_dict['lon']]
            }
        )

config :

contexts:
    -   window:
            starting: 1900-01-01T00:00:00Z
            ending: 2120-01-01T00:00:00Z
        streams:
            temperature:
                qartod:
                    gross_range_test:
                        suspect_span: [3, 4]
                        fail_span: [2, 5]
                    rate_of_change_test: 
                        threshold: [0.01]
                    spike_test:
                        suspect_threshold: [6]
                        fail_threshold: [18]
                    location_test:
                        bbox: [-66, 44,-63, 48 ]
                    flat_line_test:
                        tolerance: [1]
                        suspect_threshold: [2.5]
                        fail_threshold: [4]
                    climatology_test:
                        config:
                        -   vspan: [10, 13 ]
                            tspan: [ 1, 3 ]
                            period: month
                            zspan:  [ 0, 100 ]
                        -   vspan:  [ 11, 14 ]
                            tspan: [ 4,6 ]
                            period: month
                            zspan: [ 0, 100 ]
                        -   vspan:  [ 13,17 ]
                            tspan: [ 7, 9 ]
                            period: month
                            zspan:  [ 0 ,100 ]
                        -   vspan: [ 12, 16 ]
                            tspan: [ 10, 12 ]
                            period: month
                            zspan:  [ 0, 100 ]
@Raynman67
Copy link
Author

Raynman67 commented Nov 17, 2021

What is especially odd, is that the location_test runs fine against a NC file, but failes against an ERDDAP dataset

location_test Solved ? : renamed source data frame columns latitude/longitude to lat/lon

@Raynman67
Copy link
Author

Also, how to define the Region ?

@Raynman67
Copy link
Author

Raynman67 commented Nov 18, 2021

flatline test solved : It was exactly as stated, had paramters in config for flatline test as "lists"


flat_line_test:
                        tolerance: [1]
                        suspect_threshold: [2.5]
                        fail_threshold: [4]

vs

flat_line_test:
                        tolerance: 1
                        suspect_threshold: 2.5
                        fail_threshold: 4

@Raynman67 Raynman67 reopened this Nov 18, 2021
@Raynman67
Copy link
Author

Accidently closed this.
I still have issues with Climatology test and how to define region.

Thanks,
Ray

@Raynman67
Copy link
Author

Raynman67 commented Nov 18, 2021

Climatology test Solved : renamed columns and dataframe.dropna()
An example of region still needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant