Skip to content

Commit

Permalink
Updates for 0.50.0
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-naveh committed Sep 25, 2024
1 parent 800c0ce commit 78df43a
Show file tree
Hide file tree
Showing 43 changed files with 155 additions and 589 deletions.
55 changes: 0 additions & 55 deletions .github/actions/run-tests/action.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .github/scripts/get_m2m_token.sh

This file was deleted.

13 changes: 0 additions & 13 deletions .github/workflows/hello.yml

This file was deleted.

46 changes: 9 additions & 37 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
name: "Test notebooks old"
name: "Test notebooks"

on:
pull_request:
push:
branches:
- dev
on: [pull_request]

jobs:
tests:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: "Install dependencies"
run: |
python -m pip install -U -r requirements.txt
python -m pip install -U -r requirements_tests.txt
- name: Get changed files - all
id: changed-files-all
Expand All @@ -29,51 +26,26 @@ jobs:
files: |
**.ipynb
- uses: aws-actions/[email protected]
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: us-east-1
mask-aws-account-id: true

- name: Set environment variables
run: |
set -ex
echo "CLASSIQ_TEXT_ONLY=true" >> $GITHUB_ENV
if [ "${{ github.event_name }}" == 'pull_request' ]; then
echo "SHOULD_TEST_ALL_FILES=false" >> $GITHUB_ENV
echo "HAS_ANY_FILE_CHANGED=${{ steps.changed-files-all.outputs.any_changed }}" >> $GITHUB_ENV
echo "LIST_OF_FILE_CHANGED=${{ steps.changed-files-all.outputs.all_changed_files }}" >> $GITHUB_ENV
echo "HAS_ANY_IPYNB_CHANGED=${{ steps.changed-files-ipynb.outputs.any_changed }}" >> $GITHUB_ENV
echo "LIST_OF_IPYNB_CHANGED=${{ steps.changed-files-ipynb.outputs.all_changed_files }}" >> $GITHUB_ENV
elif [[ "${{ github.event_name }}" == 'workflow_dispatch' || "${{ github.head_ref || github.ref_name }}" == "dev" ]]; then
elif [ "${{ github.event_name }}" == 'workflow_dispatch' ]; then
echo "SHOULD_TEST_ALL_FILES=true" >> $GITHUB_ENV
echo "HAS_ANY_FILE_CHANGED=None" >> $GITHUB_ENV
echo "LIST_OF_FILE_CHANGED=None" >> $GITHUB_ENV
echo "HAS_ANY_IPYNB_CHANGED=None" >> $GITHUB_ENV
echo "LIST_OF_IPYNB_CHANGED=None" >> $GITHUB_ENV
fi
if [ "${{ github.head_ref || github.ref_name }}" == "dev" ]; then
echo "CLASSIQ_IDE=https://nightly.platform.classiq.io" >> $GITHUB_ENV
echo "CLASSIQ_HOST=https://staging.api.classiq.io" >> $GITHUB_ENV
echo "IS_DEV=true" >> $GITHUB_ENV
fi
- name: Set authentication
run: .github/scripts/get_m2m_token.sh
env:
PROD_M2M_SECRET_ARN: "${{ secrets.PROD_M2M_SECRET_ARN }}"
NIGHTLY_M2M_SECRET_ARN: "${{ secrets.NIGHTLY_M2M_SECRET_ARN }}"

- name: Install dependencies
run: |
set -e
# Pre is needed for Dev pre releases
python -m pip install --extra-index-url https://pypi.org/simple --pre -U -r requirements.txt
python -m pip install --extra-index-url https://pypi.org/simple -U -r requirements_tests.txt
run: echo "${{ secrets.CLASSIQ_CREDENTIALS_B64 }}" | base64 --decode > "${HOME}/.classiq-credentials"

- name: "Run tests"
run: python -m pytest --log-cli-level=INFO tests
run: python -m pytest tests
env:
JUPYTER_PLATFORM_DIRS: "1"
108 changes: 0 additions & 108 deletions .github/workflows/test-CI.yml

This file was deleted.

