diff --git a/.gitignore b/.gitignore index 1d4e115..20a18ab 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,7 @@ dist/ downloads/ eggs/ .eggs/ -lib/ +#lib/ lib64/ parts/ sdist/ diff --git a/chemeco/webapp/__init__.py b/chemeco/webapp/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/lib/chemecoshell b/lib/chemecoshell new file mode 100644 index 0000000..b5ad362 --- /dev/null +++ b/lib/chemecoshell @@ -0,0 +1,27 @@ +#! /usr/bin/env python + +import argparse +from chemeco import ChemEcoRun + +parser = argparse.ArgumentParser( + description= + "ChemEco runs an input file that follows the instructions to describe the data mining workflow." +) +parser.add_argument( + "-i", + type=str, + required=True, + help="input file: path to the ChemEco's input file name and its format." +) +parser.add_argument( + "-o", + type=str, + required=True, + help= + "output directory: path to the output directory. If it's not unique an incremental foldername will be created." +) +args = parser.parse_args() +SCRIPT_NAME = args.i +output_directory = args.o + +ChemEcoRun(INPUT_FILE=SCRIPT_NAME, OUTPUT_DIRECTORY=output_directory) diff --git a/setup.py b/setup.py index 4b73060..5fd21cd 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ }, license='BSD-3C', packages=setuptools.find_packages(), - scripts=['lib/chemecoshell'], + scripts=['lib/chemecoshell', 'webapp/chemecoweb'], install_requires=[ 'future', 'six', @@ -33,7 +33,10 @@ 'ipywidgets', 'widgetsnbextension', 'chemml', - 'scikit-learn' + 'scikit-learn', + 'plotly', + 'dash == 0.42.0', + 'dash-daq == 0.1.0' ], extras_require={ 'docs': [ diff --git a/webapp/chemecoweb b/webapp/chemecoweb new file mode 100644 index 0000000..0a99473 --- /dev/null +++ b/webapp/chemecoweb @@ -0,0 +1,35 @@ +#! /usr/bin/env python + +import dash +import dash_core_components as dcc +import dash_html_components as html + +external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] + +app = dash.Dash(__name__, external_stylesheets=external_stylesheets) + +app.layout = html.Div( + children=[ + html.H1(children='ChemEco'), + + html.Div(children=''' + ChemEco: A web application framework for data mining and machine learning. + '''), + + dcc.Graph( + id='example-graph', + figure={ + 'data': [ + {'x': [1, 2, 3], 'y': [4, 1, 2], 'type': 'bar', 'name': 'ChemML'}, + {'x': [1, 2, 3], 'y': [2, 4, 5], 'type': 'bar', 'name': 'ChemEco'}, + ], + 'layout': { + 'title': 'ChemEco Workflow Visualization' + } + } + ) + ] + ) + +if __name__ == '__main__': + app.run_server(debug=True) \ No newline at end of file