Skip to content

Commit

Permalink
Merge pull request #182 from AllSpiceIO/gp/design-reuse
Browse files Browse the repository at this point in the history
[ID-707] First pass of BOM generation including Device Sheets for Altium projects.
  • Loading branch information
polypour authored Oct 16, 2024
2 parents 6138899 + 0dc1037 commit 7589c7d
Show file tree
Hide file tree
Showing 46 changed files with 1,089,007 additions and 825,632 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## v3.6.0

### What's Changed

## What's Changed

- Generate BOMs with Device Sheets and Board Level Annotations on Altium
Projects by @shrik450 and @polypour in
https://github.com/AllSpiceIO/py-allspice/pull/182 and
https://github.com/AllSpiceIO/py-allspice/pull/183/

Adds support for Altium Device Sheets and Board Level Annotations in
`list_components` and `generate_bom`. To use device sheets located in another
repo, pass the `design_reuse_repositories` argument to those functions.

- Update syrupy requirement from ~=4.6 to ~=4.7 by @dependabot in https://github.com/AllSpiceIO/py-allspice/pull/179
- Add method to download an attachment by @shrik450 in https://github.com/AllSpiceIO/py-allspice/pull/181
- Include pin information in components by @shrik450 in https://github.com/AllSpiceIO/py-allspice/pull/180
- Update pdoc requirement from ~=14.5 to ~=14.7 by @dependabot in https://github.com/AllSpiceIO/py-allspice/pull/185

## v3.5.0

### What's Changed
Expand Down
2 changes: 1 addition & 1 deletion allspice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
)
from .exceptions import AlreadyExistsException, NotFoundException

__version__ = "3.5.0"
__version__ = "3.6.0"

__all__ = [
"AllSpice",
Expand Down
8 changes: 6 additions & 2 deletions allspice/utils/bom_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
from dataclasses import dataclass
from enum import Enum
from typing import Iterable, Optional, Union
from typing import Iterable, Mapping, Optional, Union

from ..allspice import AllSpice
from ..apiobject import Ref, Repository
Expand Down Expand Up @@ -94,7 +94,7 @@ class SortOrder(Enum):
"""


ColumnsMapping = dict[str, ColumnConfig | list[str] | str]
ColumnsMapping = Mapping[str, ColumnConfig | list[str] | str]
"""
Configuration for the columns in the BOM. See `ColumnConfig` for a detailed
description of the configuration for each column. The keys in this dictionary
Expand All @@ -116,6 +116,7 @@ def generate_bom(
variant: Optional[str] = None,
ref: Ref = "main",
remove_non_bom_components: bool = True,
design_reuse_repos: list[Repository] = [],
) -> Bom:
"""
Generate a BOM for a project.
Expand Down Expand Up @@ -173,6 +174,7 @@ def generate_bom(
variant,
ref,
combine_multi_part=True,
design_reuse_repos=design_reuse_repos,
)

if remove_non_bom_components:
Expand Down Expand Up @@ -207,6 +209,7 @@ def generate_bom_for_altium(
variant: Optional[str] = None,
ref: Ref = "main",
remove_non_bom_components: bool = True,
design_reuse_repos: list[Repository] = [],
) -> Bom:
"""
Generate a BOM for an Altium project.
Expand Down Expand Up @@ -246,6 +249,7 @@ def generate_bom_for_altium(
variant,
ref,
remove_non_bom_components,
design_reuse_repos=design_reuse_repos,
)


Expand Down
Loading

0 comments on commit 7589c7d

Please sign in to comment.