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

Modify IQazimuthal.to_workspace() #992

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

backmari
Copy link
Contributor

@backmari backmari commented Jan 16, 2025

Description of work:

The IQazimuthal attributes qx, qy, intensity and error can be 1D or 2D arrays and the function IQazimuthal.to_workspace() had to be updated to handle all cases.

This does not require a release note since it fixes a bug that has not been released.

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

Run test_EWM367.ipynb and verify that the error message about SaveNXcanSAS-v1 no longer appears and the canSAS file is saved successfully. Compare the canSAS output file r27387_AgBeh_Banjo_lambda6p44_2D_main.h5 with the ASCII file r27387_AgBeh_Banjo_lambda6p44_2D_main.dat, for example by loading in SasView and plotting.

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

Execution of tests requiring the /SNS and /HFIR filesystems

It is strongly encouraged that the reviewer runs the following tests in their local machine
because these tests are not run by the GitLab CI. It is assumed that the reviewer has the /SNS and /HFIR filesystems
remotely mounted in their machine.

cd /path/to/my/local/drtsans/repo/
git fetch origin merge-requests/<MERGE_REQUEST_NUMBER>/head:mr<MERGE_REQUEST_NUMBER>
git switch mr<MERGE_REQUEST_NUMBER>
conda activate <my_drtsans_dev_environment>
pytest -m mount_eqsans ./tests/unit/ ./tests/integration/

In the above code snippet, substitute <MERGE_REQUEST_NUMBER> for the actual merge request number. Also substitute
<my_drtsans_dev_environment> with the name of the conda environment you use for development. It is critical that
you have installed the repo in this conda environment in editable mode with pip install -e . or conda develop .

@jmborr jmborr self-requested a review January 17, 2025 15:10
Copy link
Member

@jmborr jmborr left a comment

Choose a reason for hiding this comment

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

code looks 👌 and manual test works as expected

@backmari backmari merged commit acbfcd2 into next Jan 17, 2025
3 checks passed
@backmari backmari deleted the iqazimuthal_to_workspace branch January 17, 2025 17:31
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