Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webapp #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dist/
downloads/
eggs/
.eggs/
lib/
#lib/
lib64/
parts/
sdist/
Expand Down
Empty file removed chemeco/webapp/__init__.py
Empty file.
27 changes: 27 additions & 0 deletions lib/chemecoshell
Original file line number Diff line number Diff line change
@@ -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)
7 changes: 5 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
license='BSD-3C',
packages=setuptools.find_packages(),
scripts=['lib/chemecoshell'],
scripts=['lib/chemecoshell', 'webapp/chemecoweb'],
install_requires=[
'future',
'six',
Expand All @@ -33,7 +33,10 @@
'ipywidgets',
'widgetsnbextension',
'chemml',
'scikit-learn'
'scikit-learn',
'plotly',
'dash == 0.42.0',
'dash-daq == 0.1.0'
],
extras_require={
'docs': [
Expand Down
35 changes: 35 additions & 0 deletions webapp/chemecoweb
Original file line number Diff line number Diff line change
@@ -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)