We are planning on refactoring
rubin_sim in the coming months. The
rubin_sim repo is now home to the scheduler algorithm, MAF (for analyzing simulated surveys),
photUtils, our sky brightness model, and more. This represents a large collection of code written by numerous authors over many years. As such, the code does not follow consistent naming and style conventions, making it tough for new (and old) users to read and contribute.
Our plan is to go through and refactor the code to follow the standard PEP-8 conventions. Namely:
• Python classes use PascalCase
• methods, functions, and variables use snake_case
• We will continue to run
black on the code to enforce consistent style
While we’re refactoring, figured we might as well also:
• change all file and directory names to lower case
• shell command flags should all be --lower or --snake_case
• make sure all internal variables that are angles are in radians and have
_rad on them
• Make other useful name changes for clarity (maybe Core_scheduler → ObservationScheduler)
• Update the database schema used for saving simulated observations
• Update docstrings and unit tests
This post is here to:
- Warn users that if you have code that uses rubin_sim we will almost certainly be breaking it in the near future by renaming things. The code is on GitHub and conda-forge, so you can always install a previous version if you want to run your old code without updating.
- Solicit any comments or suggestions. If anyone has good ideas on what something should be renamed, or if you’d like to help beta-test after the refactor we’d love to hear it.