4 changes: 2 additions & 2 deletions algorithms/algebraic/discrete_log/discrete_log.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Opening: http://localhost:4200/circuit/a1507b50-7312-478f-ad92-0589a85ebf79?version=0.0.0\n"
""
]
}
],
Expand Down Expand Up @@ -402,7 +402,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Opening: http://localhost:4200/circuit/3c990661-c569-4c99-b534-225f30334935?version=0.0.0\n"
""
]
}
],
Expand Down
6 changes: 3 additions & 3 deletions algorithms/algebraic/hidden_shift/hidden_shift.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Opening: https://platform.classiq.io/circuit/9416db8e-ac12-4a7f-81f0-d04a957b1cbd?version=0.0.0\n"
""
]
}
],
Expand Down Expand Up @@ -254,7 +254,7 @@
"text": [
"f_dual: (((((((((x[5]) & (y[0])) ^ ((x[2]) & (y[1]))) ^ ((x[7]) & (y[2]))) ^ ((x[0]) & (y[3]))) ^ ((x[6]) & (y[4]))) ^ ((x[3]) & (y[5]))) ^ ((x[1]) & (y[6]))) ^ ((x[4]) & (y[7]))) ^ ((((((((x[5]) & (x[2])) & (x[7])) & (x[0])) & (x[6])) & (x[3])) & (x[1])) & (x[4]))\n",
"g: (((((((((x[0]) & (y[3])) ^ (((x[1]) ^ 1) & (y[6]))) ^ ((x[2]) & ((y[1]) ^ 1))) ^ (((x[3]) ^ 1) & (y[5]))) ^ ((x[4]) & (y[7]))) ^ ((x[5]) & (y[0]))) ^ ((x[6]) & (y[4]))) ^ ((x[7]) & (y[2]))) ^ ((((((((y[0]) & ((y[1]) ^ 1)) & (y[2])) & (y[3])) & (y[4])) & (y[5])) & (y[6])) & (y[7]))\n",
"Opening: https://platform.classiq.io/circuit/849ffc46-6af9-4550-a079-984820bcea0f?version=0.0.0\n"
""
]
}
],
Expand Down Expand Up @@ -390,7 +390,7 @@
"text": [
"f: (((((((((x[0]) & (y[3])) ^ ((x[1]) & (y[6]))) ^ ((x[2]) & (y[1]))) ^ ((x[3]) & (y[5]))) ^ ((x[4]) & (y[7]))) ^ ((x[5]) & (y[0]))) ^ ((x[6]) & (y[4]))) ^ ((x[7]) & (y[2]))) ^ ((((((((y[0]) & (y[1])) & (y[2])) & (y[3])) & (y[4])) & (y[5])) & (y[6])) & (y[7]))\n",
"g: (((((((((x[0]) & (y[3])) ^ (((x[1]) ^ 1) & (y[6]))) ^ ((x[2]) & ((y[1]) ^ 1))) ^ (((x[3]) ^ 1) & (y[5]))) ^ ((x[4]) & (y[7]))) ^ ((x[5]) & (y[0]))) ^ ((x[6]) & (y[4]))) ^ ((x[7]) & (y[2]))) ^ ((((((((y[0]) & ((y[1]) ^ 1)) & (y[2])) & (y[3])) & (y[4])) & (y[5])) & (y[6])) & (y[7]))\n",
"Opening: https://platform.classiq.io/circuit/d927bbad-c127-4ae1-b610-8359e5be1914?version=0.0.0\n"
""
]
}
],
Expand Down
2 changes: 1 addition & 1 deletion algorithms/algebraic/shor/shor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Opening: https://platform.classiq.io/circuit/87f823a3-f42c-44c4-94ca-0c63c72494c6?version=0.0.0\n"
""
]
}
],
Expand Down
4 changes: 2 additions & 2 deletions algorithms/algebraic/shor/shor_modular_exponentiation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Opening: https://platform.classiq.io/circuit/f53dbd8f-bc44-4cc5-992d-831135db87cb?version=0.0.0\n"
""
]
}
],
Expand Down Expand Up @@ -579,7 +579,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Opening: https://platform.classiq.io/circuit/8e2d4c58-fbbc-41c6-8209-a0db6fd79060?version=0.0.0\n"
""
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Opening: https://platform.classiq.io/circuit/48ac87df-a347-4da6-9b3f-7c33a36ca51d?version=0.0.0\n"
""
]
}
],
Expand Down Expand Up @@ -367,7 +367,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Opening: https://platform.classiq.io/circuit/d512d80f-bc84-4334-88d6-48313d599ecf?version=0.0.0\n"
""
]
}
],
Expand Down Expand Up @@ -430,7 +430,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Opening: https://platform.classiq.io/circuit/86d8c4c9-0ef8-4055-a06c-ccbefa716c2b?version=0.0.0\n"
""
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Opening: https://platform.classiq.io/circuit/d218b496-fb51-4009-ae0f-11de2970a36a?version=0.0.0\n"
""
]
}
],
Expand Down Expand Up @@ -569,7 +569,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Opening: https://platform.classiq.io/circuit/b1c231ed-0a47-413f-8305-fa6416ef9f42?version=0.0.0\n"
""
]
}
],
Expand Down
Loading

0 comments on commit 78df43a

Please sign in to comment.