trynthink / scout

A tool for estimating the future energy use, carbon emissions, and capital and operating cost impacts of energy efficiency and demand flexibility technologies in the U.S. residential and commercial building sectors.
https://scout.energy.gov
Other
61 stars 23 forks source link

Web app and PostgreSQL database tests should not rely on ecm_prep.py and run.py #265

Open trynthink opened 2 years ago

trynthink commented 2 years ago

The tests of the web app PostgreSQL database and code that interacts with the database currently require that ecm_prep,py and run.py have been run so that their output files in the local file system can be used by the tests. Ideally, the tests would generate the required data using ecm_prep.py and run.py and store the outputs in temporary files or in memory while the tests run, to be swept away after the tests are complete. This approach ensures that the tests will run appropriately even with e.g., GitHub Actions or locally when the Scout repo is cloned for the first time.

It is possible that the tests should also include encapsulated ECM definitions, though it's not clear whether that's a firm requirement.