Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-turbaszek committed Jul 31, 2024
1 parent 74cd279 commit 70ae21b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ def artifacts_must_exists(self):
if not self.artifacts:
return self

for artefact in self.artifacts:
if not artefact.exists():
for artifact in self.artifacts:
if not artifact.exists():
raise ValueError(
f"Specified artefact {artefact} does not exist locally."
f"Specified artifact {artifact} does not exist locally."
)

return self
8 changes: 4 additions & 4 deletions src/snowflake/cli/plugins/streamlit/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,14 +196,14 @@ def _migrate_v1_streamlit_to_v2(pd: ProjectDefinition):
pages_dir = default_pages_dir

# Build V2 definition
artefacts = [
artifacts = [
pd.streamlit.main_file,
environment_file,
pages_dir,
]
artefacts = [a for a in artefacts if a is not None]
artifacts = [a for a in artifacts if a is not None]
if pd.streamlit.additional_source_files:
artefacts.extend(pd.streamlit.additional_source_files)
artifacts.extend(pd.streamlit.additional_source_files)

data = {
"definition_version": "2",
Expand All @@ -218,7 +218,7 @@ def _migrate_v1_streamlit_to_v2(pd: ProjectDefinition):
"main_file": str(pd.streamlit.main_file),
"pages_dir": str(pd.streamlit.pages_dir),
"stage": pd.streamlit.stage,
"artifacts": artefacts,
"artifacts": artifacts,
}
},
}
Expand Down
2 changes: 1 addition & 1 deletion tests/streamlit/__snapshots__/test_commands.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| 'main_file': 'streamlit_app.py', 'name': 'test_streamlit_deploy_snowcli', |
| 'query_warehouse': 'xsmall', 'stage': 'streamlit', 'title': 'My Fancy |
| Streamlit', 'type': 'streamlit'}'. This caused: Value error, Specified |
| artefact foo_bar.py does not exist locally. |
| artifact foo_bar.py does not exist locally. |
+------------------------------------------------------------------------------+

'''
Expand Down

0 comments on commit 70ae21b

Please sign in to comment.