-
Notifications
You must be signed in to change notification settings - Fork 2
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
Nbval default ignore html and javascript output #73
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ecrease usage of NBVAL_IGNORE_OUTPUT Following https://nbval.readthedocs.io/en/latest/index.html?highlight=skip#Skipping-certain-output-types Error: ``` INTERNALERROR> File "/opt/conda/envs/birdy/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result INTERNALERROR> raise ex[1].with_traceback(ex[2]) INTERNALERROR> File "/opt/conda/envs/birdy/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall INTERNALERROR> res = hook_impl.function(*args) INTERNALERROR> File "/repos/PAVICS-e2e-workflow-tests/conftest.py", line 2, in pytest_collectstart INTERNALERROR> collector.skip_compare += 'text/html', 'application/javascript', INTERNALERROR> AttributeError: 'Session' object has no attribute 'skip_compare' ```
…rease usage of NBVAL_IGNORE_OUTPUT Fix the error found in the previous commit 36d2fb4.
matprov
approved these changes
May 18, 2021
tlvu
added a commit
to Ouranosinc/pavics-sdi
that referenced
this pull request
May 27, 2021
Also removed `NBVAL_IGNORE_OUTPUT` since Jenkins is configured to by default ignore html changes, see PR Ouranosinc/PAVICS-e2e-workflow-tests#73. To fix this error: ``` _______ pavics-sdi-master/docs/source/notebooks/subsetting.ipynb::Cell 2 _______ Notebook cell execution failed Cell 2: Cell outputs differ Input: help(fp.subset_continents) Traceback: mismatch 'stdout' assert reference_output == test_output failed: 'Help on meth... outputs.\n\n' == 'Help on meth... outputs.\n\n' Skipping 101 identical leading characters in diff, use -v to show - n='Africa') method of birdy.client.base.WPSClient instance + n='Africa', output_formats=None) method of birdy.client.base.WPSClient instance ? +++++++++++++++++++++ Return the data whose grid cells intersect the selected continents for each input dataset. Parameters ---------- region : {'Africa', 'Asia', 'Australia', 'North America', 'Oceania', 'South America', 'Antarctica', 'Europe'}string Continent name. resource : ComplexData:mimetype:`application/x-netcdf`, :mimetype:`application/x-tar`, :mimetype:`application/zip` NetCDF Files or archive (tar/zip) containing netCDF files. Returns ------- output : ComplexData:mimetype:`application/x-netcdf` NetCDF output for first resource file. metalink : ComplexData:mimetype:`application/metalink+xml; version=4.0` Metalink file with links to all NetCDF outputs. ```
tlvu
added a commit
to bird-house/finch
that referenced
this pull request
May 27, 2021
Also removed `NBVAL_IGNORE_OUTPUT` since Jenkins is configured to by default ignore html changes, see PR Ouranosinc/PAVICS-e2e-workflow-tests#73. To fix this error: ``` _________ finch-master/docs/source/notebooks/finch-usage.ipynb::Cell 1 _________ Notebook cell execution failed Cell 1: Cell outputs differ Input: help(wps.frost_days) Traceback: mismatch 'stdout' assert reference_output == test_output failed: 'Help on meth...ut files.\n\n' == 'Help on meth...ut files.\n\n' Skipping 201 identical leading characters in diff, use -v to show - iable=None) method of birdy.client.base.WPSClient instance + iable=None, output_formats=None) method of birdy.client.base.WPSClient instance ? +++++++++++++++++++++ Number of days where daily minimum temperatures are below 0. Parameters ---------- tasmin : ComplexData:mimetype:`application/x-netcdf`, :mimetype:`application/x-ogc-dods` NetCDF Files or archive (tar/zip) containing netCDF files. thresh : string Freezing temperature. freq : {'YS', 'MS', 'QS-DEC', 'AS-JUL'}string Resampling frequency. check_missing : {'any', 'wmo', 'pct', 'at_least_n', 'skip', 'from_context'}string Method used to determine which aggregations should be considered missing. missing_options : ComplexData:mimetype:`application/json` JSON representation of dictionary of missing method parameters. cf_compliance : {'log', 'warn', 'raise'}string Whether to log, warn or raise when inputs have non-CF-compliant attributes. data_validation : {'log', 'warn', 'raise'}string Whether to log, warn or raise when inputs fail data validation checks. variable : string Name of the variable in the NetCDF file. Returns ------- output_netcdf : ComplexData:mimetype:`application/x-netcdf` The indicator values computed on the original input grid. output_log : ComplexData:mimetype:`text/plain` Collected logs during process run. ref : ComplexData:mimetype:`application/metalink+xml; version=4.0` Metalink file storing all references to output files. ```
This was referenced May 27, 2021
tlvu
added a commit
to bird-house/finch
that referenced
this pull request
Jun 15, 2021
…ut-for-jenkins finch-usage.ipynb: update output due to new birdy 0.8.0 New birdy removed `output_formats`. Clarification from DavidH: To clarify, the `output_formats` option still exists, but it's only appearing when the process has a complexoutput supporting more than one data format. bird-house/birdy@2bea46c#diff-ba0f245ac7a3747697d42961f7a19568e294dc5d2b4ad14b62a47d8c240ed12eR230-R238 Also removed `NBVAL_IGNORE_OUTPUT` since Jenkins is configured to by default ignore html changes, see PR Ouranosinc/PAVICS-e2e-workflow-tests#73. Jenkins passing build with upcoming Jupyter env: http://jenkins.ouranos.ca/job/PAVICS-e2e-workflow-tests/job/new-docker-build-for-ravenpy/10/console New Jupyter env PR: Ouranosinc/PAVICS-e2e-workflow-tests#75 To fix this error: ``` _________ finch-master/docs/source/notebooks/finch-usage.ipynb::Cell 1 _________ Notebook cell execution failed Cell 1: Cell outputs differ Input: help(wps.frost_days) Traceback: mismatch 'stdout' assert reference_output == test_output failed: 'Help on meth...ut files.\n\n' == 'Help on meth...ut files.\n\n' Skipping 201 identical leading characters in diff, use -v to show - iable=None) method of birdy.client.base.WPSClient instance + iable=None, output_formats=None) method of birdy.client.base.WPSClient instance ? +++++++++++++++++++++ Number of days where daily minimum temperatures are below 0. Parameters ---------- tasmin : ComplexData:mimetype:`application/x-netcdf`, :mimetype:`application/x-ogc-dods` NetCDF Files or archive (tar/zip) containing netCDF files. thresh : string Freezing temperature. freq : {'YS', 'MS', 'QS-DEC', 'AS-JUL'}string Resampling frequency. check_missing : {'any', 'wmo', 'pct', 'at_least_n', 'skip', 'from_context'}string Method used to determine which aggregations should be considered missing. missing_options : ComplexData:mimetype:`application/json` JSON representation of dictionary of missing method parameters. cf_compliance : {'log', 'warn', 'raise'}string Whether to log, warn or raise when inputs have non-CF-compliant attributes. data_validation : {'log', 'warn', 'raise'}string Whether to log, warn or raise when inputs fail data validation checks. variable : string Name of the variable in the NetCDF file. Returns ------- output_netcdf : ComplexData:mimetype:`application/x-netcdf` The indicator values computed on the original input grid. output_log : ComplexData:mimetype:`text/plain` Collected logs during process run. ref : ComplexData:mimetype:`application/metalink+xml; version=4.0` Metalink file storing all references to output files. ```
tlvu
added a commit
to Ouranosinc/pavics-sdi
that referenced
this pull request
Jun 15, 2021
…t-for-jenkins subsetting.ipynb: update output due to new birdy 0.8.0 New birdy removed `output_formats`. Clarification from DavidH: To clarify, the `output_formats` option still exists, but it's only appearing when the process has a complexoutput supporting more than one data format. bird-house/birdy@2bea46c#diff-ba0f245ac7a3747697d42961f7a19568e294dc5d2b4ad14b62a47d8c240ed12eR230-R238 Also removed `NBVAL_IGNORE_OUTPUT` since Jenkins is configured to by default ignore html changes, see PR Ouranosinc/PAVICS-e2e-workflow-tests#73. Jenkins passing build with upcoming Jupyter env: http://jenkins.ouranos.ca/job/PAVICS-e2e-workflow-tests/job/new-docker-build-for-ravenpy/10/console New Jupyter env PR: Ouranosinc/PAVICS-e2e-workflow-tests#75 To fix this error: ``` _______ pavics-sdi-master/docs/source/notebooks/subsetting.ipynb::Cell 2 _______ Notebook cell execution failed Cell 2: Cell outputs differ Input: help(fp.subset_continents) Traceback: mismatch 'stdout' assert reference_output == test_output failed: 'Help on meth... outputs.\n\n' == 'Help on meth... outputs.\n\n' Skipping 101 identical leading characters in diff, use -v to show - n='Africa') method of birdy.client.base.WPSClient instance + n='Africa', output_formats=None) method of birdy.client.base.WPSClient instance ? +++++++++++++++++++++ Return the data whose grid cells intersect the selected continents for each input dataset. Parameters ---------- region : {'Africa', 'Asia', 'Australia', 'North America', 'Oceania', 'South America', 'Antarctica', 'Europe'}string Continent name. resource : ComplexData:mimetype:`application/x-netcdf`, :mimetype:`application/x-tar`, :mimetype:`application/zip` NetCDF Files or archive (tar/zip) containing netCDF files. Returns ------- output : ComplexData:mimetype:`application/x-netcdf` NetCDF output for first resource file. metalink : ComplexData:mimetype:`application/metalink+xml; version=4.0` Metalink file with links to all NetCDF outputs. ```
tlvu
added a commit
to bird-house/finch
that referenced
this pull request
Jun 16, 2021
With PR #188 removing `NBVAL_IGNORE_OUTPUT` since Jenkins is configured by default to ignore html changes (PR Ouranosinc/PAVICS-e2e-workflow-tests#73), test-notebooks target here is broken because it does not have the same `conftest.py` as Jenkins. This change brings the same `conftest.py` from Jenkins here to fix test-notebooks target.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
Ignore by default html and javascript output to decrease usage of
NBVAL_IGNORE_OUTPUT
.Changes
conftest.py
following https://nbval.readthedocs.io/en/latest/index.html?highlight=skip#Skipping-certain-output-typesRelated Issue / Discussion
--nbval-lax
.Additional Information
Nbval documentation was not 100% correct: computationalmodelling/nbval#168