From 253c8d7ae99ddda1b6dbf9af48e3c0980e68d496 Mon Sep 17 00:00:00 2001 From: Dan Howe Date: Fri, 15 Feb 2019 15:12:29 +1100 Subject: [PATCH] Add setup.py --- setup.py | 10 ++++++++++ waternsw_grabber/waternsw_grabber.py | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 setup.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..dba7d7e --- /dev/null +++ b/setup.py @@ -0,0 +1,10 @@ +from setuptools import setup + +setup( + name='waternsw_grabber', + version='0.1.0', + packages=['waternsw_grabber'], + install_requires=['pandas', 'selenium', 'requests', 'lxml', 'tqdm'], + author='Dan Howe', + author_email='d.howe@wrl.unsw.edu.au', + description='Download bore records from the WaterNSW data portal.') diff --git a/waternsw_grabber/waternsw_grabber.py b/waternsw_grabber/waternsw_grabber.py index 617aadc..19ae156 100644 --- a/waternsw_grabber/waternsw_grabber.py +++ b/waternsw_grabber/waternsw_grabber.py @@ -1,3 +1,7 @@ +"""waternsw_grabber.py +Download bore records from the WaterNSW data portal. +""" + import os import re import time @@ -49,6 +53,18 @@ def wait_for_element(driver, by, x, timeout=60): def get_telemetered_bore(driver, bore_id, start_date, end_date): + """Download records from telemetered bore. + + Args: + driver: selenium webdriver object + bore_id: bore id (string) + start_date: start date (string in ISO-8601 format) + end_date: end date (string in ISO-8601 format) + + Returns: + input values in model scale + """ + url = 'https://realtimedata.waternsw.com.au/water.stm' driver.get(url)