Spaces:
Sleeping
Sleeping
basic form layout and readme - initial commit
Browse files
README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
colorFrom: blue
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
@@ -10,4 +10,8 @@ pinned: false
|
|
10 |
license: apache-2.0
|
11 |
---
|
12 |
|
13 |
-
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
title: Submit Your Plugin to the Impact Framework
|
3 |
+
emoji: 🔌➕
|
4 |
colorFrom: blue
|
5 |
colorTo: indigo
|
6 |
sdk: gradio
|
|
|
10 |
license: apache-2.0
|
11 |
---
|
12 |
|
13 |
+
This is a sample form users would have to submit in order to have their plugin listed on the Impact Framework directory. The form is designed to ensure there is clarity about what each plugin does, as well as what input it requires, and what data it outputs.
|
14 |
+
|
15 |
+
The form is designed to make it easy to understand what functional units each data type is listed in, as well as to make it easy to find the sources of data used by the plugin, as well as the assumptions made by each plugin where calculation must be estimated rather than measured.
|
16 |
+
|
17 |
+
In addition, this form aims to identify plugins that might naturally preclude this plugin in a standard pipeline based on the required inputs, as well as compatible plugins that might follow this plugin in a pipeline based on its outputs.
|
app.py
ADDED
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
css = """
|
4 |
+
.plugin-accordion button span:first-child {
|
5 |
+
font-size: 1.25rem !important;
|
6 |
+
}
|
7 |
+
"""
|
8 |
+
|
9 |
+
with gr.Blocks(css=css) as registry_submit:
|
10 |
+
gr.Markdown("# 🔌 Impact Framework Plugin Registry Submission")
|
11 |
+
gr.Markdown("Fill out the form below to submit your plugin to the Impact Framework Registry")
|
12 |
+
|
13 |
+
with gr.Accordion("Plugin Details",open=True,elem_classes=["plugin-accordion"]):
|
14 |
+
plugin_name = gr.Textbox(placeholder="What is the name of your plugin?", label="Plugin Name")
|
15 |
+
plugin_description = gr.Textbox(placeholder="What does your plugin do?", label="Plugin Description",lines=3)
|
16 |
+
plugin_url = gr.Textbox(placeholder="https://[your_website.com]", label="Plugin URL", info="Enter the URL where more info can be found about your plugin")
|
17 |
+
plugin_info = gr.Textbox(placeholder="Add any additional info we should know about your plugin", label="Plugin Info",lines=3)
|
18 |
+
|
19 |
+
with gr.Accordion("Plugin Inputs",open=True,elem_classes=["plugin-accordion"]):
|
20 |
+
gr.Markdown("This is where you put the data your plugin requires")
|
21 |
+
|
22 |
+
with gr.Row(elem_classes=["input-row"],variant="panel"):
|
23 |
+
plugin_input_1 = gr.Textbox(placeholder="Input name", label="Input Name", info="What is the name of the input?",scale=2)
|
24 |
+
plugin_input_1_type = gr.Dropdown(["Text", "Number", "Boolean"], label="Input Type",value="Text",interactive=True,info="What data type does your input expect",scale=2)
|
25 |
+
plugin_input_1_units = gr.Textbox(placeholder="Watts, Lbs CO2e, etc", label="Units", info="What units of measurement does the input expect?",scale=2)
|
26 |
+
plugin_input_1_required = gr.Checkbox(label="Required", value=False,scale=1)
|
27 |
+
|
28 |
+
with gr.Row(elem_classes=["input-row"]):
|
29 |
+
plugin_add_input = gr.Button("Add Input")
|
30 |
+
|
31 |
+
with gr.Accordion("Plugin Outputs",open=True,elem_classes=["plugin-accordion"]):
|
32 |
+
gr.Markdown("This is the data your plugin will return")
|
33 |
+
|
34 |
+
with gr.Row(elem_classes=["output-row"],variant="panel"):
|
35 |
+
plugin_output_1 = gr.Textbox(placeholder="Output name", label="Output Name", info="What is the name of the output?")
|
36 |
+
plugin_output_1_type = gr.Dropdown(["Text", "Number", "Boolean"], label="Output Type",value="Text",interactive=True,info="What data type does your output expect")
|
37 |
+
plugin_output_1_units = gr.Textbox(placeholder="Watts, Lbs CO2e, etc", label="Units", info="What units of measurement does the output expect?")
|
38 |
+
|
39 |
+
with gr.Row(elem_classes=["output-row"]):
|
40 |
+
plugin_add_output = gr.Button("Add Output")
|
41 |
+
|
42 |
+
with gr.Accordion("Plugin Data",open=True,elem_classes=["plugin-accordion"]):
|
43 |
+
gr.Markdown("This is where you put information about your plugin's data sources and assumptions")
|
44 |
+
|
45 |
+
with gr.Row(elem_classes=["data-row"],variant="panel"):
|
46 |
+
with gr.Column():
|
47 |
+
with gr.Row():
|
48 |
+
plugin_data_source_1 = gr.Textbox(placeholder="Data source name", label="Data Source Name", info="What is the name of the data source?")
|
49 |
+
plugin_data_source_1_url = gr.Textbox(placeholder="URL", label="Data Source URL", info="What is the URL of the data source?")
|
50 |
+
with gr.Row():
|
51 |
+
plugin_data_source_1_description = gr.Textbox(placeholder="Description / Citation", label="Data Source Description", info="What does the data source contain, or what is the reference citation?")
|
52 |
+
with gr.Row(elem_classes=["data-row"]):
|
53 |
+
plugin_add_data_source = gr.Button("Add Data Source")
|
54 |
+
|
55 |
+
with gr.Accordion("Compatible Plugins",open=True,elem_classes=["plugin-accordion"]):
|
56 |
+
|
57 |
+
gr.Markdown("## Input Plugins")
|
58 |
+
gr.Markdown("List any known plugins that can provide input into your plugin")
|
59 |
+
|
60 |
+
with gr.Row(elem_classes=["input-row"],variant="panel"):
|
61 |
+
with gr.Column():
|
62 |
+
# a url field for the registry page where the plugin can be found
|
63 |
+
plugin_input_plugin_1 = gr.Textbox(placeholder="https://greensoftware.foundation/if/[ID]", label="Plugin URL", info="Enter the impact framework registry URL where the plugin can be found")
|
64 |
+
with gr.Column():
|
65 |
+
gr.Markdown("Alternatively, search for plugins that are compatible with your required inputs")
|
66 |
+
# a button to help users find compatible plugins
|
67 |
+
plugin_find_input_plugin = gr.Button("Find Compatible Plugins")
|
68 |
+
gr.Button("Add Input Plugin")
|
69 |
+
|
70 |
+
gr.Markdown("## Dependent Plugins")
|
71 |
+
gr.Markdown("List any plugins that can utilize the output of your plugin")
|
72 |
+
|
73 |
+
with gr.Row(elem_classes=["output-row"],variant="panel"):
|
74 |
+
with gr.Column():
|
75 |
+
plugin_output_plugin_1 = gr.Textbox(placeholder="https://greensoftware.foundation/if/[ID]", label="Plugin URL", info="Enter the impact framework registry URL where the plugin can be found")
|
76 |
+
with gr.Column():
|
77 |
+
gr.Markdown("Alternatively, search for plugins that are compatible with your output")
|
78 |
+
plugin_find_output_plugin = gr.Button("Find Compatible Plugins")
|
79 |
+
gr.Button("Add Output Plugin")
|
80 |
+
|
81 |
+
gr.Button("Submit Plugin",variant="primary")
|
82 |
+
|
83 |
+
|
84 |
+
|
85 |
+
#btn = gr.Button("Run")
|
86 |
+
#btn.click(fn=update, inputs=inp, outputs=out)
|
87 |
+
|
88 |
+
registry_submit.launch()
|