Skip to content

Commit

Permalink
Release 2.1.0 (#59)
Browse files Browse the repository at this point in the history
## Release 2.1.0

- Fixed #37
- Added latest Gerber spec file revision 2023.08 to documentation.
- Added command line interface for PyGerber 2D rendering.
- Added Gerber X3/X2 language server which can be acquired with
`pip install pygerber[language-server]`. Currently server capabilities
include hover
messages with Gerber reference cited and minimal amount of suggestions.
We are
  planning to further extend this server in future releases.
- Added `is-language-server-available` CLI command for checking if
  `pygerber[language-sever]` is available.
- Added support for arc region boundaries (#61).
- Added warning messages whenever zero surface flash is created.
- Improved documentation for many of supported Gerber commands. This
documentation is
  used by language server to provide specification reference.
- Refactored tokenizer implementation, as a result #67 was fixed and #64
is no longer an issue in some cases.
  • Loading branch information
Argmaster authored Nov 1, 2023
2 parents 2c1fe02 + e5e2a7b commit c102351
Show file tree
Hide file tree
Showing 164 changed files with 66,011 additions and 2,647 deletions.
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- PyGerber Version [e.g. 2.0.0]
- Python version: [e.g. 3.8.13]
- PyGerber version: [e.g. 2.0.0]

**Additional context**

Expand Down
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/compatibility_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Compatibility request
about: Create request for compatibility with some other tool.
title: ""
labels: ["compatibility", "question"]
assignees: ""
---

**Describe compatibility issue**

A clear and concise description of what is not working the way expected.

**To Reproduce**

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**

A clear and concise description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**

- OS: [e.g. iOS]
- Python version: [e.g. 3.8.13]
- PyGerber version: [e.g. 2.0.0]

**Additional context**

Add any other context about the problem here.
File renamed without changes.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/syntax_feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Functional feature request
about: Request new functional feature for PyGerber.
title: "Great new function of PyGerber"
labels: "enhancement"
assignees: ""
---

**Describe how this feature should work**

A clear and concise description of what the problem is. Ex. I'm always frustrated when
[...]

**Describe why this supporting this feature is important**

A clear and concise description of what you want to happen.

**Additional context**

Add any other context or screenshots about the feature request here.
6 changes: 3 additions & 3 deletions .github/workflows/build_n_deploy_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Build & Deploy Docs
on:
push:
tags:
- "^v.*$"
- "v.*"

workflow_dispatch:

Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
architecture: "x64"

- name: Install Poetry
run: pip install poetry==1.5.1
run: pip install poetry==1.6.1

- name: Install dependencies
run: poetry install --with=docs --no-cache --sync
Expand All @@ -48,4 +48,4 @@ jobs:
- name: Run build & deploy documentation
run: |
poetry run mike deploy --push --update-aliases $(poetry version | awk '{ print $2 }') latest -F mkdocs.yaml
poetry run mike deploy --push --force --update-aliases $(poetry version | awk '{ print $2 }') latest -F mkdocs.yaml
2 changes: 1 addition & 1 deletion .github/workflows/code_quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
architecture: "x64"

- name: Install Poetry
run: pip install poetry==1.5.1
run: pip install poetry==1.6.1

- name: Install dependencies
run: poetry install --no-cache --sync
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release_to_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Publish 📦 to PyPI
on:
push:
tags:
- "^v.*$"
- "v.*"

workflow_dispatch:

Expand All @@ -26,13 +26,13 @@ jobs:
architecture: "x64"

- name: Install Poetry 📜
run: pip install poetry==1.5.1
run: pip install poetry==1.6.1

- name: Install dependencies 🗄️
run: poetry install --no-cache --sync

- name: Build distribution 📦
run: poetry run poe build
run: poetry run poetry build

- name: Detect Version of project
id: project-version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_to_test_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
architecture: "x64"

- name: Install Poetry 📜
run: pip install poetry==1.5.1
run: pip install poetry==1.6.1

- name: Install dependencies 🗄️
run: poetry install --no-cache --sync
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/type_checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.11"]
python-version: ["3.8", "3.12"]

runs-on: ${{ matrix.os }}

Expand All @@ -57,7 +57,7 @@ jobs:
architecture: "x64"

- name: Install Poetry
run: pip install poetry==1.5.1
run: pip install poetry==1.6.1

- name: Install dependencies
run: poetry install --no-cache --sync
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

env:
OS: ${{ matrix.os }}
Expand All @@ -67,7 +67,7 @@ jobs:
architecture: "x64"

- name: Install Poetry
run: pip install poetry==1.5.1
run: pip install poetry==1.6.1

- name: Install dependencies
run: poetry install --no-cache --sync
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,4 @@ pyrightconfig.json

*.prof
output.png
\#*.*
8 changes: 1 addition & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
exclude: '^(\.tox|\.env|dist|\.vscode)(/|$)'
repos:
- repo: https://github.com/PyCQA/autoflake
rev: "v2.0.1"
hooks:
- id: autoflake
args: [--jobs, "32", --in-place, --expand-star-imports]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v2.7.1"
hooks:
Expand Down Expand Up @@ -35,7 +29,7 @@ repos:
- id: debug-statements

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.278"
rev: "v0.1.3"
hooks:
- id: ruff
args: ["--fix"]
53 changes: 46 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,33 +1,50 @@
{
"cSpell.words": [
"Altium",
"AMDONUTCAL",
"AMDONUTVAR",
"AMRECTANGLE",
"AMTEST",
"Argmaster",
"ASAXBY",
"ASAYBX",
"ATMEGA",
"AXBY",
"AYBX",
"CMPN",
"DONUTVAR",
"drawsvg",
"dtype",
"ebnf",
"endwith",
"EOEX",
"EOSTMT",
"fromarray",
"FSLAX",
"gerberx",
"getcontext",
"getpixel",
"indygo",
"inlinehilite",
"IPPOS",
"kicad",
"levelname",
"linenums",
"Linu",
"lsprotocol",
"mkdocs",
"mkdocstrings",
"Moiré",
"MOMM",
"numpy",
"obround",
"prec",
"putpixel",
"pydantic",
"pygerber",
"pygls",
"pygments",
"pylance",
"pymdownx",
"pyparsing",
"qualname",
Expand All @@ -37,9 +54,10 @@
"superfences",
"tasklist",
"Ucamco's",
"ungroup",
"Xino"
],
"python.testing.pytestArgs": ["--log-level=DEBUG", "-s", "-n", "auto"],
"python.testing.pytestArgs": ["--log-level=DEBUG", "-s"],
"ruff.enable": true,
"ruff.fixAll": true,
"python.analysis.importFormat": "absolute",
Expand Down Expand Up @@ -73,12 +91,12 @@
"depth": 2
},
{
"name": "scipy",
"depth": 2
"name": "pygls",
"depth": 10
},
{
"name": "django",
"depth": 2
"name": "lsprotocol",
"depth": 10
},
{
"name": "typing_extensions",
Expand All @@ -90,6 +108,27 @@
}
],
"mypy-type-checker.importStrategy": "useBundled",
"black-formatter.importStrategy": "fromEnvironment",
"cSpell.ignoreWords": ["RRGGBB", "RRGGBBAA"]
"black-formatter.importStrategy": "useBundled",
"cSpell.ignoreWords": ["RRGGBB", "RRGGBBAA"],
"workbench.colorCustomizations": {
"activityBar.activeBackground": "#3399ff",
"activityBar.background": "#3399ff",
"activityBar.foreground": "#15202b",
"activityBar.inactiveForeground": "#15202b99",
"activityBarBadge.background": "#bf0060",
"activityBarBadge.foreground": "#e7e7e7",
"commandCenter.border": "#e7e7e799",
"sash.hoverBorder": "#3399ff",
"statusBar.background": "#007fff",
"statusBar.foreground": "#e7e7e7",
"statusBarItem.hoverBackground": "#3399ff",
"statusBarItem.remoteBackground": "#007fff",
"statusBarItem.remoteForeground": "#e7e7e7",
"titleBar.activeBackground": "#007fff",
"titleBar.activeForeground": "#e7e7e7",
"titleBar.inactiveBackground": "#007fff99",
"titleBar.inactiveForeground": "#e7e7e799"
},
"peacock.color": "#007fff",
"mypy-type-checker.args": ["--config-file=pyproject.toml"]
}
45 changes: 45 additions & 0 deletions .vscode/snippets.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
// Place your pygerber_new workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"token comment": {
"scode": "python",
"prefix": "!td",
"body": [
"\"\"\"## ${1:spec section} ${2:section title}",
"",
"${4:description}",
"",
"```ebnf",
"${5:syntax}",
"```"
"",
"---",
"",
"## Example",
"",
"```gerber",
"${6:example gerber code}",
"```"
""
"---",
"",
"See section $1 of [The Gerber Layer Format Specification](https://www.ucamco.com/files/downloads/file_en/456/gerber-layer-format-specification-revision-2023-08_en.pdf#page=${3:page})",
"",
"\"\"\" # noqa: E501",
]
}
}
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and
this project adheres to [Calendar Versioning](https://calver.org/).

## Release 2.1.0

- Fixed #37
- Added latest Gerber spec file revision 2023.08 to documentation.
- Added command line interface for PyGerber 2D rendering.
- Added Gerber X3/X2 language server which can be acquired with
`pip install pygerber[language-server]`. Currently server capabilities include hover
messages with Gerber reference cited and minimal amount of suggestions. We are
planning to further extend this server in future releases.
- Added `is-language-server-available` CLI command for checking if
`pygerber[language-sever]` is available.
- Added support for arc region boundaries (#61).
- Added warning messages whenever zero surface flash is created.
- Improved documentation for many of supported Gerber commands. This documentation is
used by language server to provide specification reference.
- Refactored tokenizer implementation, as a result #67 was fixed and #64 is no longer an
issue in some cases.

## Release 2.0.1

- Fixed names of Gerber specification files (`.pdf.pdf` extension replaced with `.pdf`)
Expand Down
Loading

0 comments on commit c102351

Please sign in to comment.