Py-allspice

Latest version: v3.0.0

Safety actively analyzes 628198 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

3.0.0

There are breaking changes in this release, and you may have to update your
scripts to use this version.

Breaking Changes

The main (and only) breaking change in this release is an overhaul of the BOM
generation utility function
`allspice.utils.bom_generation.generate_bom_for_altium`. The changes are:

1. `generate_bom_for_altium` no longer takes a PcbDoc file as an argument. The
BOM generation logic has been reworked to only use a PrjPcb file as the sole
entrypoint and generate the entire BOM from the schematics.

See https://github.com/AllSpiceIO/py-allspice/pull/83

2. You can now customize the columns of the BOM and how rows are grouped using
the `columns` and `group_by` arguments. This replaces the former
`attributes_mapping` argument.

For example, if you want to have columns "Comment", "Part ID" and
"Manufacturer" in your BOM and group them by the "Part ID", you would pass:

py
generate_bom_for_altium(
...
columns={
"Comment": ["Comment", "Description", "_description"],
"Part ID": "_part_id",
"Manufacturer": ["Manufacturer", "MFN"],
},
group_by=["Part ID"],
)


This also shows the `_description` and `_part_id` attributes which are
populated from the component itself.

See https://github.com/AllSpiceIO/py-allspice/pull/84

3. BOM generation now supports variants, and you can select which variant to
generate a BOM for using the `variant` argument.

See https://github.com/AllSpiceIO/py-allspice/pull/86

Other changes

The example scripts for BOM generation and COGS generation have also been
updated to work with these new changes.

2.5.0

This is a minor version bump. Only new functionality was added, and you may not
need to change your scripts to update to this version.

New Features and Bugfixes

- Broaden newline regex in Alitum BOM generation by shrik450 in https://github.com/AllSpiceIO/py-allspice/pull/62

This fixes a reported issue with some Altium PrjPcb files.

- Add APIs to work with releases and their assets by shrik450 in https://github.com/AllSpiceIO/py-allspice/pull/73

Now you can fetch a repository's releases using:

py
releases = repo.get_releases()

or

release = repo.get_latest_release()

or

release = repo.get_release_by_tag("v1.1")

and even

release = repo.create_release("v1.2")


And add attachments to the releases:

py
release = repo.get_latest_release()
asset = release.create_asset(gerber_file)
asset.download() Download the file from the server!


See the `allspice.Release` class for more details.

- Add API method to get the raw binary content of a single file by shrik450 in https://github.com/AllSpiceIO/py-allspice/pull/77

Example:

py
file_content = repo.get_raw_file("README.md").decode("utf-8")


This is better than using `repo.get_file_contents` in almost all cases.

- Add APIs to work with commit statuses by shrik450 in https://github.com/AllSpiceIO/py-allspice/pull/74

Commit statuses are the status of checks run via actions on commits. You can
use the new `Commit.get_status` and `Repository.create_commit_status` methods
to work with them.

Internals

- CI: Add cron by kdumontnu in https://github.com/AllSpiceIO/py-allspice/pull/52
- added flake.nix by McRaeAlex in https://github.com/AllSpiceIO/py-allspice/pull/57
- doc: Update README to fix broken example link by jtran in https://github.com/AllSpiceIO/py-allspice/pull/59
- Remove autopep8 completely by shrik450 in https://github.com/AllSpiceIO/py-allspice/pull/67

New Contributors

- McRaeAlex made their first contribution in https://github.com/AllSpiceIO/py-allspice/pull/57
- jtran made their first contribution in https://github.com/AllSpiceIO/py-allspice/pull/59

**Full Changelog**: https://github.com/AllSpiceIO/py-allspice/compare/v2.4.0...v2.5.0

2.4.0

What's Changed

- CI Fixes for Gitea 1.20 by kdumontnu in https://github.com/AllSpiceIO/py-allspice/pull/48
- Add generate netlist routine by kdumontnu in https://github.com/AllSpiceIO/py-allspice/pull/50
- Add error message for component link error by kdumontnu in https://github.com/AllSpiceIO/py-allspice/pull/54
- Add delete_file routine by kdumontnu in https://github.com/AllSpiceIO/py-allspice/pull/56

New Contributors

- kdumontnu made their first contribution in https://github.com/AllSpiceIO/py-allspice/pull/48

**Full Changelog**: https://github.com/AllSpiceIO/py-allspice/compare/v2.3.1...v2.4.0

2.3.1

This is a patch release. You should be able to update to this version without
changing your scripts.

- Fix a bug where `Team.get_members` would not return all members if there
were more than 30 members in a team.

2.3.0

This is a minor version bump. Only new functionality was added, and you may not
need to change your scripts to update to this version.

- New feature: BOM Generation. Instead of an example script, BOM generation is
included as a util within the library. See `allspice.utils.generate_bom` for
more details, and there is an example script in
[the examples/generate_bom directory](./examples/generate_bom/) that shows how
to use it, along with how to compute COGS from a generated BOM.
- `Team.add_repo` now takes either a string as a repo name or a `Repository`
object, instead of just a string as before. So you can:

py
team.add_repo(team_org, "repo_name")


Instead of:

py
repo = Repository.request(allspice_client, "team_org", "repo_name")
team.add_repo(team_org, repo)


This is useful if you are making a large number of changes in bulk, as you can
save time by not having to make a request for each repo you want to add to a
team.

2.2.0

This is a minor version bump. Only new functionality was added, and you may not
need to change your scripts to update to this version.

- Add Repository search API. See `Repository.search` for more details.
- Add APIs to get and set topics on a repository. See `Repository.add_topic` and
`Repository.get_topics` for more details. Also added example scripts to bulk
add topics and clone all repos with a certain topic.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.