-
Notifications
You must be signed in to change notification settings - Fork 0
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
Remove mock data endpoint #575
Merged
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
https://eaflood.atlassian.net/browse/WATER-4057 To make the work on two-part tariff and other areas of the service easier in the future we have been undergoing a large scale refactor of our models. We have realised we can make it seem to the project that we have just one schema, and that everything sits in `public` by using [updatable views](https://www.postgresql.org/docs/current/sql-createview.html) for any legacy table we have to deal with. This has led to a whole refactor of the models so they are based on these new views rather than the legacy tables. During [Refactor to use new view based WATER models](#569), the last stage in refactoring, we hit the point we'd have to make a whole series of changes to the services that support generating mock data. For context, we created this to help support the [re-design of the view bill pages](https://eaflood.atlassian.net/browse/WATER-4131). Our design team needed to prototype and test a page that replicated the scenario we were trying to fix; a bill with more than 150 licences linked to it. We created the mock endpoint to generate data that could be copied & pasted by the design team into the prototype. The thought was this would be 'a thing' we'd be asked again and again for in the future. In reality, we've only had 1 additional request, and that was to [generate returns review data based on how the old engine does it](#447). But this was needed to have something to design the new pages around. We've never got round to merging it because it will require a lot of unit testing, for something that will never be used again. We've come to the conclusion generating mock data at best is only ever going to be a one-off exercise. There will be times we need code to generate complex 'data' (bill runs, charge versions, returns etc) in enough quantity to make tests in the prototype realistic. But once we've generated the data there will never be any additional requests. There is no point maintaining these endpoints and increasing our workload. So, this change removes the existing mock endpoint and functionality.
Cruikshanks
added
the
housekeeping
Refactoring, tidying up or other work which supports the project
label
Dec 8, 2023
Beckyrose200
pushed a commit
that referenced
this pull request
Dec 14, 2023
https://eaflood.atlassian.net/browse/WATER-4057 To make the work on two-part tariff and other areas of the service easier in the future we have been undergoing a large-scale refactor of our models. We have realised we can make it seem to the project that we have just one schema, and that everything sits in `public` by using [updatable views](https://www.postgresql.org/docs/current/sql-createview.html) for any legacy table we have to deal with. This has led to a whole refactor of the models based on these new views rather than the legacy tables. During [Refactor to use new view-based WATER models](#569), the last stage in refactoring, we hit the point where we'd have to make a whole series of changes to the services that support generating mock data. For context, we created this to help support the [re-design of the view bill pages](https://eaflood.atlassian.net/browse/WATER-4131). Our design team needed to prototype and test a page that replicated the scenario we were trying to fix; a bill with more than 150 licences linked to it. We created the mock endpoint to generate data that could be copied & pasted by the design team into the prototype. The thought was this would be 'a thing' we'd be repeatedly asked for in the future. In reality, we've only had 1 additional request, and that was to [generate returns review data based on how the old engine does it](#447). But this was needed to have something to design the new pages around. We've never got around to merging it because it will require a lot of unit testing, for something that will never be used again. We've come to the conclusion generating mock data at best is only ever going to be a one-off exercise. There will be times we need code to generate complex 'data' (bill runs, charge versions, returns etc) in enough quantity to make tests in the prototype realistic. However once we've generated the data, there will be no additional requests. There is no point in maintaining these endpoints and increasing our workload. So, this change removes the existing mock endpoint and functionality.
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.
https://eaflood.atlassian.net/browse/WATER-4057
To make the work on two-part tariff and other areas of the service easier in the future we have been undergoing a large-scale refactor of our models. We have realised we can make it seem to the project that we have just one schema, and that everything sits in
public
by using updatable views for any legacy table we have to deal with.This has led to a whole refactor of the models based on these new views rather than the legacy tables. During Refactor to use new view-based WATER models, the last stage in refactoring, we hit the point where we'd have to make a whole series of changes to the services that support generating mock data. For context, we created this to help support the re-design of the view bill pages. Our design team needed to prototype and test a page that replicated the scenario we were trying to fix; a bill with more than 150 licences linked to it.
We created the mock endpoint to generate data that could be copied & pasted by the design team into the prototype. The thought was this would be 'a thing' we'd be repeatedly asked for in the future. In reality, we've only had 1 additional request, and that was to generate returns review data based on how the old engine does it. But this was needed to have something to design the new pages around. We've never got around to merging it because it will require a lot of unit testing, for something that will never be used again.
We've come to the conclusion generating mock data at best is only ever going to be a one-off exercise. There will be times we need code to generate complex 'data' (bill runs, charge versions, returns etc) in enough quantity to make tests in the prototype realistic. However once we've generated the data, there will be no additional requests. There is no point in maintaining these endpoints and increasing our workload.
So, this change removes the existing mock endpoint and functionality.