Skip to content

Add UI element for Instrument Settings#141

Merged
glass-ships merged 20 commits intonextfrom
instrument-settings
Feb 13, 2025
Merged

Add UI element for Instrument Settings#141
glass-ships merged 20 commits intonextfrom
instrument-settings

Conversation

@glass-ships
Copy link
Member

@glass-ships glass-ships commented Jan 30, 2025

Description of work:

Adds an InstrumentSettings model and UI interface for modifying intrument geometry parameters with which to run reduction.

Additionally adds deprecation warning for sf_calculator

Check all that apply:

  • added release notes (if not, provide an explanation in the work description)
  • updated documentation
  • Source added/refactored
  • Added unit tests
  • Added integration tests
  • Verified that tests requiring the /SNS and /HFIR filesystems pass without fail

References:

Manual test for the reviewer

(instructions to set up the environment)

Clone the instrument-settings branch of lr_reduction:

git clone -b instrument-settings https://github.com/neutrons/LiquidsReflectometer.git

Activate your RefRed conda environment, replace the existing lr_reduction installation with the local version:

conda activate refred
pip uninstall lr_reduction -y

cd /path/to/LiquidsReflectometer

# make sure you're still in the refred conda env
pip install -e .

Start RefRed GUI

(refred)> PYTHONPATH=$(pwd):$PYTHONPATH ./scripts/start_refred.py

Then load test/data/test_instrument_settings.xml (make sure /SNS is mounted via fusermount) and attempt to run reduction,

Or run tests

(refred)> pytest test/unit/RefRed/test_main.py

Check list for the reviewer

  • release notes updated, or an explanation is provided as to why release notes are unnecessary
  • best software practices
    • clearly named variables (better to be verbose in variable names)
    • code comments explaining the intent of code blocks
  • All the tests are passing
  • The documentation is up to date
  • code comments added when explaining intent

@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 78.68217% with 55 lines in your changes missing coverage. Please review.

Project coverage is 63.78%. Comparing base (a04b724) to head (60f6f44).
Report is 2 commits behind head on next.

Files with missing lines Patch % Lines
RefRed/main.py 56.79% 35 Missing ⚠️
RefRed/interfaces/instrument_settings.py 82.27% 14 Missing ⚠️
RefRed/configuration/export_xml_config.py 97.01% 2 Missing ⚠️
RefRed/configuration/loading_configuration.py 50.00% 2 Missing ⚠️
RefRed/reduction/live_reduction_handler.py 84.61% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next     #141      +/-   ##
==========================================
+ Coverage   63.60%   63.78%   +0.17%     
==========================================
  Files         117      118       +1     
  Lines        9792     9882      +90     
==========================================
+ Hits         6228     6303      +75     
- Misses       3564     3579      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@glass-ships glass-ships marked this pull request as ready for review February 5, 2025 18:58
@glass-ships glass-ships requested a review from jmborr February 6, 2025 15:12
@glass-ships glass-ships enabled auto-merge (squash) February 13, 2025 18:05
@glass-ships glass-ships requested review from mdoucet and removed request for jmborr February 13, 2025 18:05
@glass-ships glass-ships merged commit 1798d46 into next Feb 13, 2025
3 checks passed
@glass-ships glass-ships deleted the instrument-settings branch February 13, 2025 18: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.

3 participants