-
Notifications
You must be signed in to change notification settings - Fork 32
Coding Style
Below are notes on coding style we follow when working on Sirepo.
The style we use is constantly evolving as we learn more about the problem we are solving and the languages we are using. If you see something that does not conform to the style here it is likely that our style has evolved and it is time to refactor that code!
Our Python style inherits from the pykern coding style.
Do not use aliases for imports (ex. import numpy as np
). Aliases cause confusion about where an import originates from and the non-aliased name is clearer.
We no longer support py2 so if you see from __future__
you can remove them.
We support ES6 so use template strings when you see fit. In the case of multiline strings they are preffered over our older syntax of `['foo', 'bar'].join('').
License: http://www.apache.org/licenses/LICENSE-2.0.html
Copyright ©️ 2015–2020 RadiaSoft LLC. All Rights Reserved.
- Activait
- Controls
- elegant
- FLASH
- Genesis
- JSPEC
- JupyterHub
- MAD-X
- OPAL
- Radia
- Shadow
- Synchrotron Radiation Workshop (SRW)
- Warp PBA
- Warp VND
- Zgoubi
- Authentication and Account Creation
- How Your Sirepo Workspace Works
- Navigating the Sirepo Simulations Interface
- How to upload a lattice file
- How to share a Sirepo simulation via URL
- How Example simulations work
- How to report a bug in Sirepo
- Using lattice files in Sirepo
- Resetting an Example Simulation to default
- Backup SRW Sirepo simulations
- SRW Aperture
- SRW Brilliance Report
- SRW Circular Cylinder Mirror
- SRW CRL
- SRW Crystal
- SRW Electron Beam
- SRW Elliptical Cylinder Mirror
- SRW Fiber
- SRW Flux
- SRW Fully Coherent Gaussian Beam
- SRW Import Python or JSON Simulation File
- SRW Initial Wavefront Simulation Grid
- SRW Intensity Report
- SRW Planar Mirror
- SRW Power Density Report
- SRW Propagation Parameters
- SRW Single Electron Spectrum Report
- SRW Spherical Mirror
- SRW Toroid Mirror
- SRW Watchpoint
- SRW Additional Documentation