Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4fb162e
SK-1731: Refactor Python SDK V2 (#141)
saileshwar-skyflow Nov 26, 2024
4291e37
[AUTOMATED] Private Release 1.15.1.dev0+4fb162e
saileshwar-skyflow Nov 26, 2024
f911aa5
SK-1749: Improved samples for Python SDK V2 (#143)
saileshwar-skyflow Nov 28, 2024
41e4ab0
[AUTOMATED] Private Release 1.15.1.dev0+f911aa5
saileshwar-skyflow Nov 28, 2024
9c43c17
SK-1731: Updated SkyflowError class (#144)
saileshwar-skyflow Dec 2, 2024
aa4ca93
[AUTOMATED] Private Release 1.15.1.dev0+9c43c17
saileshwar-skyflow Dec 2, 2024
b4ac30f
SK-1731: Updated tokenize validations
saileshwar-skyflow Dec 2, 2024
a27f123
[AUTOMATED] Private Release 1.15.1.dev0+b4ac30f
saileshwar-skyflow Dec 2, 2024
69630e5
SK-1736: Added encoding for column values in get interface (#145)
saileshwar-skyflow Dec 3, 2024
9ce9a7d
[AUTOMATED] Private Release 1.15.1.dev0+69630e5
saileshwar-skyflow Dec 3, 2024
4336c2a
SK-1736: Add validations for invoke connection and Fix inconsistencie…
saileshwar-skyflow Dec 4, 2024
25318ea
[AUTOMATED] Private Release 1.15.1.dev0+4336c2a
saileshwar-skyflow Dec 4, 2024
8291443
SK-1736: Updated requirements.txt (#147)
saileshwar-skyflow Dec 5, 2024
e293647
SK-1736: Fix inconsistencies (#148)
saileshwar-skyflow Dec 12, 2024
83d4188
[AUTOMATED] Private Release 1.15.1.dev0+e293647
saileshwar-skyflow Dec 12, 2024
0165723
SK-1731: Fix api key inconsistency (#149)
saileshwar-skyflow Jan 8, 2025
a029886
[AUTOMATED] Private Release 1.15.1.dev0+0165723
saileshwar-skyflow Jan 8, 2025
02414e5
SK-1772: Merge branch 'beta-release/25.1.1' into release/24.11.2
saileshwar-skyflow Jan 9, 2025
11a568b
SK-1772: Fix linting
saileshwar-skyflow Jan 9, 2025
4ad70ad
[AUTOMATED] Private Release 1.15.1.dev0+11a568b
saileshwar-skyflow Jan 9, 2025
9eff324
SK-1772: Updated env creds path
saileshwar-skyflow Jan 9, 2025
314b871
[AUTOMATED] Private Release 1.15.1.dev0+9eff324
saileshwar-skyflow Jan 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/beta-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Public Beta Release

on:
push:
tags: '*.*.*b*'
paths-ignore:
- "setup.py"
- "*.yml"
- "*.md"
- "skyflow/utils/_version.py"

jobs:
build-and-deploy:
uses: ./.github/workflows/shared-build-and-deploy.yml
with:
ref: main
pypi-token: ${{ secrets.PYPI_PUBLISH_TOKEN }}
is-internal: false
47 changes: 5 additions & 42 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,9 @@ jobs:
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.PAT_ACTIONS }}
error: 'One of your your commit messages is not matching the format with JIRA ID Ex: ( SDK-123 commit message )'
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: create-json
id: create-json
uses: jsdaniell/create-json@1.1.2
with:
name: "credentials.json"
json: ${{ secrets.CREDENTIALS_FILE_STR }}

- name: 'Setup .env'
run: |
touch .env
echo VAULT_ID=${{secrets.VAULT_ID}} >> .env
echo VAULT_URL=${{secrets.VAULT_URL}} >> .env
echo DETOKENIZE_TEST_TOKEN=${{secrets.DETOKENIZE_TEST_TOKEN}} >> .env
echo DETOKENIZE_TEST_VALUE=${{secrets.DETOKENIZE_TEST_VALUE}} >> .env
echo CREDENTIALS_FILE_PATH=./credentials.json >> .env
echo CVV_GEN_CONNECTION_URL=${{secrets.CVV_GEN_CONNECTION_URL}} >> .env
echo VISA_CONNECTION_BASIC_AUTH=${{secrets.VISA_CONNECTION_BASIC_AUTH}} >> .env
echo SKYFLOW_ID1=${{secrets.SKYFLOW_ID1}} >> .env
echo SKYFLOW_ID2=${{secrets.SKYFLOW_ID2}} >> .env
echo SKYFLOW_ID3=${{secrets.SKYFLOW_ID3}} >> .env

- name: 'Run Tests'
run: |
python -m pip install --upgrade pip
pip install requests pyjwt datetime aiohttp cryptography python-dotenv coverage
coverage run --source skyflow -m unittest discover
- name: coverage
run: coverage xml -o test-coverage.xml
- name: Codecov
uses: codecov/codecov-action@v2.1.0
with:
token: ${{ secrets.CODECOV_REPO_UPLOAD_TOKEN }}
files: test-coverage.xml
name: codecov-skyflow-python
verbose: true
test:
uses: ./.github/workflows/shared-tests.yml
with:
python-version: '3.8'
secrets: inherit
23 changes: 23 additions & 0 deletions .github/workflows/internal-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Internal Release

on:
push:
tags-ignore:
- '*.*'
paths-ignore:
- "setup.py"
- "*.yml"
- "*.md"
- "skyflow/utils/_version.py"
- "samples/**"
branches:
- release/*

jobs:
build-and-deploy:
uses: ./.github/workflows/shared-build-and-deploy.yml
with:
ref: ${{ github.ref_name }}
is-internal: true
secrets: inherit

47 changes: 4 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,46 +6,7 @@ on:
- main

jobs:
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'

- name: create-json
id: create-json
uses: jsdaniell/create-json@1.1.2
with:
name: "credentials.json"
json: ${{ secrets.CREDENTIALS_FILE_STR }}

- name: 'Setup .env'
run: |
touch .env
echo VAULT_ID=${{secrets.VAULT_ID}} >> .env
echo VAULT_URL=${{secrets.VAULT_URL}} >> .env
echo DETOKENIZE_TEST_TOKEN=${{secrets.DETOKENIZE_TEST_TOKEN}} >> .env
echo DETOKENIZE_TEST_VALUE=${{secrets.DETOKENIZE_TEST_VALUE}} >> .env
echo CREDENTIALS_FILE_PATH=./credentials.json >> .env
echo CVV_GEN_CONNECTION_URL=${{secrets.CVV_GEN_CONNECTION_URL}} >> .env
echo VISA_CONNECTION_BASIC_AUTH=${{secrets.VISA_CONNECTION_BASIC_AUTH}} >> .env
echo SKYFLOW_ID1=${{secrets.SKYFLOW_ID1}} >> .env
echo SKYFLOW_ID2=${{secrets.SKYFLOW_ID2}} >> .env
echo SKYFLOW_ID3=${{secrets.SKYFLOW_ID3}} >> .env

- name: 'Run Tests'
run: |
python -m pip install --upgrade pip
pip install requests pyjwt datetime aiohttp cryptography python-dotenv coverage
coverage run --source skyflow -m unittest discover
- name: coverage
run: coverage xml -o test-coverage.xml
- name: Codecov
uses: codecov/codecov-action@v2.1.0
with:
token: ${{ secrets.CODECOV_REPO_UPLOAD_TOKEN }}
files: test-coverage.xml
name: codecov-skyflow-python
verbose: true
test:
uses: ./.github/workflows/shared-tests.yml
with:
python-version: '3.8'
47 changes: 6 additions & 41 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,12 @@ on:
- "setup.py"
- "*.yml"
- "*.md"
- "skyflow/version.py"
- "skyflow/utils/_version.py"

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT_ACTIONS }}
ref: main
fetch-depth: 0
- uses: actions/setup-python@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine

- name: Get Previous tag
id: previoustag
uses: WyriHaximus/github-action-get-previous-tag@v1
with:
fallback: 1.0.0

- name: Bump Version
run: |
chmod +x ./ci-scripts/bump_version.sh
./ci-scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}"

- name: Commit changes
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com
git add setup.py
git add skyflow/version.py
git commit -m "[AUTOMATED] Public Release - ${{ steps.previoustag.outputs.tag }}"
git push origin

- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PUBLISH_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
uses: ./.github/workflows/shared-build-and-deploy.yml
with:
ref: main
is-internal: false
secrets: inherit
84 changes: 84 additions & 0 deletions .github/workflows/shared-build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Shared Build and Deploy

on:
workflow_call:
inputs:
ref:
description: 'Git reference to use (e.g., main or branch name)'
required: true
type: string

is-internal:
description: 'Flag for internal release'
required: true
type: boolean

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ inputs.ref }}
fetch-depth: 0

- uses: actions/setup-python@v2

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine

- name: Get Previous tag
id: previoustag
uses: WyriHaximus/github-action-get-previous-tag@v1
with:
fallback: 1.0.0

- name: Bump Version
run: |
chmod +x ./ci-scripts/bump_version.sh
if ${{ inputs.is-internal }}; then
./ci-scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}" "$(git rev-parse --short "$GITHUB_SHA")"
else
./ci-scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}"
fi

- name: Commit changes
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add setup.py
git add skyflow/utils/_version.py

if [ "${{ inputs.is-internal }}" = "true" ]; then
VERSION="${{ steps.previoustag.outputs.tag }}.dev0+$(git rev-parse --short $GITHUB_SHA)"
COMMIT_MESSAGE="[AUTOMATED] Private Release $VERSION"
git commit -m "$COMMIT_MESSAGE"
git push origin ${{ github.ref_name }} -f
else
COMMIT_MESSAGE="[AUTOMATED] Public Release - ${{ steps.previoustag.outputs.tag }}"
git commit -m "$COMMIT_MESSAGE"
git push origin
fi

- name: Build and Publish Package
if: ${{ !inputs.is-internal }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PUBLISH_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*

- name: Build and Publish to JFrog Artifactory
if: ${{ inputs.is-internal }}
env:
TWINE_USERNAME: ${{ secrets.JFROG_USERNAME }}
TWINE_PASSWORD: ${{ secrets.JFROG_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload --repository-url https://prekarilabs.jfrog.io/artifactory/api/pypi/skyflow-python/ dist/*



41 changes: 41 additions & 0 deletions .github/workflows/shared-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Shared Test Steps

on:
workflow_call:
inputs:
python-version:
description: 'Python version to use'
required: true
type: string

jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python-version }}

- name: create-json
id: create-json
uses: jsdaniell/create-json@1.1.2
with:
name: "credentials.json"
json: ${{ secrets.VALID_SKYFLOW_CREDS_TEST }}

- name: 'Run Tests'
run: |
pip install -r requirements.txt
python -m coverage run --source=skyflow --omit=skyflow/generated/*,skyflow/utils/validations/*,skyflow/vault/data/*,skyflow/vault/tokens/*,skyflow/vault/connection/*,skyflow/error/*,skyflow/utils/enums/*,skyflow/vault/controller/_audit.py,skyflow/vault/controller/_bin_look_up.py -m unittest discover

- name: coverage
run: coverage xml -o test-coverage.xml

- name: Codecov
uses: codecov/codecov-action@v2.1.0
with:
token: ${{ secrets.CODECOV_REPO_UPLOAD_TOKEN }}
files: test-coverage.xml
name: codecov-skyflow-python
verbose: true
Loading