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

Correctly create optional versioned base URLs #178

Merged
merged 2 commits into from Feb 13, 2020

Conversation

CasperWA
Copy link
Member

Fixes #177

Concerning testing this, it is quite difficult for the way our test-setup works at the moment.
We could add an extra test for the docker CI tests, but it is perhaps not the correct place?

@codecov
Copy link

codecov bot commented Feb 13, 2020

Codecov Report

Merging #178 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #178   +/-   ##
=======================================
  Coverage   86.31%   86.31%           
=======================================
  Files          40       40           
  Lines        1878     1878           
=======================================
  Hits         1621     1621           
  Misses        257      257
Flag Coverage Δ
#unittests 86.31% <ø> (ø) ⬆️
Impacted Files Coverage Δ
optimade/server/routers/utils.py 95.74% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9f16ef0...a4555e6. Read the comment docs.

@ml-evs
Copy link
Member

ml-evs commented Feb 13, 2020

I think we should make this fix right now, if you wanted to ping the docker to make sure the current versions are up (e.g. docker exec optimade-python-tools_optimade_1 optimade_validator http://localhost:5000/optimade/v0.10.0 and so on) that won't do any harm.

The next thing to add to the validator is support for validating optional features, where one could be taking the API version from info/ and checking if the minor/patch versions are also valid URLs.

@CasperWA
Copy link
Member Author

I think we should make this fix right now, if you wanted to ping the docker to make sure the current versions are up (e.g. docker exec optimade-python-tools_optimade_1 optimade_validator http://localhost:5000/optimade/v0.10.0 and so on) that won't do any harm.

Already putting together this commit.

The next thing to add to the validator is support for validating optional features, where one could be taking the API version from info/ and checking if the minor/patch versions are also valid URLs.

Nice idea!

@CasperWA
Copy link
Member Author

Made it so that the CI yml file is updated according to the set-optimade-ver invoke task. Furthermore, a check is done on the supplied version to this task.

Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect to me now, cheers @CasperWA.

@CasperWA CasperWA merged commit ae324fc into master Feb 13, 2020
@CasperWA CasperWA deleted the fix_177_optional_versioned_base_URLs branch February 13, 2020 15:41
@CasperWA CasperWA mentioned this pull request Feb 13, 2020
CasperWA added a commit that referenced this pull request Feb 13, 2020
Bump to v0.5.0

Changes:
- Possibility for Docker deployment for both the index meta-database
  server as well as the regular server (#140, @ltalirz, @CasperWA)
- Test building and starting Docker images with GitHub Actions CI
  (#140, @CasperWA, @ml-evs, @ltalirz)
- Remove `/index` from the index meta-database's base URL
  (#140, @ltalirz, @CasperWA)
- `include` query parameter (#163, @CasperWA)
- Rename `optimade/server/deps.py` to `optimade/server/query_params.py`
  (#163, @CasperWA)
- Human-readable landing page for versioned base URLs, as well as for
  `/optimade` (#172, @ml-evs)
- Move mapper aliases to config file and out of mapper classes
  (#175, @ml-evs)

Bug fixes:
- Properly build versioned base URLs (#178, @CasperWA)
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

Successfully merging this pull request may close these issues.

'minor' and 'patch' versioned base URL prefixes are wrong
2 participants