Links
Smalldata_tools github: https://github.com/slac-lcls/smalldata_tools
S3DF: https://s3df.slac.stanford.edu/public/doc/#/
S3DF OnDemand: https://s3df.slac.stanford.edu/pun/sys/dashboard
PyTest: https://docs.pytest.org/en/6.2.x/contents.html
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
- Bash script to run the tests:
Run table
Exp | Run | Corresponding run in xpptut15 | Detector | Test to implement |
---|---|---|---|---|
xpplv9818 | 127 | 650 | Jungfrau | ROI, projection, Spectrum Cube: image |
Opal | ||||
xppx49520 | 267 | 630 | Epix100 | droplet, photon, droplet-to-photon |
Zyla | ||||
xppx49520 | 602 | 631 | Epix100 | droplet, photon, droplet-to-photon |
mfxc00118 | 239 | 660 | Rayonix | 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 changesgit log
: show commit history
Overview
Content Tools