mirror of
https://staging.allspice.dev/AllSpice-Demos/Actions-demo.git
synced 2025-04-24 17:13:21 +00:00
Merge pull request 'dd/upgrade_bom_gen' (#33) from dd/upgrade_bom_gen into main
Reviewed-on: https://staging.allspice.dev/AllSpice-Demos/Actions-demo/pulls/33
This commit is contained in:
commit
ab03c255f4
.allspice
16
.allspice/columns.yml
Normal file
16
.allspice/columns.yml
Normal file
@ -0,0 +1,16 @@
|
||||
columns:
|
||||
- name: "Manufacturer"
|
||||
part_attributes:
|
||||
- "Manufacturer"
|
||||
- "MANUFACTURER"
|
||||
- name: "Part Number"
|
||||
part_attributes:
|
||||
- "PART"
|
||||
- "MANUFACTURER #"
|
||||
- "_part_id"
|
||||
- name: "Designator"
|
||||
part_attributes: "Designator"
|
||||
- name: "Description"
|
||||
part_attributes:
|
||||
- "PART DESCRIPTION"
|
||||
- "_description"
|
@ -98,7 +98,13 @@ if __name__ == "__main__":
|
||||
for net in nets:
|
||||
writer.write(net + "\n")
|
||||
pins_on_net = netlist_rows[net]
|
||||
pins_on_net.sort()
|
||||
try:
|
||||
# Convert to list if it's not already, and then sort
|
||||
if not isinstance(pins_on_net, list):
|
||||
pins_on_net = list(pins_on_net)
|
||||
pins_on_net.sort()
|
||||
except Exception as e:
|
||||
print(f"Error sorting pins on net {net}: {e}", file=sys.stderr)
|
||||
writer.write(" " + " ".join(pins_on_net) + "\n")
|
||||
|
||||
print("Generated PCB netlist.", file=sys.stderr)
|
||||
print("Generated PCB netlist.", file=sys.stderr)
|
@ -17,14 +17,14 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Generate BOM
|
||||
uses: https://hub.allspice.io/Actions/generate-bom@v0.3
|
||||
uses: https://hub.allspice.io/Actions/generate-bom@v0.4
|
||||
with:
|
||||
# The path to the project file in your repo (.PrjPcb for Altium, .DSN for OrCad).
|
||||
source_path: Archimajor.PrjPcb
|
||||
# [optional] A path to a JSON file mapping columns to the component attributes
|
||||
# they are from. This file must be provided.
|
||||
# [optional] A path to a YAML file mapping columns to the component attributes
|
||||
# This file must be provided.
|
||||
# Default: 'columns.json'
|
||||
columns: .allspice/columns.json
|
||||
columns: .allspice/columns.yml
|
||||
# [optional] The path to the output file that will be generated.
|
||||
# Default: 'bom.csv'
|
||||
output_file_name: bom.csv
|
||||
|
Loading…
Reference in New Issue
Block a user