-
Notifications
You must be signed in to change notification settings - Fork 42
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
Implement 553 Version Not Supported #420
Implement 553 Version Not Supported #420
Conversation
Don't know why the tests are failing here. Locally they run fine for me. |
Gah - just realized it's |
Codecov Report
@@ Coverage Diff @@
## master #420 +/- ##
==========================================
+ Coverage 90.99% 91.09% +0.09%
==========================================
Files 55 55
Lines 2522 2548 +26
==========================================
+ Hits 2295 2321 +26
Misses 227 227
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Welp. It seems that maybe the either the |
When/if this is to be merged, we need to first update the branch protection to use |
cfe7646
to
aec6824
Compare
Factored out all out-of-topic changes in this PR and created another PR for them (#422). This means the CI tests for |
This is now not the case for this PR, but rather for #422. |
31ae83b
to
5bc2491
Compare
5bc2491
to
dd4a51b
Compare
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.
Few bits and bobs, mostly to do with testing slashed base URLs without endpoints, otherwise this lgtm
The middleware checks the request URL for the versioned part of the URL path. This is done in the hopes that the `get_base_url` function in `optimade.server.routers.utils` returns the correct part of the URL prior to the versioned part of the URL.
Also, update test_config.json to equal the TestClient.
Also fix version setting in OptimadeTestClient
Co-authored-by: Matthew Evans <7916000+ml-evs@users.noreply.github.com>
156127b
to
929cd38
Compare
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.
👍
Closes #391
New middleware to check whether versioned base URL (relating to the OPTIMADE server) is a valid version.
If it is not a valid version, the middleware will raise, resulting in a
553 Version Not Supported
as required by the specification.Note: This PR changes
test_config.json
to align thebase_url
configuration parameter with the used test client's.This speaks to the fact that the
default_config.json
andexample_config.json
should be usable as proper configuration files for development of this package.This also updates a bit of CI now:- Usev1
ofCasperWA/push-protected
action.- Change job namedeps_static
topytest
.- Use a high verbosity forpytest
, i.e.,-vvv
.Edit: These updates have been factored out into another PR, since they are out-of-scope for this PR. See #422.