Skip to content

Commit

Permalink
SNOW-1639544: snowflake-cli tests update
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mraba committed Sep 20, 2024
1 parent 5b464d9 commit 6418470
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 24 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,13 @@ Snowflake CLI is an open-source command-line tool explicitly designed for develo

With Snowflake CLI, developers can create, manage, update, and view apps running on Snowflake across workloads such as Streamlit in Snowflake, the Snowflake Native App Framework, Snowpark Container Services, and Snowpark. It supports a range of Snowflake features, including user-defined functions, stored procedures, Streamlit in Snowflake, and SQL execution.


**Note**: Snowflake CLI is in Public Preview (PuPr).

Docs: https://docs.snowflake.com/en/developer-guide/snowflake-cli-v2/index.

Quick start: https://quickstarts.snowflake.com/guide/getting-started-with-snowflake-cli
Docs: <https://docs.snowflake.com/en/developer-guide/snowflake-cli-v2/index>.

Cheatsheet: https://github.com/Snowflake-Labs/sf-cheatsheets/blob/main/snowflake-cli.md
Quick start: <https://quickstarts.snowflake.com/guide/getting-started-with-snowflake-cli>

Cheatsheet: <https://github.com/Snowflake-Labs/sf-cheatsheets/blob/main/snowflake-cli.md>

## Install Snowflake CLI

Expand All @@ -43,7 +41,7 @@ Cheatsheet: https://github.com/Snowflake-Labs/sf-cheatsheets/blob/main/snowflake
We recommend installing Snowflake CLI in isolated environment using [pipx](https://pipx.pypa.io/stable/). Requires Python >= 3.10

```bash
pipx install snowflake-cli-labs
pipx install snowflake-cli
snow --help
```

Expand Down Expand Up @@ -76,4 +74,4 @@ You should now be able to run `snow` and get the CLI message.
## Get involved

Have a feature idea? Running into a bug? Want to contribute? We'd love to hear from you!
Please open or review issues, open pull requests, or reach out to us on developers@snowflake.com
Please open or review issues, open pull requests, or reach out to us on <developers@snowflake.com>
2 changes: 1 addition & 1 deletion src/snowflake/cli/_app/version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _save_latest_version(self, version: str):
def _get_version_from_pypi() -> str | None:
headers = {"Content-Type": "application/vnd.pypi.simple.v1+json"}
response = requests.get(
"https://pypi.org/pypi/snowflake-cli-labs/json", headers=headers, timeout=3
"https://pypi.org/pypi/snowflake-cli/json", headers=headers, timeout=3
)
response.raise_for_status()
return response.json()["info"]["version"]
Expand Down
4 changes: 1 addition & 3 deletions test_external_plugins/broken_plugin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "override-build-in-commands"
requires-python = ">=3.8"
dependencies = [
"snowflake-cli-labs>=2.0.0"
]
dependencies = ["snowflake-cli>=2.0.0"]
version = "0.0.1"

[project.entry-points."snowflake.cli.plugin.command"]
Expand Down
4 changes: 1 addition & 3 deletions test_external_plugins/failing_plugin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "override-build-in-commands"
requires-python = ">=3.8"
dependencies = [
"snowflake-cli-labs>=2.0.0"
]
dependencies = ["snowflake-cli>=2.0.0"]
version = "0.0.1"

[project.entry-points."snowflake.cli.plugin.command"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "snowflakecli-test-multilingual-hello-plugin"
requires-python = ">=3.8"
dependencies = [
"snowflake-cli-labs>=1.1.0"
]
dependencies = ["snowflake-cli>=1.1.0"]
version = "0.0.1"

[project.entry-points."snowflake.cli.plugin.command"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "override-build-in-commands"
requires-python = ">=3.8"
dependencies = [
"snowflake-cli-labs>=1.1.0"
]
dependencies = ["snowflake-cli>=1.1.0"]
version = "0.0.1"

[project.entry-points."snowflake.cli.plugin.command"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "snowflakecli-test-snowpark-hello-plugin"
requires-python = ">=3.8"
dependencies = [
"snowflake-cli-labs>=1.1.0"
]
dependencies = ["snowflake-cli>=1.1.0"]
version = "0.0.1"

[project.entry-points."snowflake.cli.plugin.command"]
Expand Down
2 changes: 1 addition & 1 deletion tests/app/test_version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def test_get_version_from_pypi(mock_get):
mock_get.return_value = r
assert _VersionCache()._get_version_from_pypi() == "1.2.3" # noqa
mock_get.assert_called_once_with(
"https://pypi.org/pypi/snowflake-cli-labs/json",
"https://pypi.org/pypi/snowflake-cli/json",
headers={"Content-Type": "application/vnd.pypi.simple.v1+json"},
timeout=3,
)
Expand Down

0 comments on commit 6418470

Please sign in to comment.