Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
set-soft committed Mar 31, 2024
2 parents a88846b + afdfc6a commit 8763919
Show file tree
Hide file tree
Showing 274 changed files with 444,919 additions and 173,362 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/dev_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
push_to_registry:
strategy:
matrix:
ki_release: [dev_image_k5, dev_image_k6, dev_image_k7, dev_image_k5f, dev_image_k6f, dev_image_k7f]
ki_release: [dev_image_k5, dev_image_k6, dev_image_k7, dev_image_k8, dev_image_k5f, dev_image_k6f, dev_image_k7f, dev_image_k8f]

name: Docker ${{ matrix.ki_release }}
runs-on: ubuntu-latest
Expand All @@ -21,16 +21,16 @@ jobs:

steps:
- name: Check out the repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to the Container registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- run: sudo apt-get update && sudo apt-get install cppcheck
if: false
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
cache: pip
python-version: "3.11"
- run: python -m pip install pre-commit regex
- uses: actions/cache/restore@v3
- uses: actions/cache/restore@v4
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml')
Expand All @@ -40,14 +40,14 @@ jobs:
files: ${{ env.CS_XML }}
notices-as-warnings: true # optional
prepend-filename: true # optional
- uses: actions/cache/save@v3
- uses: actions/cache/save@v4
if: ${{ always() }}
with:
path: ~/.cache/pre-commit/
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml')
}}
- name: Provide log as artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: precommit-logs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# This workflow will install Python dependencies, run tests and lint with a single version of Python.
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Regression tests
Expand Down Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ki_release: [ki5, ki6, ki7]
ki_release: [ki5, ki6, ki7, ki8]
w_tests: [g1, g2, g3]

