diff --git a/.gitignore b/.gitignore index 4a15f57..021c63b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ .DS_Store +solardash.egg-info +p +*.pyc root/js/solardash.file.js +root/js/solardash.https.js diff --git a/Makefile b/Makefile index 86f88df..3332f13 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,12 @@ .PHONY: all .SUFFIXES: .jspp .js +PROJNAME=solardash +VIRTUALENV ?= virtualenv-3.7 +VRITUALENVARGS = + +FILES=$(PROJNAME)/__init__.py + JSFILES = root/js/solardash.file.js root/js/solardash.https.js THIRDPARTYJS = root/js/jquery.js root/js/highstock.js @@ -26,3 +32,12 @@ all: $(JSFILES) keepupdate: find . -name '*.js' -o -name '*.jspp' | entr make all + +test: + (ls $(FILES) $(JSFILES) | entr sh -c 'make all && python -m coverage run -m unittest $(PROJNAME) && coverage report --omit=p/\* -m -i') + +test-noentr: + python -m coverage run -m unittest $(PROJNAME) && coverage report --omit=p/\* -m -i + +env: + ($(VIRTUALENV) $(VIRTUALENVARGS) p && . ./p/bin/activate && pip install -r requirements.txt) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..5fd4dda --- /dev/null +++ b/requirements.txt @@ -0,0 +1,7 @@ +# use setup.py for dependancy info +-e . + +-e .[dev] + +# Following are to allow for co-development +-e git+ssh://git@git.funkthat.com:822/jmg/RainEagle.git#egg=RainEagle[dev] diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..9624af6 --- /dev/null +++ b/setup.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +from setuptools import setup + +setup(name='solardash', + version='0.1.0', + description='Dashboard for monitoring a solar system', + author='John-Mark Gurney', + author_email='jmg@funkthat.com', + classifiers=[ + 'Development Status :: 3 - Alpha', + 'License :: OSI Approved :: BSD License', + ], + url='https://www.funkthat.com/gitea/jmg/solardash', + packages=[ 'solardash', ], + install_requires=[ + 'RainEagle @ git+https://www.funkthat.com/gitea/jmg/RainEagle.git', + ], + extras_require = { + 'dev': [ 'coverage' ], + }, + entry_points={ + 'console_scripts': [ + ] + } +) diff --git a/solardash/__init__.py b/solardash/__init__.py new file mode 100644 index 0000000..e69de29