-
Notifications
You must be signed in to change notification settings - Fork 58
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
SNOW-1446046: Support glob()
for additional_source_files
in streamlit
deployment.
#1108
Comments
glob()
for additional_source_files
in streamlit
deployment.glob()
for additional_source_files
in streamlit
deployment.
I did a bit of digging and looks like The experiment was conducted on this file structure:
Code in definition_version: "1.1"
streamlit:
name: streamlit_app_snowcli
stage: my_streamlit_stage_snowcli
query_warehouse: ADHOC
main_file: streamlit_app.py
env_file: environment.yml
pages_dir: pages/
additional_source_files:
- common/*.py # OK, produces common/hello.py
# - common/** # NOK, Produces "not a file but a directory" for mymodule
- common/mymodule/*.py # OK, uploads __init__.py
# - common/mymodule/**/*.py # NOK, produces "my_streamlit_stage_snowcli/streamlit_app_snowcli/common/mymodule/**/__init__.py"
# - common/mymodule/*/*.py # NOK, produces "my_streamlit_stage_snowcli/streamlit_app_snowcli/common/mymodule/*/__init__.py"
# - common/mymodule/**/*.py # NOK, produces "my_streamlit_stage_snowcli/streamlit_app_snowcli/common/mymodule/**/__init__.py"
# - common/mymodule/***/*.py # NOK, produces "my_streamlit_stage_snowcli/streamlit_app_snowcli/common/mymodule/***/__init__.py"
# - common/mymodule/**/* # NOK, produces "my_streamlit_stage_snowcli/streamlit_app_snowcli/common/mymodule/***/__init__.py"
- common/mymodule/submodule/* # OK, produces what is expected, this would need to be repeated for every "leaf" subdirectory Looks like nested wildcards ( It's possible to implement something like in the original comment by parsing the glob on |
@sfc-gh-vtimofeenko My 2 cents: First: If you have enough files for parallelization to matter for performance of the deploy step, then you have enough files for globs to matter for the maintainability of your deployment spec. Second: there is also surely a way to parallelize this, would be my strong intuition, if the existing code is parallelized. A |
Description
It would be nice if, instead of looping over additional source files like this:
It was looped over like this instead:
So that users don't need to specify each individual file as a project grows.
This should be fully backwards compatible.
Context
No response
The text was updated successfully, but these errors were encountered: