# stop running server, if runningrails db:droprails db:createrails db:migraterails db:seed
Refresh database (automatic)
# stop running server, if runningrails db:f # refresh (runs drop/create/migrate/seed)rails db:fs # refresh & start server
Run weather jobs
# normally, use this one (per-project basis)rails c # rails consolep = Project.find_by(id:1) # change id to desired project idrails runner WeatherLogLastHourJob.perform_now(p) # backfills data to current timerails runner WeatherLogPredictiveJob.perform_now(p)# only run the following if you want to perform this for all existing projectsrails runner WeatherLogLastHourJob.perform_nowrails runner WeatherLogPredictiveJob.perform_now# get out of rails console# ctrl + z# NOTE: may need to exit this terminal completely if you try to refresh database# and it says something is still accessing it, so you can't
Run rubocop (formatter) (may fix PR build fails)
rubocop -a
Run tests
rails t test/controllers/api/v2 # all v2 testsrails t test/controllers/api/v2/x_controller_test.rb# specific v2 testrails t test/controllers/api/v2/x_controller_test.rb:80#specific line (any line inside the "it" block)
Getting a lot of real weather data on develop or staging to test out weatherLog-related UI
"when I want to test with real data, I create a project with a start date of ~1 month ago. it will backfill weather from there (you can do that on develop also)" - Steven