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

Mark data gaps in the database #117

Closed
8 tasks done
davidrg opened this issue Jul 30, 2021 · 1 comment
Closed
8 tasks done

Mark data gaps in the database #117

davidrg opened this issue Jul 30, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@davidrg
Copy link
Owner

davidrg commented Jul 30, 2021

With #7 implemented the desktop client will only contact the server for archive data if:

  • The user requested data that outside the timespan covered by the cache database
  • There are detected gaps in the cache databases coverage of the requested timespan

Gaps are detected by the desktop client itself when data is downloaded and any data file with detected gaps is marked as incomplete. Any requests for data that cover the entire or middle portion of that data file will result in the data file being re-downloaded.

It would be nice if the Web UI could provide a list of known gaps in the dataset that will never be filled. On download if the desktop clients detected gaps line up with the list of known gaps it would mark the data file as complete despite there being missing data. This would allow the data to be cached indefinitely with no further requests to the server.

So:

  • Database table to store gaps per station. Should have start time and end time, description column. Probably a ranged unique index on the timespan.
  • Postgresql only desktop report which shows all gaps - both known (entry in the gaps table) and unknown.
  • Console tool to detect gaps in the database and populate the gaps table optionally asking user to provide a description for each one
  • Archived column on the station table. Default to false.
  • Web UI serves up this data along with the full datasets timespan and if the station is archived or not (still producing new data)
  • Adjust desktop app to download gaps data as part of the FetchSamples workflow. Detected gaps that line up with data in the gaps file are ignored.
  • All data files coming from archived stations should be automatically marked as complete. Gap detection should be skipped and files marked as contiguous.
  • SQLite desktop report which shows known gaps only as advertised by the Web UI

Once this, #7 and #8 are done the desktop client should only need to contact the server rarely - mostly for recent data if the app has been closed.

@davidrg davidrg added the enhancement New feature or request label Jul 30, 2021
@davidrg davidrg added this to the desktop milestone 6 milestone Jul 30, 2021
@davidrg davidrg added this to Selected in zxweather v1.0 Aug 2, 2021
@davidrg davidrg moved this from Selected to In progress in zxweather v1.0 Aug 2, 2021
davidrg added a commit that referenced this issue Aug 2, 2021
…table

Added a new table for recoding the existence of gaps in the sample table and optionally giving them a label/description.

Added SQL function for fetching all gaps in the sample table for a particular station (whether they're in the gaps table or not)

Added a postgres-only report for the desktop client which calls the SQL function and shows all gaps for the station.

This is the first part of #117.
@davidrg
Copy link
Owner Author

davidrg commented Aug 3, 2021

Mark gaps tool added to admin-tool in commit 88b559e

@davidrg davidrg closed this as completed Aug 6, 2021
@davidrg davidrg moved this from In progress to Done in zxweather v1.0 Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant