From eaf4f21ce65081da0490a41ee1829b4ec8319109 Mon Sep 17 00:00:00 2001 From: jaseg Date: Thu, 3 Feb 2022 19:57:16 +0100 Subject: More doc --- gerbonara/tests/image_support.py | 20 ++++++++++++++++++++ gerbonara/tests/resources/fritzing/combined.gbs | 2 +- gerbonara/tests/resources/open_outline_altium.gbr | 2 +- gerbonara/tests/test_excellon.py | 19 +++++++++++++++++-- gerbonara/tests/test_ipc356.py | 19 +++++++++++++++++-- gerbonara/tests/test_layers.py | 19 ++++++++++++++++++- gerbonara/tests/test_rs274x.py | 21 +++++++++++++++++++-- gerbonara/tests/test_utils.py | 18 +++++++++++++++--- gerbonara/tests/utils.py | 17 +++++++++++++++++ 9 files changed, 125 insertions(+), 12 deletions(-) (limited to 'gerbonara/tests') diff --git a/gerbonara/tests/image_support.py b/gerbonara/tests/image_support.py index 926e91d..33705f3 100644 --- a/gerbonara/tests/image_support.py +++ b/gerbonara/tests/image_support.py @@ -1,3 +1,23 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright 2022 Jan Götte +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Based on https://github.com/tracespace/tracespace +# + import subprocess from pathlib import Path import tempfile diff --git a/gerbonara/tests/resources/fritzing/combined.gbs b/gerbonara/tests/resources/fritzing/combined.gbs index 72ac193..0f02f96 100644 --- a/gerbonara/tests/resources/fritzing/combined.gbs +++ b/gerbonara/tests/resources/fritzing/combined.gbs @@ -1,4 +1,4 @@ -G04 file was processed by a buggy GerberTools version. +G04 file was processed by a buggy GerberTools version.* G04 file manually fixed for GerberTools #86 / #143* %MOIN*% %OFA0B0*% diff --git a/gerbonara/tests/resources/open_outline_altium.gbr b/gerbonara/tests/resources/open_outline_altium.gbr index dc5a1d6..ce20053 100644 --- a/gerbonara/tests/resources/open_outline_altium.gbr +++ b/gerbonara/tests/resources/open_outline_altium.gbr @@ -1,4 +1,4 @@ -G04 From https://github.com/tracespace/tracespace/issues/365 +G04 From https://github.com/tracespace/tracespace/issues/365* G04 Generated by Cuprum (2.1.4) at 2021-06-09T12:46:32+02:00* %FSLAX66Y66*% %MOMM*% diff --git a/gerbonara/tests/test_excellon.py b/gerbonara/tests/test_excellon.py index 6267f65..2d2b32a 100644 --- a/gerbonara/tests/test_excellon.py +++ b/gerbonara/tests/test_excellon.py @@ -1,6 +1,21 @@ -#! /usr/bin/env python +#!/usr/bin/env python # -*- coding: utf-8 -*- -# Author: Jan Götte +# +# Copyright 2022 Jan Götte +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + import math import pytest diff --git a/gerbonara/tests/test_ipc356.py b/gerbonara/tests/test_ipc356.py index a49b243..1090554 100644 --- a/gerbonara/tests/test_ipc356.py +++ b/gerbonara/tests/test_ipc356.py @@ -1,7 +1,22 @@ -#! /usr/bin/env python +#!/usr/bin/env python # -*- coding: utf-8 -*- +# +# Copyright 2015 Hamilton Kibbe +# Copyright 2022 Jan Götte +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# -# Author: Hamilton Kibbe import pytest from ..ipc356 import * diff --git a/gerbonara/tests/test_layers.py b/gerbonara/tests/test_layers.py index 3f72cd8..795af25 100644 --- a/gerbonara/tests/test_layers.py +++ b/gerbonara/tests/test_layers.py @@ -1,7 +1,7 @@ #! /usr/bin/env python # -*- coding: utf-8 -*- # -# Copyright 2021 Jan Götte +# Copyright 2022 Jan Götte # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,6 +14,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +# from pathlib import Path @@ -274,6 +275,22 @@ REFERENCE_DIRS = { 'NCDrill/ThruHolePlated.ncd': 'drill plated', }, + 'zuken': { + '': 'mechanical outline', + 'Gerber/DrillDrawingThrough.gdo': None, + 'Gerber/EtchLayerBottom.gdo': 'bottom copper', + 'Gerber/EtchLayerTop.gdo': 'top copper', + 'Gerber/GerberPlot.gpf': None, + 'Gerber/PCB.dsn': None, + 'Gerber/SolderPasteBottom.gdo': 'bottom paste', + 'Gerber/SolderPasteTop.gdo': 'top paste', + 'Gerber/SoldermaskBottom.gdo': 'bottom mask', + 'Gerber/SoldermaskTop.gdo': 'top mask', + 'NCDrill/ContourPlated.ncd': 'mechanical outline', + 'NCDrill/ThruHoleNonPlated.ncd': 'drill nonplated', + 'NCDrill/ThruHolePlated.ncd': 'drill plated', + }, + 'upverter': { 'design_export.drl': 'drill unknown', 'design_export.gbl': 'bottom copper', diff --git a/gerbonara/tests/test_rs274x.py b/gerbonara/tests/test_rs274x.py index 9beaa7b..eb3ed48 100644 --- a/gerbonara/tests/test_rs274x.py +++ b/gerbonara/tests/test_rs274x.py @@ -1,6 +1,23 @@ -#! /usr/bin/env python +#!/usr/bin/env python # -*- coding: utf-8 -*- -# Author: Jan Götte +# +# Copyright 2022 Jan Götte +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Based on https://github.com/tracespace/tracespace +# + import math from PIL import Image diff --git a/gerbonara/tests/test_utils.py b/gerbonara/tests/test_utils.py index 6f243c8..eca58b1 100644 --- a/gerbonara/tests/test_utils.py +++ b/gerbonara/tests/test_utils.py @@ -1,8 +1,20 @@ -#! /usr/bin/env python +#!/usr/bin/env python # -*- coding: utf-8 -*- # -# Author: Hamilton Kibbe -# Author: Jan Götte +# Copyright 2015 Hamilton Kibbe +# Copyright 2022 Jan Götte +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # import pytest diff --git a/gerbonara/tests/utils.py b/gerbonara/tests/utils.py index a3da40b..d78f257 100644 --- a/gerbonara/tests/utils.py +++ b/gerbonara/tests/utils.py @@ -1,3 +1,20 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# Copyright 2022 Jan Götte +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# import pytest import functools -- cgit