forked from superlinear-ai/poetry-cookiecutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Streamlit app option to cookiecutter (#2)
* feat: add with_streamlit cookiecutter option * chore: rename with_streamlit cookiecutter var * feat: add VSCode debug launch config * chore: update LICENSE date * chore(README): fixed syntax
- Loading branch information
Showing
10 changed files
with
82 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,4 +48,5 @@ __pycache__/ | |
.terraform/ | ||
|
||
# VS Code | ||
.vscode/ | ||
.vscode/* | ||
!.vscode/launch.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,4 +51,5 @@ __pycache__/ | |
.terraform/ | ||
|
||
# VS Code | ||
.vscode/ | ||
.vscode/* | ||
!.vscode/launch.json |
29 changes: 29 additions & 0 deletions
29
{{ cookiecutter.__project_name_kebab_case }}/.vscode/launch.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"configurations": [ | ||
{%- if cookiecutter.with_streamlit_app %} | ||
{ | ||
"name": "Streamlit app debug", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"module": "streamlit", | ||
"args": [ | ||
"run", | ||
"--browser.gatherUsageStats", | ||
"false", | ||
"--server.address", | ||
"0.0.0.0", | ||
"--server.port", | ||
"8000", | ||
"src/{{ cookiecutter.__project_name_snake_case }}/app.py" | ||
], | ||
"justMyCode": true | ||
}, | ||
{%- endif %} | ||
{ | ||
"name": "Python Debugger: Python File", | ||
"type": "debugpy", | ||
"request": "launch", | ||
"program": "${file}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...tter.__project_name_kebab_case }}/src/{{ cookiecutter.__project_name_snake_case }}/app.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
"""Streamlit app.""" | ||
|
||
from importlib.metadata import version | ||
|
||
import streamlit as st | ||
|
||
st.title(f"{{ cookiecutter.__project_name_kebab_case }} v{version('{{ cookiecutter.__project_name_kebab_case }}')}") |