Skip to content

Commit

Permalink
changed structure for pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-gorman committed Oct 29, 2018
1 parent 0a706ed commit 8b11902
Show file tree
Hide file tree
Showing 42 changed files with 97 additions and 92 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ __pycache__/*
venv/*
build/*
dist/*

gui.spec
.pkl
cd
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# nem-data
# osdan
See wiki for more information.

32 changes: 0 additions & 32 deletions gui.spec

This file was deleted.

14 changes: 14 additions & 0 deletions osdan.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Metadata-Version: 2.1
Name: osdan
Version: 0.0.5
Summary: A tool for accessing AEMO data.
Home-page: https://github.com/UNSW-CEEM/osdan
Author: Nicholas Gorman
Author-email: [email protected]
License: UNKNOWN
Description: A tool for accessing AEMO data.
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown
25 changes: 25 additions & 0 deletions osdan.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
README.md
setup.py
osdan/__init__.py
osdan/custom_tables.py
osdan/data_fetch_methods.py
osdan/date_generators.py
osdan/defaults.py
osdan/downloader.py
osdan/filters.py
osdan/gui.py
osdan/hook-pandas.py
osdan/processing_info_maps.py
osdan/query_wrapers.py
osdan/rows.py
osdan/test_data_fetch_methods.py
osdan/test_date_generators.py
osdan/test_filters.py
osdan/test_performance_stats.py
osdan/test_processing_info_maps.py
osdan/test_query_wrapers.py
osdan/write_file_names.py
osdan.egg-info/PKG-INFO
osdan.egg-info/SOURCES.txt
osdan.egg-info/dependency_links.txt
osdan.egg-info/top_level.txt
1 change: 1 addition & 0 deletions osdan.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions osdan.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
osdan
1 change: 1 addition & 0 deletions osdan/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
name = "osdan"
Binary file added osdan/__pycache__/custom_tables.cpython-36.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added osdan/__pycache__/date_generators.cpython-36.pyc
Binary file not shown.
Binary file added osdan/__pycache__/defaults.cpython-36.pyc
Binary file not shown.
Binary file added osdan/__pycache__/defaults.cpython-37.pyc
Binary file not shown.
Binary file added osdan/__pycache__/downloader.cpython-36.pyc
Binary file not shown.
Binary file added osdan/__pycache__/filters.cpython-36.pyc
Binary file not shown.
Binary file not shown.
Binary file added osdan/__pycache__/query_wrapers.cpython-36.pyc
Binary file not shown.
Binary file added osdan/__pycache__/rows.cpython-36.pyc
Binary file not shown.
Binary file added osdan/__pycache__/rows.cpython-37.pyc
Binary file not shown.
Binary file added osdan/__pycache__/write_file_names.cpython-36.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion compiling to exe → osdan/compiling to exe
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Use call like:

# Add to spec file
a.datas += [('favicon.ico', 'C:\\Users\\user\\Documents\\GitHub\\nem-data\\favicon.ico', 'DATA')]
a.datas += [('favicon.ico', 'C:\\Users\\user\\Documents\\GitHub\\osdan\\favicon.ico', 'DATA')]

# Run in terminal
C:\Users\user\AppData\Local\Programs\Python\Python36\python.exe -m PyInstaller --onefile --icon=favicon.ico gui.py
Expand Down
8 changes: 2 additions & 6 deletions custom_tables.py → osdan/custom_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,8 @@
from datetime import timedelta, datetime
import math
import numpy as np
from osdan import defaults, data_fetch_methods, filters

import os

if os.getcwd().split('\\')[-1] == 'osdan':
import defaults, data_fetch_methods
else:
from osdan import defaults, data_fetch_methods

def fcas4s_scada_match(start_time, end_time, table_name, raw_data_location, select_columns=None, filter_cols=None,
filter_values=None):
Expand Down Expand Up @@ -360,3 +355,4 @@ def trading_and_dispatch_cost():
scada_and_regions = scada_and_regions.groupby('DUID').sum()

scada_and_regions.to_csv('C:/Users/user/Documents/dispatch_trading_cost.csv')

7 changes: 2 additions & 5 deletions data_fetch_methods.py → osdan/data_fetch_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
from datetime import datetime, timedelta
import pandas as pd
import feather

if os.getcwd().split('\\')[-1] == 'osdan':
import filters, downloader, processing_info_maps, custom_tables, defaults
else:
from osdan import filters, downloader, processing_info_maps, custom_tables, defaults
from osdan import filters, downloader, processing_info_maps, defaults, custom_tables
print(custom_tables.__file__)


def dynamic_data_compiler(start_time, end_time, table_name, raw_data_location, select_columns=None, filter_cols=None,
Expand Down
8 changes: 1 addition & 7 deletions date_generators.py → osdan/date_generators.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import os

if os.getcwd().split('\\')[-1] == 'osdan':
import defaults
else:
from osdan import defaults

from osdan import defaults
from calendar import monthrange


Expand Down
2 changes: 1 addition & 1 deletion defaults.py → osdan/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
'DISPATCHTYPE', 'CONSTRAINTID', 'PREDISPATCH', 'STPASA', 'MTPASA', 'LIMITTYPE', 'STATIONNAME',
'AGCFLAG', 'INTERCONNECTORID', 'NAME', 'Fuel Source - Primary', 'Fuel Source - Descriptor',
'Technology Type - Primary', 'Technology Type - Descriptor', 'ELEMENTNUMBER', 'MARKETNAME',
'VARIABLENUMBER', 'VARIABLETYPE', 'MMSDESCRIPTOR', 'ELEMENTTYPE']
'VARIABLENUMBER', 'VARIABLETYPE', 'MMSDESCRIPTOR', 'ELEMENTTYPE', 'Region']

table_columns = {

Expand Down
6 changes: 1 addition & 5 deletions downloader.py → osdan/downloader.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import requests
import zipfile
import io
import os
from osdan import defaults

if os.getcwd().split('\\')[-1] == 'osdan':
import defaults
else:
from osdan import defaults


def run(year, month, day, index, filename, down_load_to):
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions gui.py → osdan/gui.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import rows
import defaults
import data_fetch_methods
from osdan import rows
from osdan import defaults
from osdan import data_fetch_methods
import pandas as pd
import tkinter as tk
import tkinter.ttk as ttk
Expand Down
File renamed without changes.
6 changes: 2 additions & 4 deletions processing_info_maps.py → osdan/processing_info_maps.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import os

if os.getcwd().split('\\')[-1] == 'osdan':
import filters, downloader, query_wrapers, write_file_names, date_generators
else:
from osdan import filters, downloader, query_wrapers, write_file_names, date_generators
from osdan import filters, downloader, query_wrapers, write_file_names, date_generators


setup = {'DISPATCHLOAD': None,
'TRADINGLOAD': None,
Expand Down
6 changes: 1 addition & 5 deletions query_wrapers.py → osdan/query_wrapers.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import pandas as pd
from datetime import datetime, timedelta
import os
from osdan import defaults

if os.getcwd().split('\\')[-1] == 'osdan':
import defaults
else:
from osdan import defaults


def dispatch_date_setup(start_time, end_time):
Expand Down
2 changes: 1 addition & 1 deletion rows.py → osdan/rows.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tkinter as tk
import tkinter.ttk as ttk
import defaults
from osdan import defaults


class Query:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import unittest
from datetime import timedelta
import data_fetch_methods
import defaults
from osdan import data_fetch_methods
from osdan import defaults
import pandas as pd
import custom_tables
from osdan import custom_tables


class TestDynamicDataCompilerWithSettlementDateFiltering(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion test_date_generators.py → osdan/test_date_generators.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
from datetime import datetime
import date_generators
from osdan import date_generators


class TestYearAndMonthGen(unittest.TestCase):
Expand Down
2 changes: 1 addition & 1 deletion test_filters.py → osdan/test_filters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import unittest
import pandas as pd
import filters
from osdan import filters
from pandas.util.testing import assert_frame_equal
from datetime import datetime
import numpy as np
Expand Down
6 changes: 3 additions & 3 deletions test_performance_stats.py → osdan/test_performance_stats.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import unittest
import data_fetch_methods
from osdan import data_fetch_methods
import pandas as pd
import custom_tables
from osdan import custom_tables
import math
import numpy as np
import time
import defaults
from osdan import defaults
from datetime import datetime, timedelta
import os

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import unittest
import processing_info_maps
import data_fetch_methods
import defaults
from osdan import processing_info_maps
from osdan import data_fetch_methods
from osdan import defaults
import pandas as pd
from datetime import datetime
import query_wrapers
from osdan import query_wrapers


class TestSearchTypeValidity(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions test_query_wrapers.py → osdan/test_query_wrapers.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import unittest
import pandas as pd
import query_wrapers
from osdan import query_wrapers
from pandas.util.testing import assert_frame_equal
from datetime import datetime
import defaults
from osdan import defaults


class TestDispatchDateSetup(unittest.TestCase):
Expand Down
7 changes: 1 addition & 6 deletions write_file_names.py → osdan/write_file_names.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
import os

if os.getcwd().split('\\')[-1] == 'osdan':
import defaults
else:
from osdan import defaults

from osdan import defaults

def write_file_names(name, month, year, day, index, raw_data_location):
# Add the year and month information to the generic AEMO file name
Expand Down
21 changes: 21 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import setuptools

with open("README.md", "r") as fh:
long_description = fh.read()

setuptools.setup(
name="osdan",
version="0.0.5",
author="Nicholas Gorman",
author_email="[email protected]",
description="A tool for accessing AEMO data.",
long_description="A tool for accessing AEMO data.",
long_description_content_type="text/markdown",
url="https://github.com/UNSW-CEEM/osdan",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: GNU General Public License (GPL)",
"Operating System :: OS Independent",
],
)

0 comments on commit 8b11902

Please sign in to comment.