Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{md,yml,yaml}]
indent_size = 2

[*.{svg,png,jpg,pdf,gif}]
insert_final_newline = false

[*.{ts,qm}]
insert_final_newline = false
4 changes: 4 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This commit applies ruff format + ruff check --fix to all Python files.
# Use git blame --ignore-revs-file .git-blame-ignore-revs to skip it.
# When reviewing the PR, append ?w=1 to the diff URL to hide whitespace changes.
7cb8760cc1e5be808f61bbffcd8bb239e609352d
38 changes: 21 additions & 17 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
* text=auto eol=lf
*.py text diff=python
*.md text diff=markdown
*.svg text
*.ui text
*.xml text
*.yml text
*.yaml text
*.toml text
*.cfg text
*.ini text
*.ts text
*.qm binary
*.png binary
*.jpg binary
*.gif binary
*.pdf binary
*.FCStd binary
*.step binary
*.stp binary
*.dxf binary
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
commit-message:
prefix: "ci"

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
commit-message:
prefix: "chore"
open-pull-requests-limit: 3
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: CI

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
schedule:
- cron: "0 6 * * 1" # every Monday 06:00 UTC

jobs:
ruff:
name: Ruff (lint + format)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- uses: astral-sh/ruff-action@v3
with:
args: check
- uses: astral-sh/ruff-action@v3
with:
args: format --check

pre-commit:
name: Pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1

types:
name: Type check (ty)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- run: uvx ty check
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,19 @@ $RECYCLE.BIN/
# Windows shortcuts
*.lnk

# Python executable
# Python
*.pyc
__pycache__/

# Tooling caches
.ruff_cache/
.pre-commit/
.uv/

# Editor
*.swp
*.swo
*~

# =========================
# Operating System Files
Expand Down
34 changes: 34 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.8
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

- repo: local
hooks:
- id: ty
name: ty
entry: uvx ty check
language: system
types: [python]
pass_filenames: false

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
args: [--maxkb=500]
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix=lf]
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
36 changes: 18 additions & 18 deletions Init.py
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
#-*- coding: utf-8 -*-
#****************************************************************************
#* *
#* Kicad STEPUP (TM) (3D kicad board and models to STEP) for FreeCAD *
#* 3D exporter for FreeCAD *
#* Kicad STEPUP TOOLS (TM) (3D kicad board and models to STEP) for FreeCAD *
#* Copyright (c) 2015 *
#* Maurice easyw@katamail.com *
#* *
#* Kicad STEPUP (TM) is a TradeMark and cannot be freely usable *
#* *
# ****************************************************************************
# * *
# * Kicad STEPUP (TM) (3D kicad board and models to STEP) for FreeCAD *
# * 3D exporter for FreeCAD *
# * Kicad STEPUP TOOLS (TM) (3D kicad board and models to STEP) for FreeCAD *
# * Copyright (c) 2015 *
# * Maurice easyw@katamail.com *
# * *
# * Kicad STEPUP (TM) is a TradeMark and cannot be freely usable *
# * *

import FreeCAD

# two options for IDF added by Milos Koutny (12-Feb-2010)
#FreeCAD.addImportType("Kicad pcb board/mod File Type (*.kicad_pcb *.emn *.kicad_mod)","kicadStepUptools")
# FreeCAD.addImportType("Kicad pcb board/mod File Type (*.kicad_pcb *.emn *.kicad_mod)","kicadStepUptools")
# ___ver___ = "6.0.4.5"
## idf import dropped

#FreeCAD.addImportType("Kicad pcb board/mod File Type (*.kicad_pcb *.kicad_mod)","kicadStepUptools")
FreeCAD.addImportType("Kicad pcb board File Type (*.kicad_pcb)","kicadStepUptools")
FreeCAD.addImportType("Kicad pcb mod File Type (*.kicad_mod)","kicadStepUptools")
# FreeCAD.addImportType("Kicad pcb board/mod File Type (*.kicad_pcb *.kicad_mod)","kicadStepUptools")
FreeCAD.addImportType("Kicad pcb board File Type (*.kicad_pcb)", "kicadStepUptools")
FreeCAD.addImportType("Kicad pcb mod File Type (*.kicad_mod)", "kicadStepUptools")

FreeCAD.addImportType("zip of STEP/FCStd File Type (*.zip)","ZipStepImport")
FreeCAD.addImportType("zip of STEP/FCStd File Type (*.zip)", "ZipStepImport")
Comment on lines +20 to +23

# using faithful old legacy dxf v1.4.0
# FreeCAD.addImportType("DXF Legacy Type (*.dxf)","_DXF_Import")

import FreeCAD

#FreeCAD.addImportType("IDF emp File Type (*.emp)","Import_Emp")
# FreeCAD.addImportType("IDF emp File Type (*.emp)","Import_Emp")
Loading