Skip to content

Commit ddcc26d

Browse files
authored
Merge pull request #12 from Tobias-Fischer/patch-3
Use conda-forge numpy to fix Win+py311 issues
2 parents 236bca0 + 0099af8 commit ddcc26d

File tree

5 files changed

+73
-28
lines changed

5 files changed

+73
-28
lines changed

.github/workflows/main.yml

Lines changed: 64 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# This is a basic workflow to help you get started with Actions
2-
3-
name: Test-master
1+
name: mvtb-main
42

53
# Controls when the action will run.
64
on:
@@ -22,34 +20,50 @@ jobs:
2220
fail-fast: false
2321
matrix:
2422
os: [windows-latest, ubuntu-latest, macos-13]
25-
python-version: ["3.8", "3.9", "3.10", "3.11"]
23+
python-version: ["3.9", "3.10", "3.11", "3.12"]
2624
steps:
27-
- name: Set up Micromamba for Python ${{ matrix.python-version }}
28-
uses: mamba-org/setup-micromamba@v1
29-
3025
- name: Checkout master branch
3126
uses: actions/checkout@v4
32-
33-
- name: Install dependencies
34-
run: |
35-
micromamba create -y -n myenv -c conda-forge python=${{ matrix.python-version }} pip pytest-timeout pytest-xvfb
36-
- name: Install open3d on MacOS
37-
if: runner.os == 'MacOS'
38-
run: micromamba install -y -n myenv -c conda-forge open3d
39-
- name: Install wcwidth on Linux
27+
28+
- name: Set up Micromamba for Python ${{ matrix.python-version }}
29+
uses: mamba-org/setup-micromamba@v2
30+
with:
31+
init-shell: >-
32+
bash
33+
powershell
34+
environment-name: myenv
35+
create-args: >-
36+
python=${{ matrix.python-version }}
37+
numpy<2
38+
pip
39+
pytest
40+
pytest-timeout
41+
pytest-xvfb
42+
matplotlib-base
43+
setuptools
44+
setuptools-scm
45+
open3d
46+
wcwidth
47+
scipy
48+
opencv
49+
spatialmath-python
50+
ansitable
51+
52+
- name: Install libegl on Linux
4053
if: runner.os == 'Linux'
41-
run: micromamba install -y -n myenv -c conda-forge wcwidth
54+
run: micromamba install -y -n myenv -c conda-forge libegl
55+
4256
- name: Install package and data package
4357
run: |
44-
micromamba run -n myenv pip install .[dev]
58+
micromamba run -n myenv python -m pip install .[dev] --no-deps --no-build-isolation
4559
# install the data package
4660
cd mvtb-data
47-
micromamba run -n myenv python -m pip install .
61+
micromamba run -n myenv python -m pip install . --no-deps --no-build-isolation
4862
- name: Test with pytest
4963
env:
5064
MPLBACKEND: TkAgg
5165
run: |
52-
micromamba run -n myenv pytest --ignore=machinevisiontoolbox/blocks --timeout=50 --timeout_method thread -s
66+
micromamba run -n myenv python -m pytest --ignore=machinevisiontoolbox/blocks --timeout=50 --timeout_method thread -s
5367
5468
codecov:
5569
# If all tests pass:
@@ -59,14 +73,40 @@ jobs:
5973
steps:
6074
- uses: actions/checkout@v4
6175
- name: Set up Micromamba for Python 3.11
62-
uses: mamba-org/setup-micromamba@v1
63-
- name: Install dependencies
76+
uses: mamba-org/setup-micromamba@v2
77+
with:
78+
init-shell: >-
79+
bash
80+
powershell
81+
environment-name: myenv
82+
create-args: >-
83+
python=3.11
84+
coverage
85+
numpy<2
86+
pip
87+
pytest
88+
pytest-timeout
89+
pytest-xvfb
90+
matplotlib-base
91+
setuptools
92+
setuptools-scm
93+
open3d
94+
wcwidth
95+
scipy
96+
opencv
97+
spatialmath-python
98+
ansitable
99+
100+
- name: Install libegl on Linux
101+
if: runner.os == 'Linux'
102+
run: micromamba install -y -n myenv -c conda-forge libegl
103+
104+
- name: Install package and data package
64105
run: |
65-
micromamba create -y -n myenv -c conda-forge python=3.11 pip coverage
66-
micromamba run -n myenv pip install .[dev]
106+
micromamba run -n myenv python -m pip install .[dev] --no-deps --no-build-isolation
67107
# install the data package
68108
cd mvtb-data
69-
micromamba run -n myenv python -m pip install .
109+
micromamba run -n myenv python -m pip install . --no-deps --no-build-isolation
70110
- name: Run coverage
71111
run: |
72112
micromamba run -n myenv coverage run --source=machinevisiontoolbox -m pytest --ignore=machinevisiontoolbox/blocks
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

mvtb-data/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ keywords = [
2323
"Bug Tracker" = "https://github.com/petercorke/machinevision-toolbox-python/issues"
2424

2525
[tool.setuptools.packages.find]
26-
where = ["mvtbdata/data", "mvtbdata/images"]
26+
where = ["mvtbdata", "mvtbdata/data", "mvtbdata/images"]
2727

2828
[tool.setuptools.package-data]
2929
mvtbdata = [
3030
"*.png", "*.jpg", "*.mp4",
3131
"*.dat", "*.mat", "*.yml", "*.txt", "*.ply",
32-
]
32+
]

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,16 @@ docs = [
7575
"sphinx-favicon",
7676
]
7777

78-
[build-system]
78+
[tool.pytest.ini_options]
79+
pythonpath = [
80+
".", "machinevisiontoolbox", "mvtb-data", "mvtb-data/mvtbdata",
81+
]
7982

83+
[build-system]
8084
requires = ["setuptools", "oldest-supported-numpy"]
8185
build-backend = "setuptools.build_meta"
8286

8387
[tool.setuptools]
84-
8588
packages = [
8689
"machinevisiontoolbox",
8790
"machinevisiontoolbox.base",

0 commit comments

Comments
 (0)