diff --git a/.github/workflows/concrete_python_test_macos.yml b/.github/workflows/concrete_python_test_macos.yml index ce657f9e14..0899cd7308 100644 --- a/.github/workflows/concrete_python_test_macos.yml +++ b/.github/workflows/concrete_python_test_macos.yml @@ -34,7 +34,7 @@ jobs: - name: Install OS Dependencies run: | - brew install ninja ccache graphviz + brew install ninja ccache - name: Setup rust toolchain for concrete-cpu uses: ./.github/workflows/setup_rust_toolchain_for_concrete_cpu @@ -75,8 +75,6 @@ jobs: . .venv/bin/activate - CFLAGS=-I$(brew --prefix graphviz)/include LDFLAGS=-L$(brew --prefix graphviz)/lib pip --no-cache-dir install pygraphviz - pip install -r requirements.dev.txt pip install -r requirements.txt @@ -111,8 +109,6 @@ jobs: python3.10 -m venv .testenv . .testenv/bin/activate - CFLAGS=-I$(brew --prefix graphviz)/include LDFLAGS=-L$(brew --prefix graphviz)/lib pip --no-cache-dir install pygraphviz - pip install $GITHUB_WORKSPACE/frontends/concrete-python/dist/*macos*.whl pip install -r $GITHUB_WORKSPACE/frontends/concrete-python/requirements.dev.txt @@ -123,7 +119,7 @@ jobs: find .testenv/lib/python3.10/site-packages -not \( -path .testenv/lib/python3.10/site-packages/concrete -prune \) -name 'lib*omp5.dylib' -or -name 'lib*omp.dylib' | xargs -n 1 ln -f -s $(pwd)/.testenv/lib/python3.10/site-packages/concrete/.dylibs/libomp.dylib cp -R $GITHUB_WORKSPACE/frontends/concrete-python/tests ./tests - pytest tests -svv -n auto --key-cache "./KeySetCache" -m "not dataflow" + pytest tests -svv -n auto --key-cache "./KeySetCache" -m "not dataflow and not graphviz" - name: Cleanup host if: success() || failure() diff --git a/frontends/concrete-python/Makefile b/frontends/concrete-python/Makefile index 5dcfa3401d..fc0695b52d 100644 --- a/frontends/concrete-python/Makefile +++ b/frontends/concrete-python/Makefile @@ -18,6 +18,7 @@ venv: . .venv/bin/activate $(PIP) install -r requirements.dev.txt + $(PIP) install -r requirements.extra-full.txt $(PIP) install -r requirements.txt @echo diff --git a/frontends/concrete-python/requirements.dev.txt b/frontends/concrete-python/requirements.dev.txt index 3696caa57c..33e1ab6287 100644 --- a/frontends/concrete-python/requirements.dev.txt +++ b/frontends/concrete-python/requirements.dev.txt @@ -16,7 +16,3 @@ ruff==0.0.259 auditwheel==5.3.0; sys_platform == 'linux' delocate==0.10.4; sys_platform == 'darwin' wheel==0.40.0 - -matplotlib>=3.7 -pillow>=10.2 -pygraphviz>=1.11 diff --git a/frontends/concrete-python/requirements.extra-full.txt b/frontends/concrete-python/requirements.extra-full.txt new file mode 100644 index 0000000000..ae3e717b3c --- /dev/null +++ b/frontends/concrete-python/requirements.extra-full.txt @@ -0,0 +1,3 @@ +matplotlib>=3.7 +pillow>=10.2 +pygraphviz>=1.11 diff --git a/frontends/concrete-python/setup.py b/frontends/concrete-python/setup.py index fc0f0c4bfd..acf80b890b 100644 --- a/frontends/concrete-python/setup.py +++ b/frontends/concrete-python/setup.py @@ -74,10 +74,18 @@ def run(self): for dependency in read("requirements.dev.txt").split("\n") if dependency.strip() != "" ], + "dev-full": [ + dependency + for dependency in ( + read("requirements.dev.txt").split("\n") + + read("requirements.extra-full.txt").split("\n") + ) + if dependency.strip() != "" + ], "full": [ - "matplotlib>=3.7", - "pillow>=10.2", - "pygraphviz>=1.11", + dependency + for dependency in read("requirements.extra-full.txt").split("\n") + if dependency.strip() != "" ], }, diff --git a/frontends/concrete-python/tests/compilation/test_circuit.py b/frontends/concrete-python/tests/compilation/test_circuit.py index 0540819762..33b0b69113 100644 --- a/frontends/concrete-python/tests/compilation/test_circuit.py +++ b/frontends/concrete-python/tests/compilation/test_circuit.py @@ -29,6 +29,7 @@ def f(x, y): assert str(circuit) == circuit.graph.format() +@pytest.mark.graphviz def test_circuit_draw(helpers): """ Test `draw` method of `Circuit` class.