Skip to content

Commit 46917ca

Browse files
committed
Remove dashboard creation from pipeline.py and update pipeline.yml to include output file upload step, enhancing the pipeline's functionality and output management.
1 parent 271578d commit 46917ca

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

.github/workflows/pipeline.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,11 @@ jobs:
2929
prefect cloud login --key ${{ secrets.PREFECT_API_KEY }} --workspace ${{ secrets.PREFECT_WORKSPACE }}
3030
3131
- name: Run Pipeline
32-
run: python pipeline.py
32+
run: python pipeline.py
33+
34+
- name: Upload Output Files
35+
uses: actions/upload-artifact@v3
36+
with:
37+
name: energy-analysis-output
38+
path: output/
39+
retention-days: 7

pipeline.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,6 @@ def create_visualizations(df, latest_data, regional_avg):
137137
)
138138
fig_regional.write_html('output/regional_trends.html')
139139

140-
# 3. Create a dashboard
141-
app = Dash(__name__)
142-
143-
app.layout = html.Div([
144-
html.H1('Global Energy Transition Dashboard'),
145-
html.Div([
146-
dcc.Graph(figure=fig_transition),
147-
dcc.Graph(figure=fig_regional)
148-
])
149-
])
150-
151-
app.run_server(debug=False, port=8050)
152-
153140
return 'output/energy_transition.html', 'output/regional_trends.html'
154141

155142
@task
@@ -200,7 +187,6 @@ def energy_pipeline():
200187

201188
print(f"Pipeline completed successfully. Report saved to: {report_file}")
202189
print(f"Visualizations saved in the 'output' directory")
203-
print("Dashboard available at http://localhost:8050")
204190

205191
if __name__ == "__main__":
206192
energy_pipeline()

0 commit comments

Comments
 (0)