Skip to content

Conversation

@stephen-riggs
Copy link
Contributor

Currently, if a grid square is seen before the data collection group is made, we get an error.
This addresses that by skipping the registration if there is not data collection group, and instead registering any missed grid squares and foil holes when the flush happens.

There's not much really "new" code in here, but a lot of functions have been moved and modified to allow the registration to happen from a client API call or a server call.

  • Functions from client/contexts/spa.py are now needed by the server, so have moved into the util folder (with the exceptions of _grid_square_metadata_file which needs to behave differently on the server)
  • Parts of the api/__init__.py are now called through the server, so have moved into a workflow.

The flush_spa_processing call has now moved to a separate workflow. This workflow is also the location of the additions in this PR: flush_spa_processing now calls a new function _flush_position_analysis which fills in any missing grid squares and foil holes in the database.

@codecov
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 198 lines in your changes missing coverage. Please review.

Project coverage is 27.16%. Comparing base (0f59d2e) to head (431adae).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #454      +/-   ##
==========================================
+ Coverage   27.06%   27.16%   +0.09%     
==========================================
  Files          76       78       +2     
  Lines       10191    10250      +59     
  Branches     1345     1350       +5     
==========================================
+ Hits         2758     2784      +26     
- Misses       7345     7378      +33     
  Partials       88       88              

Co-authored-by: Daniel Hatton <daniel.hatton@diamond.ac.uk>
@stephen-riggs stephen-riggs merged commit bc3278d into main Jan 22, 2025
17 checks passed
@stephen-riggs stephen-riggs deleted the grid-square-flush branch January 22, 2025 09:21
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.

2 participants