Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Example test from pcdsdevices: https://github.com/pcdshub/pcdsdevices/tree/master/pcdsdevices/tests

Pytest fixture: https://betterprogramming.pub/understand-5-scopes-of-pytest-fixtures-1b607b5c19ed

On-boarding

  • LCLS Linux account
  • S3DF account
  • Setup bashrc and environment
  • Clone smalldata_tools
  • Read pytest docs

Implementation

  • Two test suites:
    • LCLS-I
    • LCLS-II (TBD)
  • Source env (subprocess.run? or have a bash script to source env and run tests)
  • Tests:
    • Bash script to run the tests:
      • Source env
      • Run detector tests
    • One file per detector
    • Load / instantiate the different detectors
    • Test commonly used function: see 1.2.2 Details of the area detector analysis: DetObjectFunc to see how to implement functions
      • ROI
      • Projection
      • Azimuthal integration
      • Droplet
      • Photon
    • Cube

Run table

ExpRunCorresponding run in xpptut15DetectorTest to implement
xpplv9818127650Jungfrau

ROI, projection,

Spectrum

Cube: image




Opal
xppx49520 267630Epix100droplet, photon, droplet-to-photon



Zyla
xppx49520 602631Epix100droplet, photon, droplet-to-photon
mfxc00118239660Rayonix

Azimuthal integration

Cube: azav

Git

Workflow

  • Make a  branch: git checkout -b branch_name
  • Develop code on the branch
  • Commit at regular interval: git commit -m "a commit message"
  • Keep track of master branch: if another pull request has been merged, you want to include these new changes in your code.
    • git checkout master
    • git pull
    • git checkout branch_name
    • git merge master
    • Resolve conflict if any
  • When a milestone or an important step is reached make a pull request on github

Some useful commands

  • git status
  • git diff: show uncommitted changes
  • git log: show commit history