This page groups items that should be refactored in order to keep the codebase healthy. These items are not high priority but fixing them would make it easier to maintain the project. Any item that is done should be removed from the list.

1. Small Items

  • move solar data generation code outside pearlcertification/reports/utils/cr/solar_cr.py to the respective graph classes and maybe create a graph base class with get_data, build_graph, get_png

  • Remove the bad pattern of including the address inline in the firm for using crispy.

  • Think about better implementation for MLS reports generation so that the api to generate an MLS report is consistent with how other reports are handled. Currently get_report for MLS returns ALL MLS reports rather than just one of them.

  • add a documentation section to describe the business problem with videos about what each asset is and what and what enhancing it looks like. A good sample video is this one.

2. Bigger Items

2.1. Setup Tests

  • finish the docs for testing

    • prep some resources to read before writing tests

    • summarize important notes on testing

  • Integrate coverage and add its usage instructions to the project docs.

2.2. Outstanding tasks

Outstanding tasks table might need a re-implementation if we keep adding new tasks that should appear. Maybe a formal task model is needed.

2.3. Scoring

  • Remove initial values and make sure they are no longer needed in the scoring code. Add scoring questions instead which should be a list of field_names that are necessary for calculating the score for each asset model

  • Refactor the scoring classes so that the question values are attributes of the scoring class, i.e. we will be able to write: self.rvalue instead of self.asset.get(‘explicit_r_value’). Also, we can set initial values if needed in one place.

  • This can only be done after covering scoring function with tests (preferably 100%) and it be done only in the latest scoring version (we do have scoring tests).

2.4. Writing Tests

  • simple tests for views and views perms: the views tests should help in detecting an refactoring regressions going forward.

  • test reports data generation

  • test helper functions/classes

2.5. Staging Deployment

  • Easier commands: deployall without args

  • Ability to set scripts/env vars to be run before starting the deployment

  • Using ansible to make the deployment from WSL or ubuntu

  • Separate repo for deployment to track changes to deployment scripts.