-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from confident-ai/feaeture/improve-get-api-key
Feaeture/improve get api key
- Loading branch information
Showing
6 changed files
with
54 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Pip install comment | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
create-pip-link-comment: | ||
runs-on: ubuntu-latest | ||
name: pip link | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Comment PR | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
with: | ||
hide_and_recreate: true | ||
hide_classify: "OUTDATED" | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
message: | | ||
Thanks for the PR! Going to review and merge soon 😉 | ||
Just before that though can you please test the installation with the command below? 😎 | ||
``` | ||
pip install git+https://github.com/RelevanceAI/relevance-workflows-core.git@${{ github.head_ref }} | ||
``` |
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 |
---|---|---|
@@ -1 +1 @@ | ||
__version__: str = "0.10.2" | ||
__version__: str = "0.10.4" |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""Utility function for getting API key. | ||
""" | ||
import os | ||
from .key_handler import KEY_FILE_HANDLER | ||
from .constants import API_KEY_ENV | ||
|
||
|
||
def _get_api_key(): | ||
"""Get an API key here.""" | ||
api_key = KEY_FILE_HANDLER.fetch_api_key() | ||
if api_key is None or api_key == "": | ||
api_key = os.getenv(API_KEY_ENV, "") | ||
return api_key |
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