Skip to content

Commit 7552b1b

Browse files
committed
add CI windows elements
1 parent 8e4e11a commit 7552b1b

File tree

4 files changed

+91
-9
lines changed

4 files changed

+91
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
# 1.2.3-rc or 1.2.3-rc1
99
# Adjust the regex below as needed.
1010
# The pattern:
11-
# ^[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]*)?$
11+
# ^[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]*)?$
1212
# matches to
1313
# [0-9]+.[0-9]+.[0-9]+
1414
# or [0-9]+.[0-9]+.[0-9]+-rc optionally followed by digits

Makefile

Lines changed: 59 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,63 @@
1-
.PHONY: setup module clean
1+
SHELL := /bin/bash
22

3-
setup:
4-
./setup.sh
3+
ifeq ($(OS),Windows_NT)
4+
VENV_BIN := venv/Scripts
5+
EXE_EXT := .exe
6+
SYS_PY := py -3.11
7+
else
8+
VENV_BIN := venv/bin
9+
EXE_EXT :=
10+
SYS_PY := python3.11
11+
endif
512

6-
module:
7-
./build.sh
13+
VENV := venv
14+
PY := $(VENV_BIN)/python
15+
PIP := $(PY) -m pip
816

17+
.PHONY: venv dev-deps test test-verbose lint lint-fix setup build module clean fix-venv
18+
19+
# ---- venv ---------------------------------------------------------------
20+
$(PY):
21+
$(SYS_PY) -m venv $(VENV)
22+
$(PIP) install -U pip setuptools wheel
23+
24+
venv: $(PY)
25+
26+
# ---- deps ---------------------------------------------------------------
27+
dev-deps: venv
28+
$(PIP) install -e .[dev]
29+
30+
# ---- tests --------------------------------------------------------------
31+
test: dev-deps
32+
PYTHONPATH=. $(PY) -m pytest -v
33+
34+
test-verbose: dev-deps
35+
PYTHONPATH=. $(PY) -m pytest -vv -s
36+
37+
# ---- lint ---------------------------------------------------------------
38+
lint: dev-deps
39+
$(PY) -m ruff check src/ tests/
40+
41+
lint-fix: dev-deps
42+
$(PY) -m ruff check --fix src/ tests/
43+
$(PY) -m ruff format src/ tests/
44+
45+
# ---- build via scripts (single source of truth) -------------------------
46+
setup: dev-deps
47+
bash ./setup.sh
48+
49+
build: setup
50+
bash ./build.sh
51+
52+
module: build
53+
cp dist/archive.tar.gz module.tar.gz
54+
55+
# ---- clean --------------------------------------------------------------
956
clean:
10-
rm -rf venv dist build .pkg *.spec __pycache__ .pytest_cache
57+
rm -rf .pytest_cache build dist *.spec module.tar.gz dist/archive.tar.gz
58+
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
59+
60+
fix-venv:
61+
rm -rf $(VENV)
62+
$(SYS_PY) -m venv $(VENV)
63+
$(PIP) install -U pip setuptools wheel

pyproject.toml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[build-system]
2+
requires = ["setuptools>=61.0", "wheel"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "camera-image-dir"
7+
version = "0.0.1"
8+
requires-python = ">=3.11,<3.13"
9+
dependencies = [
10+
"viam-sdk==0.58",
11+
"typing_extensions>=4.8",
12+
"Pillow",
13+
]
14+
15+
[project.optional-dependencies]
16+
dev = [
17+
"pytest>=7.4.0",
18+
"pytest-asyncio>=0.21.0",
19+
"ruff>=0.1.0",
20+
"pyinstaller",
21+
]
22+
23+
# --- your existing config (unchanged) ---
24+
[tool.ruff]
25+
target-version = "py311"
26+
line-length = 100
27+
28+
[tool.pytest.ini_options]
29+
addopts = "-q"
30+
testpaths = ["tests"]
31+
pythonpath = ["."]

requirements.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)