From 00269e634852eefdaac3943978fb8ecc31679c89 Mon Sep 17 00:00:00 2001 From: KilianPoirier Date: Wed, 22 Nov 2023 11:19:33 +0000 Subject: [PATCH 1/4] Removed pyquil from global package --- Makefile | 10 +++++----- setup.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index e144f4486..72305c260 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ local-install: pip install ./src/openqaoa-core pip install ./src/openqaoa-qiskit - pip install ./src/openqaoa-pyquil +# pip install ./src/openqaoa-pyquil pip install ./src/openqaoa-braket pip install ./src/openqaoa-azure pip install . @@ -14,7 +14,7 @@ local-install: dev-install: pip install -e ./src/openqaoa-core pip install -e ./src/openqaoa-qiskit - pip install -e ./src/openqaoa-pyquil +# pip install -e ./src/openqaoa-pyquil pip install -e ./src/openqaoa-braket pip install -e ./src/openqaoa-azure pip install -e . @@ -23,7 +23,7 @@ dev-install: dev-install-tests: pip install -e ./src/openqaoa-core[tests] pip install -e ./src/openqaoa-qiskit - pip install -e ./src/openqaoa-pyquil +# pip install -e ./src/openqaoa-pyquil pip install -e ./src/openqaoa-braket pip install -e ./src/openqaoa-azure pip install -e . @@ -32,7 +32,7 @@ dev-install-tests: dev-install-docs: pip install -e ./src/openqaoa-core[docs] pip install -e ./src/openqaoa-qiskit - pip install -e ./src/openqaoa-pyquil +# pip install -e ./src/openqaoa-pyquil pip install -e ./src/openqaoa-braket pip install -e ./src/openqaoa-azure pip install -e . @@ -41,7 +41,7 @@ dev-install-docs: dev-install-all: pip install -e ./src/openqaoa-core[all] pip install -e ./src/openqaoa-qiskit - pip install -e ./src/openqaoa-pyquil +# pip install -e ./src/openqaoa-pyquil pip install -e ./src/openqaoa-braket pip install -e ./src/openqaoa-azure pip install -e . diff --git a/setup.py b/setup.py index fba7e87db..fd9bc2f68 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ requirements = [ f"{each_folder_name}=={version}" for each_folder_name in os.listdir("src") - if "openqaoa-" in each_folder_name + if ("openqaoa-" in each_folder_name and "openqaoa-pyquil" not in each_folder_name) ] setup( From b0b84c55a0d5c452929f38d26c13b00592c31407 Mon Sep 17 00:00:00 2001 From: KilianPoirier Date: Thu, 23 Nov 2023 09:07:59 +0000 Subject: [PATCH 2/4] Remove pyquil tests from the pipeline TEMPORARILY --- .github/workflows/test_dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_dev.yml b/.github/workflows/test_dev.yml index f2c7b3d84..da339fd64 100644 --- a/.github/workflows/test_dev.yml +++ b/.github/workflows/test_dev.yml @@ -63,7 +63,7 @@ jobs: run: | source env/bin/activate ipython kernel install --name "env" --user - pytest tests/ src/*/tests -m 'not (qpu or sim)' --cov -n auto + pytest tests/ src/openqaoa-core/tests src/openqaoa-azure/tests src/openqaoa-braket/tests src/openqaoa-qiskit/tests -m 'not (qpu or sim)' --cov -n auto - name: Upload coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v3 with: From 710f97d07a78b96447beb0162d455e6989fbc2dc Mon Sep 17 00:00:00 2001 From: KilianPoirier Date: Thu, 23 Nov 2023 09:22:05 +0000 Subject: [PATCH 3/4] Remove pyquil from main test pipeline TEMPORARILY --- .github/workflows/test_main_linux.yml | 2 +- .github/workflows/test_main_macos.yml | 2 +- .github/workflows/test_main_windows.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_main_linux.yml b/.github/workflows/test_main_linux.yml index 65b39c541..158947692 100644 --- a/.github/workflows/test_main_linux.yml +++ b/.github/workflows/test_main_linux.yml @@ -67,7 +67,7 @@ jobs: run: | source env/bin/activate ipython kernel install --name "env" --user - pytest tests/ src/*/tests -m 'not (qpu or sim)' --cov --cov-report=xml:coverage.xml + pytest tests/ src/openqaoa-core/tests src/openqaoa-azure/tests src/openqaoa-braket/tests src/openqaoa-qiskit/tests -m 'not (qpu or sim)' --cov --cov-report=xml:coverage.xml - name: Upload coverage reports to Codecov with GitHub Action uses: codecov/codecov-action@v3 diff --git a/.github/workflows/test_main_macos.yml b/.github/workflows/test_main_macos.yml index f1a3fc0fd..c60dd7d9b 100644 --- a/.github/workflows/test_main_macos.yml +++ b/.github/workflows/test_main_macos.yml @@ -56,4 +56,4 @@ jobs: run: | source env/bin/activate ipython kernel install --user --name "env" - pytest tests/ src/*/tests -m 'not (qpu or api or docker_aws or braket_api or sim)' + pytest tests/ src/openqaoa-core/tests src/openqaoa-azure/tests src/openqaoa-braket/tests src/openqaoa-qiskit/tests -m 'not (qpu or api or docker_aws or braket_api or sim)' diff --git a/.github/workflows/test_main_windows.yml b/.github/workflows/test_main_windows.yml index 3fcd9d93e..061e1929e 100644 --- a/.github/workflows/test_main_windows.yml +++ b/.github/workflows/test_main_windows.yml @@ -63,5 +63,5 @@ jobs: run: | .\env\Scripts\Activate.ps1 ipython kernel install --name "env" --user - pytest \tests -m 'not (qpu or api or docker_aws or braket_api or sim)' + pytest tests/ src/openqaoa-core/tests src/openqaoa-azure/tests src/openqaoa-braket/tests src/openqaoa-qiskit/tests -m 'not (qpu or api or docker_aws or braket_api or sim)' Get-ChildItem -Directory | ForEach-Object { pytest $_.FullName -m 'not (qpu or api or docker_aws or braket_api or sim)'} From 311761028e2989cd7f497a4b74bbf59ba9a157b8 Mon Sep 17 00:00:00 2001 From: KilianPoirier Date: Thu, 23 Nov 2023 09:46:56 +0000 Subject: [PATCH 4/4] Removed more pyquil related tests TEMPORARILY + changed back of one notebook --- examples/community_tutorials/02_docplex_example.ipynb | 4 ++-- tests/test_imports.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/community_tutorials/02_docplex_example.ipynb b/examples/community_tutorials/02_docplex_example.ipynb index 6264780cd..955abcf8c 100644 --- a/examples/community_tutorials/02_docplex_example.ipynb +++ b/examples/community_tutorials/02_docplex_example.ipynb @@ -1082,8 +1082,8 @@ } ], "source": [ - "#Specific local device usign qiskit backend\n", - "device = create_device(\"local\", 'pyquil.statevector_simulator')\n", + "#Specific local device usign local vectorized backend\n", + "device = create_device(\"local\", 'vectorized')\n", "\n", "#Is possible check the devices using qaoa.local_simulators, qaoa.cloud_provider\n", "qaoa = QAOA(device)\n", diff --git a/tests/test_imports.py b/tests/test_imports.py index 1928d0430..2fdaf5de0 100644 --- a/tests/test_imports.py +++ b/tests/test_imports.py @@ -17,7 +17,7 @@ def test_all_module_import(self): """ folder_names = [ - each_file for each_file in os.listdir("src") if "openqaoa-" in each_file + each_file for each_file in os.listdir("src") if ("openqaoa-" in each_file and not "openqaoa-pyquil") ] packages_import = []