diff --git a/.github/workflows/python37.yaml b/.github/workflows/python313.yaml similarity index 90% rename from .github/workflows/python37.yaml rename to .github/workflows/python313.yaml index 1bde5eb..d4c9e60 100644 --- a/.github/workflows/python37.yaml +++ b/.github/workflows/python313.yaml @@ -1,4 +1,4 @@ -name: Unit Tests for Python 3.7 +name: Unit Tests for Python 3.13 on: pull_request: @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7] + python-version: ['3.13'] runs-on: ubuntu-latest diff --git a/.github/workflows/python38.yaml b/.github/workflows/python38.yaml deleted file mode 100644 index d99d9c2..0000000 --- a/.github/workflows/python38.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Unit Tests for Python 3.8 - -on: - pull_request: - types: - - opened - - reopened - - ready_for_review - - synchronize - push: - branches: - - master - -jobs: - test: - name: Python Version Gauntlet - strategy: - fail-fast: false - matrix: - python-version: [3.8] - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - pip install -r requirements-dev.txt - - name: Run Unit Tests - run: | - pytest diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 7037bd4..ae2fc7a 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12'] + python-version: [3.9, '3.10', '3.11', '3.12'] runs-on: ubuntu-latest diff --git a/README.md b/README.md index 1435455..1eeccb7 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,11 @@ Tools to handle Gerber and Excellon files in Python. In the pipeline column output the status of a certain step in github actions workflow | Version | Supported | Notes | | ------- | ------------------ | -------- | -| 3.7.x | [![Python 3.7](https://github.com/MacroFab/pcb-tools/actions/workflows/python37.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python37.yaml) | End of Life | -| 3.8.x | [![Python 3.8](https://github.com/MacroFab/pcb-tools/actions/workflows/python38.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python38.yaml) | | | 3.9.x | [![Python 3.9](https://github.com/MacroFab/pcb-tools/actions/workflows/python39.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python39.yaml) | | | 3.10.x | [![Python 3.10](https://github.com/MacroFab/pcb-tools/actions/workflows/python310.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python310.yaml) | | | 3.11.x | [![Python 3.11](https://github.com/MacroFab/pcb-tools/actions/workflows/python311.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python311.yaml) | | | 3.12.x | [![Python 3.12](https://github.com/MacroFab/pcb-tools/actions/workflows/python312.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python312.yaml) | | +| 3.13.x | [![Python 3.13](https://github.com/MacroFab/pcb-tools/actions/workflows/python313.yaml/badge.svg)](https://github.com/MacroFab/pcb-tools/actions/workflows/python313.yaml) | | Usage Example: --------------- diff --git a/gerber/excellon_statements.py b/gerber/excellon_statements.py index 2c50ef9..4d11a9e 100644 --- a/gerber/excellon_statements.py +++ b/gerber/excellon_statements.py @@ -455,10 +455,10 @@ def from_excellon(cls, line, settings, **kwargs): count = int(stmt['rcount']) xdelta = (parse_gerber_value(stmt['xdelta'], settings.format, settings.zero_suppression) - if stmt['xdelta'] is not '' else None) + if stmt['xdelta'] != '' else None) ydelta = (parse_gerber_value(stmt['ydelta'], settings.format, settings.zero_suppression) - if stmt['ydelta'] is not '' else None) + if stmt['ydelta'] != '' else None) c = cls(count, xdelta, ydelta, **kwargs) c.units = settings.units return c @@ -606,10 +606,10 @@ def from_excellon(cls, line, settings, **kwargs): stmt = match.groupdict() x = (parse_gerber_value(stmt['x'], settings.format, settings.zero_suppression) - if stmt['x'] is not '' else None) + if stmt['x'] != '' else None) y = (parse_gerber_value(stmt['y'], settings.format, settings.zero_suppression) - if stmt['y'] is not '' else None) + if stmt['y'] != '' else None) c = cls(x, y, **kwargs) c.units = settings.units return c diff --git a/gerber/ipc356.py b/gerber/ipc356.py index 52eb676..4ca7005 100644 --- a/gerber/ipc356.py +++ b/gerber/ipc356.py @@ -382,8 +382,8 @@ def from_line(cls, line, settings): coord_strings = line.strip().split()[1:] for coord in coord_strings: coord_dict = _COORD.match(coord).groupdict() - x = int(coord_dict['x']) if coord_dict['x'] is not '' else x - y = int(coord_dict['y']) if coord_dict['y'] is not '' else y + x = int(coord_dict['x']) if coord_dict['x'] != '' else x + y = int(coord_dict['y']) if coord_dict['y'] != '' else y points.append((x * scale, y * scale)) return cls(type, points) @@ -412,9 +412,9 @@ def from_line(cls, line, settings): x = 0 y = 0 x = int(aperture_dict['x']) * \ - scale if aperture_dict['x'] is not '' else None + scale if aperture_dict['x'] != '' else None y = int(aperture_dict['y']) * \ - scale if aperture_dict['y'] is not '' else None + scale if aperture_dict['y'] != '' else None aperture = (x, y) # Parse out conductor shapes @@ -428,8 +428,8 @@ def from_line(cls, line, settings): coords = rshape.split() for coord in coords: coord_dict = _COORD.match(coord).groupdict() - x = int(coord_dict['x']) if coord_dict['x'] is not '' else x - y = int(coord_dict['y']) if coord_dict['y'] is not '' else y + x = int(coord_dict['x']) if coord_dict['x'] != '' else x + y = int(coord_dict['y']) if coord_dict['y'] != '' else y shape.append((x * scale, y * scale)) shapes.append(tuple(shape)) return cls(net_name, layer, aperture, tuple(shapes))