From 2968a5af02174a7114810ba6e3b22b9278fcb5aa Mon Sep 17 00:00:00 2001 From: Jeremy Wright Date: Wed, 19 Mar 2025 10:06:28 -0400 Subject: [PATCH 1/6] Tests run fine locally, so trying xvfb plugin in CI --- .github/workflows/test_freecad.yml | 1 + pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_freecad.yml b/.github/workflows/test_freecad.yml index cdb0035..8f50337 100644 --- a/.github/workflows/test_freecad.yml +++ b/.github/workflows/test_freecad.yml @@ -19,4 +19,5 @@ jobs: unset CONDA_PREFIX_1 pip install -e . pip install -e .[dev] + pip install pytest-xvfb python -m pytest -v tests/test_freecad.py \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c61905d..401240c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ requires = ["hatchling"] build-backend = "hatchling.build" [project] -name = "cq_cli" +name = "cadquery-cli" version = "2.3.0" license = {file = "LICENSE"} authors = [ From 7b11f264559e59d675b005bce5a2b5fcb81be617 Mon Sep 17 00:00:00 2001 From: Jeremy Wright Date: Wed, 19 Mar 2025 10:11:44 -0400 Subject: [PATCH 2/6] Trying to print errors to see what is going on --- tests/test_freecad.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test_freecad.py b/tests/test_freecad.py index ff80e20..d10e7c1 100644 --- a/tests/test_freecad.py +++ b/tests/test_freecad.py @@ -16,7 +16,8 @@ def test_static_freecad_file(): test_file, ] out, err, exitcode = helpers.cli_call(command) - + print(err) + print(exitcode) assert "ISO-10303-21;" in out.decode() @@ -37,5 +38,6 @@ def test_parametric_freecad_file(): test_file, ] out, err, exitcode = helpers.cli_call(command) - + print(err) + print(exitcode) assert "ISO-10303-21;" in out.decode() From 61ff6092626dcb26341b6d74e1d96629c0ebf09e Mon Sep 17 00:00:00 2001 From: Jeremy Wright Date: Wed, 19 Mar 2025 10:21:26 -0400 Subject: [PATCH 3/6] Manually installing CadQuery dependencies --- .github/workflows/test_freecad.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/test_freecad.yml b/.github/workflows/test_freecad.yml index 8f50337..0088c00 100644 --- a/.github/workflows/test_freecad.yml +++ b/.github/workflows/test_freecad.yml @@ -18,6 +18,13 @@ jobs: python -m pip install --upgrade pip unset CONDA_PREFIX_1 pip install -e . + pip install "cadquery-ocp>=7.8.1,<7.9" + pip install "ezdxf>=1.3.0" + pip install "multimethod>=1.11,<2.0" + pip install "nlopt>=2.9.0,<3.0" + pip install typish + pip install casadi + pip install path pip install -e .[dev] pip install pytest-xvfb python -m pytest -v tests/test_freecad.py \ No newline at end of file From db4e359f5f8b6414b5356801ebd6fbe7c1d7ac06 Mon Sep 17 00:00:00 2001 From: Jeremy Wright Date: Wed, 19 Mar 2025 10:25:07 -0400 Subject: [PATCH 4/6] Moving away from git for CadQuery install --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 401240c..a4a499c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ classifiers = [ "Operating System :: OS Independent", ] dependencies = [ - "cadquery@git+https://github.com/CadQuery/cadquery.git", + "cadquery", "cadquery_freecad_import_plugin" ] From bf0e94331db4978ce466def9da9e7e027894ee88 Mon Sep 17 00:00:00 2001 From: Jeremy Wright Date: Wed, 19 Mar 2025 10:34:11 -0400 Subject: [PATCH 5/6] Trying to install dependencies differently in conda --- .github/workflows/test_freecad.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test_freecad.yml b/.github/workflows/test_freecad.yml index 0088c00..6f97e4a 100644 --- a/.github/workflows/test_freecad.yml +++ b/.github/workflows/test_freecad.yml @@ -11,20 +11,13 @@ jobs: - name: Install and Test run: | - conda create -y -n freecad -c conda-forge python=3.11 freecad=0.21.2 + conda create -y -n freecad -c conda-forge python=3.11 freecad=0.21.2 cadquery conda init bash source /usr/share/miniconda/bin/activate conda activate freecad python -m pip install --upgrade pip - unset CONDA_PREFIX_1 - pip install -e . - pip install "cadquery-ocp>=7.8.1,<7.9" - pip install "ezdxf>=1.3.0" - pip install "multimethod>=1.11,<2.0" - pip install "nlopt>=2.9.0,<3.0" - pip install typish - pip install casadi - pip install path + pip install -e . --no-deps + pip install cadquery_freecad_import_plugin pip install -e .[dev] pip install pytest-xvfb python -m pytest -v tests/test_freecad.py \ No newline at end of file From 430a03a309b4cf42fe9a356f2154d97ca9ab4d0f Mon Sep 17 00:00:00 2001 From: Jeremy Wright Date: Wed, 19 Mar 2025 10:37:49 -0400 Subject: [PATCH 6/6] Clean up a little bit --- tests/test_freecad.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/test_freecad.py b/tests/test_freecad.py index d10e7c1..ff80e20 100644 --- a/tests/test_freecad.py +++ b/tests/test_freecad.py @@ -16,8 +16,7 @@ def test_static_freecad_file(): test_file, ] out, err, exitcode = helpers.cli_call(command) - print(err) - print(exitcode) + assert "ISO-10303-21;" in out.decode() @@ -38,6 +37,5 @@ def test_parametric_freecad_file(): test_file, ] out, err, exitcode = helpers.cli_call(command) - print(err) - print(exitcode) + assert "ISO-10303-21;" in out.decode()