diff --git a/.github/workflows/create-debug-docs.yaml b/.github/workflows/create-debug-docs.yaml index 980e355..b3108ef 100644 --- a/.github/workflows/create-debug-docs.yaml +++ b/.github/workflows/create-debug-docs.yaml @@ -1,80 +1,11 @@ -name: Create Production Data For Beta Version +name: Create Debug Docs on: workflow_dispatch: push: - branches: - - 'main' - + branches: [main] permissions: contents: write - jobs: - export-ecad: - name: Export ECAD - runs-on: ubuntu-24.04 - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Update the PCBs with the BETA and git hash - run: | - export COMMIT=$(git rev-parse --short HEAD) - echo "COMMIT = ${COMMIT}" - sed -i "s/<>/BETA-${COMMIT}/g" *.kicad_* - - - name: Generate Export Files - uses: INTI-CMNB/KiBot@v2_k9 - with: - config: production.kibot.yaml - dir: output - schema: main.kicad_sch - board: main.kicad_pcb - verbose: 0 - - - name: Upload Export Files as Artifacts - uses: actions/upload-artifact@v4 - with: - name: production - path: output - if-no-files-found: error - - - collect-and-provide: - runs-on: ubuntu-24.04 - needs: export-ecad - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.1' - bundler-cache: true - cache-version: 0 - - - name: Setup Pages - id: pages - uses: actions/configure-pages@v5 - with: - generator_config_file: doc - - - name: Build with Jekyll - run: cd doc && bundle exec jekyll build - env: - JEKYLL_ENV: production - - - uses: actions/download-artifact@v5 - with: - name: production - path: doc/_site - - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages - folder: doc/_site - target-folder: ${{ env.DEPLOY_PATH }} - clean: true + build: + uses: OE5XRX/HW-Module-CI/.github/workflows/create-debug-docs.yaml@main + secrets: inherit diff --git a/.github/workflows/create-release-docs.yaml b/.github/workflows/create-release-docs.yaml index ba66cd2..7f81061 100644 --- a/.github/workflows/create-release-docs.yaml +++ b/.github/workflows/create-release-docs.yaml @@ -1,57 +1,9 @@ -name: Create Production Data For Release Version +name: Create Release Docs on: workflow_dispatch: release: types: [published] - jobs: - export-ecad: - name: Export ECAD - runs-on: ubuntu-24.04 - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Update the PCBs with the BETA and git hash - run: | - export COMMIT=$(git rev-parse --short HEAD) - echo "COMMIT = ${COMMIT}" - sed -i "s/<>/${GITHUB_REF_NAME}-${COMMIT}/g" *.kicad_* - - - name: Generate Export Files - uses: INTI-CMNB/KiBot@v2_k9 - with: - config: production.kibot.yaml - dir: output - schema: main.kicad_sch - board: main.kicad_pcb - verbose: 0 - - - name: copy doc files to output folder - run: sudo cp doc/* output/ - - - name: Upload Export Files as Artifacts - uses: actions/upload-artifact@v4 - with: - name: production - path: output - if-no-files-found: error - -# - name: Generate Parts on InvenTree Server -# env: -# INVENTREE_API_TOKEN: ${{ secrets.INVENTREE_API_TOKEN }} -# INVENTREE_API_HOST: ${{ secrets.INVENTREE_API_HOST }} -# run: | -# pip install -r scripts/requirements.txt -# python3 scripts/bom-export.py --csv_file output/*-bom.csv --name "${{ github.event.repository.name }}" --version "${{ github.ref_name }}" --pcb_image output/*-3D_top-without.png --assembly_image output/*-3D_top-with.png - - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4 - with: - token: ${{ secrets.DEPLOY_GH_TOKEN }} - repository-name: OE5XRX/OE5XRX.github.io - branch: main - folder: output - target-folder: docs/remote-station/hardware/${{ github.event.repository.name }} - clean: true + build: + uses: OE5XRX/HW-Module-CI/.github/workflows/create-release-docs.yaml@main + secrets: inherit diff --git a/.github/workflows/kibot-check.yaml b/.github/workflows/kibot-check.yaml index 0710288..2d43302 100644 --- a/.github/workflows/kibot-check.yaml +++ b/.github/workflows/kibot-check.yaml @@ -1,26 +1,11 @@ -name: Kibot check +name: KiBot Check on: workflow_dispatch: pull_request: - branches: - - 'main' + branches: [main] push: - branches: - - 'main' - + branches: [main] jobs: - kibot_check: - name: Check with Kibot - runs-on: ubuntu-24.04 - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: check KiCad files - uses: INTI-CMNB/KiBot@v2_k9 - with: - config: test.kibot.yaml - dir: output - schema: main.kicad_sch - verbose: 0 + check: + uses: OE5XRX/HW-Module-CI/.github/workflows/kibot-check.yaml@main + secrets: inherit diff --git a/.gitignore b/.gitignore index 6d4d8eb..df7a2de 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,6 @@ Thumbs.db # Python cache (if scripts are used) __pycache__/ *.pyc + +# Generated by HW-Module-CI at runtime (must never be committed) +doc/_data/project.yml diff --git a/Gemfile b/Gemfile deleted file mode 100644 index 2f7fc6b..0000000 --- a/Gemfile +++ /dev/null @@ -1,8 +0,0 @@ -source 'https://rubygems.org' - -gem "jekyll", "4.4.1" - -group :jekyll_plugins do - gem "just-the-docs", "0.10.1" - gem "jekyll-git-hash" -end diff --git a/main.kicad_pcb b/PowerBoard.kicad_pcb similarity index 99% rename from main.kicad_pcb rename to PowerBoard.kicad_pcb index d79183d..287978a 100644 --- a/main.kicad_pcb +++ b/PowerBoard.kicad_pcb @@ -424,7 +424,7 @@ (property ki_fp_filters "*Fuse*") (path "/f2994666-280a-4a98-9e28-330aaba87ce6") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr through_hole) (fp_line (start -8.636 4.572) @@ -1658,7 +1658,7 @@ (property ki_fp_filters "LED* LED_SMD:* LED_THT:*") (path "/555d8e40-af41-4f5e-956a-cea11c75a7e8") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr smd) (fp_line (start 1 -0.96) @@ -2067,7 +2067,7 @@ (property ki_fp_filters "MountingHole*") (path "/df999db3-7087-40c6-8ce3-d5dd370ce265") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr exclude_from_pos_files exclude_from_bom) (fp_circle (center 0 0) @@ -2354,7 +2354,7 @@ (property ki_fp_filters "CP_*") (path "/0110e4c1-453e-41d4-8d9c-59468bc248ec") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr smd) (fp_line (start 3.65 -2.26) @@ -2757,7 +2757,7 @@ (property ki_fp_filters "*Fuse*") (path "/b2913416-7c92-48b7-9ea1-d88758f30f9f") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr through_hole) (fp_line (start -8.636 4.572) @@ -3233,7 +3233,7 @@ ) (path "/766da13f-a9ee-4bc3-81f8-b04a7fcbf722") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr through_hole) (fp_line (start 11.35 -16.35) @@ -5540,7 +5540,7 @@ (property ki_fp_filters "MountingHole*") (path "/232daf58-0468-4f94-bfdb-9142284c844d") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr exclude_from_pos_files exclude_from_bom) (fp_circle (center 0 0) @@ -9937,7 +9937,7 @@ (property ki_fp_filters "R_*") (path "/58b43aa4-ecd4-4ec1-8b8d-be6f0ac00237") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr smd) (fp_line (start -0.227064 0.735) @@ -10324,7 +10324,7 @@ (property ki_fp_filters "CP_*") (path "/58f29570-cd55-43ce-bebf-bae51024406d") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr smd) (fp_line (start 3.65 -2.26) @@ -11946,7 +11946,7 @@ (property ki_fp_filters "R_*") (path "/c02d7fbe-5053-4c1d-80c7-9b6cd4098369") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr smd) (fp_line (start -0.227064 0.735) @@ -12716,7 +12716,7 @@ (property ki_fp_filters "*Fuse*") (path "/bacd5a90-a717-4cf8-8865-58ab1d127792") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr through_hole) (fp_line (start -8.636 4.572) @@ -13143,7 +13143,7 @@ (property ki_fp_filters "Connector*:*_2x??_*") (path "/db791c8f-58d8-4641-b0d1-270bc623f7c7") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr through_hole) (fp_line (start -10.12 2.54) @@ -14088,7 +14088,7 @@ (property ki_fp_filters "C_*") (path "/ec858325-386e-4cb0-a385-856da277a7fb") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr smd) (fp_line (start -0.711252 -0.91) @@ -14488,7 +14488,7 @@ (property ki_fp_filters "LED* LED_SMD:* LED_THT:*") (path "/1140628f-bf74-4393-8d3d-e2b75985af35") (sheetname "/") - (sheetfile "main.kicad_sch") + (sheetfile "PowerBoard.kicad_sch") (attr smd) (fp_line (start 1 -0.96) diff --git a/main.kicad_pro b/PowerBoard.kicad_pro similarity index 99% rename from main.kicad_pro rename to PowerBoard.kicad_pro index 56b22ee..6c37ddc 100644 --- a/main.kicad_pro +++ b/PowerBoard.kicad_pro @@ -491,7 +491,7 @@ "pinned_symbol_libs": [] }, "meta": { - "filename": "main.kicad_pro", + "filename": "PowerBoard.kicad_pro", "version": 3 }, "net_settings": { diff --git a/main.kicad_sch b/PowerBoard.kicad_sch similarity index 99% rename from main.kicad_sch rename to PowerBoard.kicad_sch index 661ce95..cea4970 100644 --- a/main.kicad_sch +++ b/PowerBoard.kicad_sch @@ -5745,7 +5745,7 @@ ) ) (instances - (project "main" + (project "PowerBoard" (path "/f29935ff-76ad-48dd-a9d8-f60fd99054e1" (page "4") ) @@ -5857,7 +5857,7 @@ ) ) (instances - (project "main" + (project "PowerBoard" (path "/f29935ff-76ad-48dd-a9d8-f60fd99054e1" (page "3") ) @@ -5919,7 +5919,7 @@ ) ) (instances - (project "main" + (project "PowerBoard" (path "/f29935ff-76ad-48dd-a9d8-f60fd99054e1" (page "2") ) diff --git a/doc/Icon.png b/doc/Icon.png deleted file mode 100644 index f0d52f2..0000000 Binary files a/doc/Icon.png and /dev/null differ diff --git a/doc/_config.yml b/doc/_config.yml deleted file mode 100644 index 56c5d99..0000000 --- a/doc/_config.yml +++ /dev/null @@ -1,16 +0,0 @@ -title: OE5XRX -description: Amateurfunkclub für Remote Stationen - -theme: just-the-docs -favicon_ico: /favicon.ico -logo: "/Icon.png" - -mermaid: - version: "11.3.0" - -defaults: - - - scope: - path: "" - values: - layout: "default" diff --git a/doc/favicon.ico b/doc/favicon.ico deleted file mode 100644 index ba65c61..0000000 Binary files a/doc/favicon.ico and /dev/null differ diff --git a/doc/index.md b/doc/index.md index 55bf1ab..cee72dc 100644 --- a/doc/index.md +++ b/doc/index.md @@ -9,8 +9,8 @@ parent: Hardware - - + +
TopBottom
topbottomtopbottom
@@ -32,9 +32,9 @@ Die +5V Versorgungsspannung wird von den +12V über einen Buck-Converter erzeugt ## Daten -- [Schaltplan](main-schematic.pdf) -- [BOM](main-bom.html) -- [iBOM](main-ibom.html) -- [JLCPCB fabrication & stencil](JLCPCB/main-_JLCPCB_compress.zip) -- [JLCPCB Bom](JLCPCB/main_bom_jlc.csv) -- [JLCPCB Pick&Place](JLCPCB/main_cpl_jlc.csv) +- [Schaltplan]({{ site.data.project.name }}-schematic.pdf) +- [BOM]({{ site.data.project.name }}-bom.html) +- [iBOM]({{ site.data.project.name }}-ibom.html) +- [JLCPCB fabrication & stencil](JLCPCB/{{ site.data.project.name }}-_JLCPCB_compress.zip) +- [JLCPCB Bom](JLCPCB/{{ site.data.project.name }}_bom_jlc.csv) +- [JLCPCB Pick&Place](JLCPCB/{{ site.data.project.name }}_cpl_jlc.csv) diff --git a/production.kibot.yaml b/production.kibot.yaml deleted file mode 100644 index 52e6eaf..0000000 --- a/production.kibot.yaml +++ /dev/null @@ -1,94 +0,0 @@ -kibot: - version: 1 - -globals: - resources_dir: Fabrication - field_lcsc_part: LCSC - -import: - - file: JLCPCB_stencil - -outputs: - - name: ibom - comment: 'Interactive Bill of Materials' - type: ibom - - - name: bom - comment: 'Bill of Materials' - type: bom - options: - csv: - hide_pcb_info: true - hide_stats_info: true - format: CSV - - - name: html_bom - comment: 'HTML BOM' - type: bom - options: - html: - title: 'Bill of Materials' - lcsc_link: 'LCSC' - mouser_link: 'MOUSER' - logo: 'doc/Icon.png' - - - name: SchematicPDF - comment: "Print schematic PDF" - type: pdf_sch_print - options: - color_theme: dracula - background_color: true - - - name: step_file - comment: 'STEP file generation' - type: step - - - name: KiCad_3D_top - comment: "render 3D top" - type: render_3d - options: - view: 'top' - orthographic: true - ray_tracing: true - auto_crop: true - enable_crop_workaround: true - transparent_background: true - - - name: KiCad_3D_bottom - comment: "render 3D bottom" - type: render_3d - options: - view: 'bottom' - orthographic: true - ray_tracing: true - auto_crop: true - enable_crop_workaround: true - transparent_background: true - - - name: KiCad_3D_top_with - comment: "render 3D top with" - type: render_3d - options: - output: '%f-%i%I%v-with.%x' - view: 'top' - orthographic: true - ray_tracing: true - auto_crop: true - enable_crop_workaround: true - transparent_background: true - show_components: 'all' - zoom: -2 - move_y: -1 - - - name: KiCad_3D_top_without - comment: "render 3D top without" - type: render_3d - options: - output: '%f-%i%I%v-without.%x' - view: 'top' - orthographic: true - ray_tracing: true - auto_crop: true - enable_crop_workaround: true - transparent_background: true - show_components: 'none' diff --git a/scripts/bom-export.py b/scripts/bom-export.py deleted file mode 100644 index 0edc34d..0000000 --- a/scripts/bom-export.py +++ /dev/null @@ -1,118 +0,0 @@ -#!/bin/env python3 - -import argparse -import csv -from dataclasses import dataclass, field -from inventree import company -from inventree.api import InvenTreeAPI -from inventree.part import Part, PartCategory, BomItem - -parser = argparse.ArgumentParser(prog="KiCad Bom export to InvenTree") -parser.add_argument("--csv_file", required=True) -parser.add_argument("--name", required=True) -parser.add_argument("--version", required=True) -parser.add_argument("--pcb_image", required=True) -parser.add_argument("--assembly_image", required=True) -args = parser.parse_args() - - -# must define connection settings in environment variables! -# INVENTREE_API_HOST -# INVENTREE_API_USERNAME -# INVENTREE_API_PASSWORD -# OR -# INVENTREE_API_TOKEN -api = InvenTreeAPI() - - -@dataclass(slots=True) -class BuildPart: - reference: str - qty: int - lcsc: list[str] = field(default_factory=list) - mouser: list[str] = field(default_factory=list) - inventree_part: list[Part] = field(default_factory=list) - - def compare_and_fetch(self, supplier_part: company.SupplierPart) -> bool: - if supplier_part.SKU in self.lcsc or supplier_part.SKU in self.mouser: - self.inventree_part.append(Part(api, pk=supplier_part.part)) - return True - return False - - -parts: list[BuildPart] = [] - -with open(args.csv_file, newline="") as csvfile: - reader = csv.DictReader(csvfile) - for row in reader: - parts.append( - BuildPart( - row["References"], - row["Quantity Per PCB"], - row["LCSC"].split(",") if len(row["LCSC"]) > 0 else [], - row["MOUSER"].split(",") if len(row["MOUSER"]) > 0 else [], - ) - ) - -# parts matching -supplier_parts = company.SupplierPart.list(api) - -for part in parts: - for supplier_part in supplier_parts: - if part.compare_and_fetch(supplier_part): - break - -# check all parts if something is missing -for part in parts: - if len(part.lcsc) != 0 or len(part.mouser) != 0: - assert len(part.inventree_part) != 0, f"{part}" - -pcb_cat = PartCategory(api, 54) -pcb_part = Part.create( - api, - { - "category": pcb_cat.pk, - "name": f"{args.name} PCB", - "revision": args.version, - "component": True, - }, -) -response = pcb_part.uploadImage(args.pcb_image) -assert response is not None - -pcb_cat = PartCategory(api, 2) -assembly_part = Part.create( - api, - { - "category": pcb_cat.pk, - "name": f"{args.name} Module", - "revision": args.version, - "component": True, - "assembly": True, - "trackable": True, - }, -) -response = assembly_part.uploadImage(args.assembly_image) -assert response is not None - -bom_item = BomItem.create( - api, - { - "part": assembly_part.pk, - "sub_part": pcb_part.pk, - "reference": "", - "quantity": 1, - }, -) - -for part in parts: - for inventree_part in part.inventree_part: - bom_item = BomItem.create( - api, - { - "part": assembly_part.pk, - "sub_part": inventree_part.pk, - "reference": part.reference, - "quantity": part.qty, - }, - ) diff --git a/scripts/requirements.txt b/scripts/requirements.txt deleted file mode 100644 index 41bda61..0000000 --- a/scripts/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -inventree diff --git a/test.kibot.yaml b/test.kibot.yaml deleted file mode 100644 index 957f454..0000000 --- a/test.kibot.yaml +++ /dev/null @@ -1,12 +0,0 @@ -kibot: - version: 1 - -global: - field_lcsc_part: LCSC - -preflight: - erc: - warnings_as_errors: true - drc: true - update_xml: false - check_zone_fills: true