Skip to content

Commit b49406a

Browse files
Add CI workflow.
1 parent e74efdb commit b49406a

3 files changed

Lines changed: 79 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: ["3.10", "3.11", "3.12"]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v5
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e ".[dev]"
28+
29+
- name: Run linter
30+
run: ruff check .
31+
32+
- name: Run type checker
33+
run: mypy sketch_canonical --ignore-missing-imports
34+
35+
- name: Run tests
36+
run: pytest tests/ -v --ignore=tests/test_freecad_roundtrip.py
37+
38+
- name: Run tests with coverage
39+
run: pytest tests/ --cov=sketch_canonical --cov-report=xml --ignore=tests/test_freecad_roundtrip.py
40+
41+
test-freecad:
42+
runs-on: ubuntu-latest
43+
continue-on-error: true
44+
45+
steps:
46+
- uses: actions/checkout@v4
47+
48+
- name: Install FreeCAD
49+
run: |
50+
sudo apt-get update
51+
sudo apt-get install -y freecad
52+
53+
- name: Set up Python
54+
uses: actions/setup-python@v5
55+
with:
56+
python-version: "3.11"
57+
58+
- name: Install dependencies
59+
run: |
60+
python -m pip install --upgrade pip
61+
pip install -e ".[dev]"
62+
63+
- name: Run FreeCAD integration tests
64+
run: pytest tests/test_freecad_roundtrip.py -v || echo "FreeCAD tests skipped or failed (optional)"

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Canonical Sketch
22

3+
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
[![Tests](https://github.com/codereclaimers/canonical_sketch/actions/workflows/test.yml/badge.svg)](https://github.com/codereclaimers/canonical_sketch/actions/workflows/test.yml)
6+
[![Status: Alpha](https://img.shields.io/badge/status-alpha-orange.svg)]()
7+
38
A CAD-agnostic 2D sketch geometry and constraint representation with adapter support for FreeCAD.
49

510
## Overview

pyproject.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
66
name = "sketch-canonical"
77
version = "0.1.0"
88
description = "CAD-agnostic representation for 2D sketch geometry and constraints"
9-
readme = "SPECIFICATION.md"
9+
readme = "README.md"
1010
license = {text = "MIT"}
1111
requires-python = ">=3.10"
1212
classifiers = [
@@ -20,6 +20,15 @@ classifiers = [
2020
"Topic :: Scientific/Engineering :: Computer Aided Design (CAD)",
2121
]
2222
keywords = ["cad", "sketch", "geometry", "constraints", "freecad", "solidworks", "fusion360"]
23+
authors = [
24+
{name = "Alan", email = "alan@codereclaimers.com"}
25+
]
26+
27+
[project.urls]
28+
Homepage = "https://github.com/codereclaimers/canonical_sketch"
29+
Repository = "https://github.com/codereclaimers/canonical_sketch"
30+
Issues = "https://github.com/codereclaimers/canonical_sketch/issues"
31+
Documentation = "https://github.com/codereclaimers/canonical_sketch/blob/main/SPECIFICATION.md"
2332

2433
[project.optional-dependencies]
2534
dev = [

0 commit comments

Comments
 (0)