runs-on: ubuntu-latest
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
path: output
- name: Upload Coverage
# Don't mix stable coverage with development coverage
if: github.ref == 'refs/heads/dev'
if: ${{ (github.ref == 'refs/heads/dev') && (matrix.ki_release != 'ki8') }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.ki_release }}_${{ matrix.w_tests }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ htmlcov/
pp/
output/
.coverage
.coverage.*
TODO
inti.png
tags
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,41 @@ 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 [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.6.5] - 2024-03-31
### Added
- KiCad 8 support
- Panelize: support for all new options (upto 1.5.1)
- 3D/2D renderers: support for ranges in the `show_components` and `highlight`
options. So one entry can be something like *R10-R20*. Can be disabled
using the global option `allow_component_ranges`. (See yaqwsx/PcbDraw#159)
- Navigate results: A header and navigation bar (#582)
- BoM: support for SVG format in the logos (#383)

### Changed
- CI/CD: we now filter some warnings that are always generated by docker
images when we detect a CI/CD environment. They can be enabled using the
`--warn-ci-cd` command line option. (See #564)
- KiRi: continue even on corrupted schematics (#583)
- Variants: avoid W045 on nameless pads. Assuming they are on purpose and not
real pads. (See #584)
- BoardView: Skip footprints with no pads (not just REF**)
(whitequark/kicad-boardview#14)

### Fixed
- Netlist generation problems with components on the PCB but not in schematic.
(#578)
- Filters:
- _none filter not always honored (i.e. exclude in BoM) (#580)
- Rotation for bottom JLCPCB parts with offset (#591)
- Rotation angle used to compute the offsets, must be the final angle
- PCB Parity: components excluded from the board reported anyways (#585)
- BoardView:
- X axis mirroring issues (whitequark/kicad-boardview#11)
- Alphanumeric pads sorting (whitequark/kicad-boardview#17) and
(whitequark/kicad-boardview#18)
- Present: problems when using gerbers already generated
- Diff: problems when using things like "origin/main" and add_link_id (#589)
- Panelize: not able to use external JSON configs (#592)

## [1.6.4] - 2024-02-02
### Added
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ghcr.io/inti-cmnb/kicad7_auto_full:latest
FROM ghcr.io/inti-cmnb/kicad8_auto_full:latest
LABEL AUTHOR Salvador E. Tropea <stropea@inti.gob.ar>
LABEL Description="Export various files from KiCad projects (KiCad 7)"
LABEL Description="Export various files from KiCad projects (KiCad 8)"

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile_dk8
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ghcr.io/inti-cmnb/kicad8_auto_full:dev
LABEL AUTHOR Salvador E. Tropea <stropea@inti.gob.ar>
LABEL Description="Export various files from KiCad projects (KiCad 8 + development)"

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

WORKDIR /mnt

ENTRYPOINT [ "/entrypoint.sh" ]
10 changes: 10 additions & 0 deletions Dockerfile_k8
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ghcr.io/inti-cmnb/kicad8_auto_full:latest
LABEL AUTHOR Salvador E. Tropea <stropea@inti.gob.ar>
LABEL Description="Export various files from KiCad projects (KiCad 8)"

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

WORKDIR /mnt

ENTRYPOINT [ "/entrypoint.sh" ]
50 changes: 39 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ test_docker_local_1:
# Also change the owner of the files to the current user (we run as root like in GitHub)
#docker run --rm -it -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto_test:latest '/bin/bash'
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad_auto_test:ki5 \
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k '$(SINGLE_TEST)' --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ tests/.config/kiplot/plugins/__pycache__/ tests/test_plot/fake_pcbnew/__pycache__/ tests/.config/kibot/plugins/__pycache__/ .coverage.* htmlcov/ .cache"
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run -a src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k '$(SINGLE_TEST)' --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/ .coverage.* htmlcov/ .cache"
#$(PY_COV) report
#x-www-browser htmlcov/index.html
# The coverage used in the image is incompatible
Expand All @@ -96,17 +96,25 @@ test_docker_local_1_ki6:
# Run in the same directory to make the __pycache__ valid
# Also change the owner of the files to the current user (we run as root like in GitHub)
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad_auto_test:ki6 \
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k '$(SINGLE_TEST)' --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ tests/.config/kiplot/plugins/__pycache__/ tests/test_plot/fake_pcbnew/__pycache__/ tests/.config/kibot/plugins/__pycache__/ .coverage htmlcov/ .cache"
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k '$(SINGLE_TEST)' --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/ .coverage.* htmlcov/ .cache"
# docker run --rm -it -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad6_auto_full:latest
#$(PY_COV) report
#x-www-browser htmlcov/index.html
# docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad6_auto_full:latest \
test_docker_local_1_ki8:
rm -rf output
rm -f tests/.local
# Run in the same directory to make the __pycache__ valid
# Also change the owner of the files to the current user (we run as root like in GitHub)
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad_auto_test:ki8 \
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k '$(SINGLE_TEST)' --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/ .coverage.* htmlcov/ .cache"

test_docker_local_1_ki7:
rm -rf output
rm -f tests/.local
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad_auto_test:ki7 \
/bin/bash -c "python3-coverage run src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k '$(SINGLE_TEST)' --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ tests/.config/kiplot/plugins/__pycache__/ tests/test_plot/fake_pcbnew/__pycache__/ tests/.config/kibot/plugins/__pycache__/ .coverage htmlcov/ .cache"
/bin/bash -c "python3-coverage run src/kibot --help-outputs > /dev/null; pytest-3 --log-cli-level debug -k '$(SINGLE_TEST)' --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/ .coverage.* htmlcov/ .cache"

t1k7: single_test

Expand All @@ -115,16 +123,16 @@ test_docker_local_1_n:
rm -rf output
rm -f tests/.local
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad_auto_test:nightly \
/bin/bash -c "src/kibot --help-outputs > /dev/null ; pytest-3 --log-cli-level debug -k '$(SINGLE_TEST)' --test_dir=output ; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ tests/.config/kiplot/plugins/__pycache__/ tests/test_plot/fake_pcbnew/__pycache__/ tests/.config/kibot/plugins/__pycache__/ .coverage htmlcov/ .cache"
/bin/bash -c "src/kibot --help-outputs > /dev/null ; pytest-3 --log-cli-level debug -k '$(SINGLE_TEST)' --test_dir=output ; chown -R $(USER_ID):$(GROUP_ID) output/ tests/ .coverage.* htmlcov/ .cache"

test_docker_local_1_sn:
rm -rf output .cache/
rm -f tests/.local
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad_auto_test:stable_nightly \
/bin/bash -c "export KIBOT_COPY_REF=$(KIBOT_COPY_REF); src/kibot --help-outputs > /dev/null ; pytest-3 --log-cli-level debug -k '$(SINGLE_TEST)' --test_dir=output ; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ tests/.config/kiplot/plugins/__pycache__/ tests/test_plot/fake_pcbnew/__pycache__/ tests/.config/kibot/plugins/__pycache__/ .coverage htmlcov/ .cache"
/bin/bash -c "export KIBOT_COPY_REF=$(KIBOT_COPY_REF); src/kibot --help-outputs > /dev/null ; pytest-3 --log-cli-level debug -k '$(SINGLE_TEST)' --test_dir=output ; chown -R $(USER_ID):$(GROUP_ID) output/ tests/ .coverage.* htmlcov/ .cache"
# rm -R .cache/ ; KIBOT_COPY_REF="1" SINGLE_TEST=test_print_sch_variant_ni_2 make test_docker_local_1_sn

t1k8: t1n
t1k8: test_docker_local_1_ki8

t1n: test_docker_local_1_n

Expand All @@ -135,7 +143,7 @@ test_docker_local:
# Run in the same directory to make the __pycache__ valid
# Also change the owner of the files to the current user (we run as root like in GitHub)
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad_auto_test:latest \
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage.* htmlcov/ .cache"
/bin/bash -c "flake8 . --count --statistics ; python3-coverage run src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/ .coverage.* htmlcov/ .cache"
$(PY_COV) combine
$(PY_COV) report
x-www-browser htmlcov/index.html
Expand All @@ -147,7 +155,7 @@ test_docker_local_ki6:
# Run in the same directory to make the __pycache__ valid
# Also change the owner of the files to the current user (we run as root like in GitHub)
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad_auto_test:ki6 \
/bin/bash -c "python3-coverage run src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage.* htmlcov/ .cache"
/bin/bash -c "python3-coverage run src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/ .coverage.* htmlcov/ .cache"
$(PY_COV) combine
$(PY_COV) report
x-www-browser htmlcov/index.html
Expand All @@ -157,7 +165,17 @@ test_docker_local_ki7:
rm -f tests/.local
$(PY_COV) erase
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad_auto_test:ki7 \
/bin/bash -c "python3-coverage run src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/board_samples/ .coverage htmlcov/ .cache"
/bin/bash -c "python3-coverage run src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/ .coverage.* htmlcov/ .cache"
$(PY_COV) combine
$(PY_COV) report
x-www-browser htmlcov/index.html

test_docker_local_ki8:
rm -rf output
rm -f tests/.local
$(PY_COV) erase
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" ghcr.io/inti-cmnb/kicad_auto_test:ki8 \
/bin/bash -c "python3-coverage run src/kibot --help-outputs ; pytest-3 --test_dir=output ; $(PY_COV) html; chown -R $(USER_ID):$(GROUP_ID) output/ tests/ .coverage.* htmlcov/ .cache"
$(PY_COV) combine
$(PY_COV) report
x-www-browser htmlcov/index.html
Expand All @@ -166,7 +184,7 @@ test_docker_local_manjaro:
rm -rf output_manjaro
rm -f tests/.local
docker run --rm -v $(CWD):$(CWD) --workdir="$(CWD)" setsoft/kicad_auto:manjaro_k6 \
/bin/bash -c "sudo pacman -S flake8 python-pytest python-pytest-xdist python-wheel diffutils fluxbox x11vnc wmctrl unzip zbar python-coverage wget --noconfirm ; sudo pacman -S --noconfirm make python-pre-commit ; yay -S --noconfirm python-xlsx2csv ; src/kibot --help-outputs ; pytest --test_dir=output_manjaro ; chown -R $(USER_ID):$(GROUP_ID) output_manjaro/ tests/board_samples/"
/bin/bash -c "sudo pacman -S flake8 python-pytest python-pytest-xdist python-wheel diffutils fluxbox x11vnc wmctrl unzip zbar python-coverage wget --noconfirm ; sudo pacman -S --noconfirm make python-pre-commit ; yay -S --noconfirm python-xlsx2csv ; src/kibot --help-outputs ; pytest --test_dir=output_manjaro ; chown -R $(USER_ID):$(GROUP_ID) output_manjaro/ tests/"

docker_shell:
docker run -it --rm -v $(CWD):$(CWD) --workdir="$(CWD)" \
Expand All @@ -189,7 +207,7 @@ single_test:
@echo "********************" Error
@tail -n 30 pp/*/error.txt
@rm -f tests/input_samples/bom.ini
@rm .coverage.kotori.*
@rm .coverage.*.*

single_tests:
rm -rf pp
Expand Down Expand Up @@ -264,6 +282,16 @@ update_gha:
git push
git tag -f -a v2_k7 -m "GitHub Action v2 for KiCad 7"
git push origin -f --tags
cp Dockerfile_dk8 Dockerfile
git commit -m "[CI/CD] Updating Github Action v2 for KiCad 8 development" Dockerfile
git push
git tag -f -a v2_dk8 -m "GitHub Action v2 for KiCad 8 (development)"
git push origin -f --tags
cp Dockerfile_k8 Dockerfile
git commit -m "[CI/CD] Updating Github Action v2 for KiCad 8 latest" Dockerfile
git push
git tag -f -a v2_k8 -m "GitHub Action v2 for KiCad 8"
git push origin -f --tags


.PHONY: deb deb_clean lint test test_local gen_ref doc py_build pypi_upload py_clean
31 changes: 31 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
kibot (1.6.5-1) stable; urgency=medium

* Added KiCad 8 support
* Added support for all new options in KiKit panelize (upto 1.5.1)
* Added support for ranges in the `show_components` and `highlight`
options. So one entry can be something like *R10-R20*. Can be disabled
using the global option `allow_component_ranges` to 3D/2D renderers.
* Added a header and navigation bar to Navigate results.
* Added support for SVG format in the logos to the BoM
* We now filter some warnings that are always generated by docker
images when we detect a CI/CD environment. They can be enabled using the
`--warn-ci-cd` command line option.
* Now KiRi continue even on corrupted schematics
* Now we avoid W045 on nameless pads. Assuming they are on purpose and not
real pads.
* In BoardView now we skip footprints with no pads (not just REF**)
* Fixed netlist generation problems with components on the PCB but not in
schematic.
* Fixed _none filter not always honored (i.e. exclude in BoM)
* Fixed rotation for bottom JLCPCB parts with offset
* Fixed rotation angle used to compute the offsets, must be the final angle
* Fixed components excluded from the board reported anyways in the PCB
parity check.
* Fixed X axis mirroring issues in BoardView
* Fixed alphanumeric pads sorting in BoardView
* Fixed problems when using gerbers already generated in KiKit present
* Fixed problems when using things like "origin/main" and add_link_id in Diff
* Fixed not able to use external JSON configs in panelize

-- Salvador E. Tropea <salvador@inti.gob.ar> Sun, 31 Mar 2024 11:10:04 -0300

kibot (1.6.4-1) stable; urgency=medium

* Added KiRi output (interactive diff)
Expand Down
Loading

0 comments on commit 8763919

Please sign in to comment.