Skip to content

Commit

Permalink
adding help text for connection (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jhollan authored Jan 6, 2023
1 parent 2bc6125 commit ef9ea26
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ cd snowcli
# source .venv/bin/activate
pip install -r requirements.txt
hatch build && pip install .
snow --help
snow --version
```

You should now be able to run `snow` and get the CLI message.
Expand Down Expand Up @@ -186,6 +186,14 @@ Note: Your account must have access to the Streamlit in Snowflake private previe

See [Build a function](#build-a-function).

## Contributing
If interested in contributing, you will want to instanstiate the pre-commit logic to help with formatting and linting of commits. To do this, run the following in the `snowcli` cloned folder on your development machine:

```bash
pip install pre-commit
pre-commit
```

## 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 Twitter or LinkedIn [@jeffhollan](https://twitter.com/jeffhollan) and [@jroes](https://twitter.com/jroes).
2 changes: 1 addition & 1 deletion src/snowcli/__about__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from __future__ import annotations

VERSION = "0.1.10"
VERSION = "0.1.11"
3 changes: 2 additions & 1 deletion src/snowcli/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def login(
if f"connections.{snowsql_connection_name}" not in cfg_snowsql.config:
print(
"Connection not found in "
f"{snowsql_config_path}: {snowsql_connection_name}",
f"{snowsql_config_path}: {snowsql_connection_name}. ",
"You can add with `snow connection add`.",
)
raise typer.Abort()

Expand Down
5 changes: 4 additions & 1 deletion src/snowcli/cli/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ def list():
List Snowflake connections.
"""
app_cfg = AppConfig().config
# if key 'snowsql_config_path' isn't defined in app_cfg
if 'snowsql_config_path' not in app_cfg:
print("No snowsql config path set. Please run snowcli login first.")
# set snowsql_config_path to ~/.snowsql/config
app_cfg['snowsql_config_path'] = '~/.snowsql/config'
print("No snowsql config path set. Using default...")

print(f"Using {app_cfg['snowsql_config_path']}...")

Expand Down

0 comments on commit ef9ea26

Please sign in to comment.