-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix CAMS message error handler #1905
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
a02bb78
Fix CAMS message error handler - Issue#1799
GillesFischerV 1da05c0
Fix CAMS message error handler - Issue#1799
GillesFischerV 05f9e93
Merge branch 'main' of github.com:GillesFischerV/pvlib-python into main
GillesFischerV 81bfc8f
fix Python Flake8 Linter error
GillesFischerV e6a49cd
Fix associated UT and add contribution in WhatsNews
GillesFischerV 3bc9d33
Merge branch 'main' into main
GillesFischerV 9c11d8f
Fix line code length in test_sodapro.py
GillesFischerV c544a49
Fix typo in contributor ghuser
AdamRJensen 892dd0e
Update geographical coverage description
AdamRJensen dd0a572
correction in maximum longitude available for CAMS Radiation
GillesFischerV 80c4fa4
revert of last change
GillesFischerV 64972a1
Merge branch 'main' into main
AdamRJensen f130248
Add doc string changes from adriesse
AdamRJensen fcf8845
Flake8 correction
AdamRJensen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this error text is out of date. From the real API, I get this response when supplying an unregistered email:
<?xml version="1.0" encoding="UTF-8"?>\n<!-- PyWPS 4.5.0 -->\n<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" version="1.0.0">\n <ows:Exception exceptionCode="NoApplicableCode" locator="" >\n <ows:ExceptionText>Process error: Dear User, thank you for your interest in the McClear service provided by MINES ParisTech. The service has been developed with funding from the European Union s Copernicus Programme CAMS project . The data policy imposed by the European Union in CAMS project is that users must be identified. Please,</ows:ExceptionText>\n </ows:Exception>\n</ows:ExceptionReport>
Probably we should update to the current API message, right?
Note also that the end of the message seems to be truncated ("Please, " do what?).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see this error message has already been discussed :)
If it will change again soon, what should we do here? I don't think it makes sense to test on out of date messages, but it seems that even the current message will soon be out of date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the message will be changed.
As far as I understand, because we handle the answer through mock, the real content of the message is not important in the test as long as the format is correctly simulated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree it is not critical that the text be an exact match, but we should still try to mimic the real API's behavior to whatever extent is possible. In this case, maybe the best we can do is to add a comment in the test saying that this text isn't an exact match.