Skip to content

Conversation

@Flix6x
Copy link
Contributor

@Flix6x Flix6x commented Apr 25, 2023

This PR sunsets API versions 1, 1.1, 1.2, 1.3 and 2.0.

  • Move worthwhile tests to API v3
  • Remove all other tests for sunset API versions
  • Add sunset notice to changelog
  • Remove obsolete documentation (keeping a reference to snapshot on readthedocs.org)
  • Remove obsolete script for manual simulations against sunset API versions
  • Add service listing to v3
  • Document public endpoints in v3 (authentication, version listing and service listing)
  • Responses with 410 (Gone) status codes * (see Support blackout tests #651)

* I'm thinking towards supporting FM hosts in running their own blackout tests, by switching a dedicated config setting, then actually removing the endpoints in flexmeasures==0.14, which will lead to 404 (Not Found). To be discussed in the next TSC.

Flix6x added 20 commits April 25, 2023 11:46
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
… a data source, from v1.1 to v3; also test posting is not allowed for inactive admins

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…rather than fresh_db fixture

Signed-off-by: F.N. Claessen <felix@seita.nl>
…of them

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x added this to the 0.13.0 milestone Apr 25, 2023
@Flix6x Flix6x self-assigned this Apr 25, 2023
Flix6x added 2 commits April 25, 2023 20:36
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@coveralls
Copy link
Collaborator

coveralls commented Apr 25, 2023

Pull Request Test Coverage Report for Build 4812786450

  • 19 of 45 (42.22%) changed or added relevant lines in 4 files are covered.
  • 798 unchanged lines in 35 files lost coverage.
  • Overall coverage decreased (-9.2%) to 55.619%

Changes Missing Coverage Covered Lines Changed/Added Lines %
flexmeasures/api/v3_0/public.py 14 40 35.0%
Files with Coverage Reduction New Missed Lines %
flexmeasures/auth/decorators.py 1 69.23%
flexmeasures/data/models/assets.py 1 69.95%
flexmeasures/data/models/time_series.py 1 68.92%
flexmeasures/data/schemas/sensors.py 1 76.19%
flexmeasures/data/services/users.py 1 82.17%
flexmeasures/data/utils.py 1 76.39%
flexmeasures/api/common/schemas/sensors.py 2 73.21%
flexmeasures/api/v1_2/routes.py 2 87.18%
flexmeasures/api/v1_3/routes.py 2 87.01%
flexmeasures/conftest.py 2 97.66%
Totals Coverage Status
Change from base Build 4787293963: -9.2%
Covered Lines: 6306
Relevant Lines: 10211

💛 - Coveralls

Flix6x added 5 commits April 26, 2023 15:56
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
…pectively

Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Flix6x added 3 commits April 26, 2023 20:21
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x marked this pull request as ready for review April 26, 2023 19:47
Signed-off-by: F.N. Claessen <felix@seita.nl>
@Flix6x Flix6x requested a review from nhoening April 26, 2023 19:58
Copy link
Contributor

@nhoening nhoening left a comment

Choose a reason for hiding this comment

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

Great work!

Coverage fell by 9.2%, but the report shows that's mostly because you left the implementations (why?) and in api_utils and validators, where I expect a lot of cleanup later.

@Flix6x
Copy link
Contributor Author

Flix6x commented Apr 28, 2023

Coverage fell by 9.2%, but the report shows that's mostly because you left the implementations (why?) and in api_utils and validators, where I expect a lot of cleanup later.

I left them in anticipation of supporting blackout tests, and will remove them immediately after release. Technically, I could have left the tests in place until then (and only update the docs and add the blackout test support before release). We could still do it like that, or accept the hit in coverage, which would show longer on Pypi (until the 0.14 release), and only very short on GitHub (until the main branch is updated with the PR that removes the endpoint implementations).

@nhoening
Copy link
Contributor

Coverage fell by 9.2%, but the report shows that's mostly because you left the implementations (why?) and in api_utils and validators, where I expect a lot of cleanup later.

I left them in anticipation of supporting blackout tests, and will remove them immediately after release. Technically, I could have left the tests in place until then (and only update the docs and add the blackout test support before release). We could still do it like that, or accept the hit in coverage, which would show longer on Pypi (until the 0.14 release), and only very short on GitHub (until the main branch is updated with the PR that removes the endpoint implementations).

I'm fine with a short-term low coverage. It's not the most important metric.

@Flix6x Flix6x merged commit 4c66fbf into main May 1, 2023
@Flix6x Flix6x deleted the sunset-api-versions-1-and-2 branch May 1, 2023 13:34
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.

4 participants