WSWUP / agweather-qaqc

Visualized QA/QC of weather station data
https://wswup.github.io/agweather-qaqc/
Apache License 2.0
20 stars 11 forks source link

Development towards an automated process #8

Closed MorningGlory747 closed 3 years ago

MorningGlory747 commented 5 years ago

Greetings,

I thoroughly enjoy this QAQC package and especially the documentation that’s being provided; it makes learning this package far easier and smoother than most other packages. I would like to make an automated process of it for personal weather stations. From my understanding, it seems like pyWeatherQAQC only works through manual inputs. However, if I were to be content with one specific kind of input (say the default one), would there be any way for to me automate this process? Perhaps I could write down a simple text file that has all the steps/inputs written down and so there would be no need for me (or another user) to go through the process of correcting the data every day? Are there any developments in that regard? Perhaps this has already been considered but deemed irrelevant?

Thank you,

cwdunkerly commented 5 years ago

I'm very glad to hear you enjoy the package. Making this an automatable process is an end goal of this project.

Right now I am in the middle of rewriting this repository into a more class-focused approach, with each single instance of a qaqc class processing a single weather station. Once this is done automation will be the next step.

There is a trade-off that exists between automating work and being able to correct it most effectively, which is why the repo has been so focused on manual work, however for what you describe I think automation makes sense.

You can watch the repo to keep track of updates, but I will respond again and close this issue once automation has been added so you can be notified that way.

MorningGlory747 commented 5 years ago

Duly noted. Thanks!

cwdunkerly commented 5 years ago

I have added an option to the config file that will automatically apply the default correction to each variable you select, and then allow you to accept/reject those corrections.

You still have to manually select each variable you wish to correct, but this should save you a few keystrokes.

A more fully automatic mode is still planned for the future, but I wanted to let you know this half measure exists to make your life a little easier should you need it now.

cwdunkerly commented 3 years ago

@MorningGlory747 If you're still interested in this, check out the dev branch, I have added default options to the CLI through the click library, so you can automate the process with a library like pyautogui. Quick example:

import pyautogui
import sys
import time

while True:
    time.sleep(2)
    pyautogui.click()
    time.sleep(0.5)
    pyautogui.press('up')
    time.sleep(0.5)
    pyautogui.press('enter')

Where you have pyautogui running in one terminal window, leaving the mouse hovered over a second terminal window running pyWeatherQAQC. You could use this approach to process stations overnight when you're not otherwise using your PC.

I do not have plans to flesh this out more than this for the near future, so I am closing this issue. I hope this is of at least some assistance to you.