Skip to content
This repository was archived by the owner on Sep 2, 2024. It is now read-only.

695 nexus writer get documents from plan#696

Merged
d-perl merged 30 commits into
mainfrom
695_nexus_writer_get_documents_from_plan
Jun 13, 2023
Merged

695 nexus writer get documents from plan#696
d-perl merged 30 commits into
mainfrom
695_nexus_writer_get_documents_from_plan

Conversation

@d-perl

@d-perl d-perl commented Jun 1, 2023

Copy link
Copy Markdown
Contributor

Fixes #695

somewhat reorganises the fgs nexus writer callback, lets it get parameters through documents, and changes where in the plan subscription is done

associated dodal PR: DiamondLightSource/dodal#89

To test:

  1. Run tests

@codecov

codecov Bot commented Jun 1, 2023

Copy link
Copy Markdown

Codecov Report

Merging #696 (2d0c130) into main (2180df1) will increase coverage by 0.46%.
The diff coverage is 95.65%.

@@            Coverage Diff             @@
##             main     DiamondLightSource/hyperion#696      +/-   ##
==========================================
+ Coverage   91.59%   92.06%   +0.46%     
==========================================
  Files          34       35       +1     
  Lines        1666     1713      +47     
==========================================
+ Hits         1526     1577      +51     
+ Misses        140      136       -4     
Impacted Files Coverage Δ
...is/parameters/plan_specific/fgs_internal_params.py 100.00% <ø> (ø)
.../artemis/external_interaction/nexus/nexus_utils.py 91.30% <91.30%> (ø)
.../artemis/external_interaction/nexus/write_nexus.py 96.80% <94.91%> (-3.20%) ⬇️
...rc/artemis/experiment_plans/fast_grid_scan_plan.py 93.10% <100.00%> (+6.11%) ⬆️
...teraction/callbacks/fgs/fgs_callback_collection.py 100.00% <100.00%> (ø)
...ternal_interaction/callbacks/fgs/nexus_callback.py 100.00% <100.00%> (ø)
...ernal_interaction/callbacks/fgs/zocalo_callback.py 98.46% <100.00%> (ø)
src/artemis/parameters/internal_parameters.py 98.70% <100.00%> (+0.05%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@DominicOram DominicOram left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice, great refactor, thanks! A few comments in code. Also, can you add a couple of nexus callback tests on the unhappy path e.g. that we get sensible errors if it does not get the docs in the right order

Comment thread src/artemis/external_interaction/callbacks/fgs/nexus_callback.py
Comment thread src/artemis/external_interaction/callbacks/fgs/nexus_callback.py Outdated
Comment thread src/artemis/external_interaction/callbacks/fgs/nexus_callback.py Outdated
Comment thread src/artemis/external_interaction/callbacks/fgs/nexus_callback.py Outdated
Comment thread src/artemis/external_interaction/callbacks/fgs/nexus_callback.py
Comment thread src/artemis/external_interaction/nexus/nexus_utils.py
Comment thread src/artemis/external_interaction/nexus/write_nexus.py Outdated
Comment thread src/artemis/external_interaction/nexus/write_nexus.py
Comment thread src/artemis/external_interaction/nexus/write_nexus.py
Comment thread src/artemis/parameters/schemas/experiment_schemas/grid_scan_params_schema.json Outdated
@d-perl
d-perl requested a review from DominicOram June 9, 2023 14:57
Comment on lines 61 to 63
assert (
self.nexus_writer_1 is not None and self.nexus_writer_2 is not None
), "Failed to create Nexus files, writers were not initialised."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should: This assertion now seems over the top given we just created the writers

Comment thread src/artemis/external_interaction/callbacks/fgs/nexus_callback.py

@DominicOram DominicOram left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Brilliant, thank you

@d-perl
d-perl merged commit 9fd83d0 into main Jun 13, 2023
@d-perl
d-perl deleted the 695_nexus_writer_get_documents_from_plan branch June 13, 2023 07:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

make nexus callback get parameters from documents

2 participants