Skip to content

Commit f61c5bc

Browse files
authored
Merge pull request #453 from compas-dev/copilot/fix-pytest-import-errors
Fix compatibility with roslibpy 2.0.0 and improve CI build system
2 parents 97aca39 + 41f8f7e commit f61c5bc

File tree

5 files changed

+60
-9
lines changed

5 files changed

+60
-9
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ jobs:
2020
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
2121

2222
steps:
23-
- uses: compas-dev/compas-actions.build@v3
23+
- uses: compas-dev/compas-actions.build@v4
2424
with:
2525
python: ${{ matrix.python }}
2626
invoke_lint: true
27+
use_conda: true

.github/workflows/ironpython.yml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,34 +17,51 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v2
1919
- name: Install dependencies
20+
shell: cmd
2021
run: |
22+
echo "Installing IronPython..."
2123
choco install ironpython --version=2.7.8.1
24+
25+
echo "Downloading ironpython-pytest..."
2226
curl -o ironpython-pytest.tar.gz -LJO https://pypi.debian.net/ironpython-pytest/latest
27+
28+
echo "Downloading COMPAS..."
2329
curl -o compas.tar.gz -LJO https://pypi.debian.net/COMPAS/latest
24-
curl -o roslibpy.tar.gz -LJO https://pypi.debian.net/roslibpy/latest
30+
31+
echo "Downloading roslibpy..."
32+
curl -o roslibpy.tar.gz -LJO https://pypi.debian.net/roslibpy/roslibpy-1.8.1.tar.gz
33+
34+
echo "Downloading compas_robots..."
2535
curl -o compas_robots.tar.gz -LJO https://pypi.debian.net/compas_robots/latest
36+
37+
echo "Setting up IronPython environment..."
2638
ipy -X:Frames -m ensurepip
39+
40+
echo "Installing ironpython-pytest..."
2741
ipy -X:Frames -m pip install --no-deps ironpython-pytest.tar.gz
28-
ipy -X:Frames -m pip install --no-deps compas.tar.gz
29-
ipy -X:Frames -m pip install --no-deps roslibpy.tar.gz
30-
ipy -X:Frames -m pip install --no-deps compas_robots.tar.gz
3142
32-
# untar and rename, these cannot be installed using ironpip because they not longer have a setup.py
33-
tar -xf compas.tar.gz && for /d %i in (compas-*) do ren "%i" compas
34-
tar -xf compas_robots.tar.gz && for /d %i in (compas_robots-*) do ren "%i" compas_robots
43+
echo "Installing roslibpy..."
44+
ipy -X:Frames -m pip install --no-deps roslibpy.tar.gz
3545
46+
rem untar and rename, these cannot be installed using ironpip because they not longer have a setup.py
47+
tar -xf compas.tar.gz && for /d %%i in (compas-*) do ren "%%i" compas
48+
tar -xf compas_robots.tar.gz && for /d %%i in (compas_robots-*) do ren "%%i" compas_robots
3649
- uses: NuGet/setup-nuget@v1.0.5
3750
- uses: compas-dev/compas-actions.ghpython_components@v5
3851
with:
3952
source: src/compas_fab/ghpython/components
4053
target: src/compas_fab/ghpython/components/ghuser
4154
- name: Test import
55+
shell: cmd
4256
run: |
57+
echo "Testing import of compas_fab..."
4358
ipy -m compas_fab
4459
env:
4560
IRONPYTHONPATH: ./src;./compas/src;./compas_robots/src
4661
- name: Run tests
62+
shell: cmd
4763
run: |
64+
echo "Running tests..."
4865
ipy tests/ipy_test_runner.py
4966
env:
5067
IRONPYTHONPATH: ./src;./compas/src;./compas_robots/src

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Removed
1515

16+
### Fixed
17+
18+
* Fixed compatibility issue with `roslibpy 2.0.0` by adding upper bound `< 2` to the dependency constraint.
19+
1620

1721
## [1.1.0] 2025-04-17
1822

environment.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: compas_fab
2+
channels:
3+
- conda-forge
4+
- defaults
5+
dependencies:
6+
- python>=3.9
7+
- pip
8+
- compas >= 2.0.4, < 3
9+
- compas_robots >= 0.3, < 1
10+
- roslibpy >= 1.1, < 2
11+
- pyserial
12+
- pybullet
13+
- pip:
14+
- attrs >=19.3.0
15+
- black
16+
- bump2version >=1.0.1
17+
- check-manifest >=0.36
18+
- compas-invocations2
19+
- ruff
20+
- importlib_metadata <5.0
21+
- invoke>=0.14
22+
- pytest
23+
- pytest_mock
24+
- pytest-cov
25+
- sphinx_compas2_theme
26+
- sybil~=8.0.1
27+
- twine
28+
- tomlkit
29+
- -e .

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
compas >= 2.0.4, < 3
22
compas_robots >= 0.3, < 1
3-
roslibpy >= 1.1.0
3+
roslibpy >= 1.1, < 2
44
pyserial

0 commit comments

Comments
 (0)