Toolbox
This repository contains helper functions for:
- Interacting with a run in
prepare_assignment- Retrieving input
- Setting output
- Finding files based on globs
Interacting with prepare_assignment
To help a prepare_assignment action interact with a run, a couple of helper functions are defined in core.py.
To retrieve input use the get_input function, this has the following parameters:
key: str: The key of the input to retrieve, this is the same as the key as defined in theaction.ymlrequired: bool= False: if true and the key is not present it will raise an exceptiontrim_whitespace: bool: if true it will automatically trim whitespace from the retrieved value
To set output that can be used by other actions in the run, use the set_output function. This function has the following parameters:
name: str: the key that other actions can use to retrieve the valuevalue: Any: the value
Furthermore it defines helper methods for logging:
set_failed: log exception/message with levelERRORand exit the processset_error: log exception/message with levelERRORset_warning: log message with levelWARNINGinfo: log message with levelINFOdebug: log message with levelDEBUG
Finding files
A common task for actions is to find files based on a glob. To make this repetitive task easier a helper function is defined in file.py. The function get_matching_files returns a list of paths (as strings) that match the files, given the parameters. The following parameters are available:
included: Union[str, List[str]]: Glob(s) that should be matchedexcluded: Union[str, List[str], None]: Glob(s) that should be excluded from being matched. I.e. if a path matches theincludedglob, it should not be processed if it also matches theexcludedglob. Default:Nonerelative_to: : Union[str, None]: Set relative path from where the globs should be matched. IfNonethe current working directory is used. Default:Noneallow_outside_working_dir: bool: Allowrelative_toto be outside the current working directory. Allow the matched glob(s) to be outside therelative_todirectory. Default:Falserecursive: bool: If true the glob should recurse directories. Default:Trueinclude_hidden: bool: If true wildcards (e.g.*and**) also match hidden files and directories (starting with a.), for bothincludedandexcluded. Default:False
Releases
Releases are automated with semantic-release. Pull requests are squash merged, so the PR title becomes the commit on main and must follow Conventional Commits (checked on every PR):
| PR title | Release |
|---|---|
fix: ..., perf: ... |
patch (1.2.3 → 1.2.4) |
feat: ... |
minor (1.2.3 → 1.3.0) |
! after the type (e.g. feat!: ..., refactor!: ...) or a BREAKING CHANGE: footer |
major (1.2.3 → 2.0.0) |
docs:, chore:, ci:, build:, refactor:, test:, style:, revert: |
no release |
On every merge to main the next version is determined, tagged (vX.Y.Z), a GitHub release is created and the package is published to PyPI. The version is set during the build and is not committed, so the version in pyproject.toml is not the released version.
Metadata
Release files for prepare-toolbox 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| prepare_toolbox-1.0.0.tar.gz | 54.5 kB | Without provenance | Details for prepare_toolbox-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prepare_toolbox-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for prepare_toolbox-1.0.0-py3-none-any.whl |
Total release size: 61.5 kB
Release files / prepare_toolbox-1.0.0.tar.gz
| Download URL | prepare_toolbox-1.0.0.tar.gz |
|---|---|
| Size | 54.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b434e465292edf013622e91826ec335c9e66aad3af0c0f5c53898dd4a410aa7
|
|
BLAKE2b-256 checksum How to use checksums |
9ee81a534455918c636ad7617edff873846abd0bec8c0b7d49f19b08e2ad4ea8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / prepare_toolbox-1.0.0-py3-none-any.whl
| Download URL | prepare_toolbox-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0efb75850e7f4261ff4d2b2a6389641372e4a3911d78d7750711b2a759118a29
|
|
BLAKE2b-256 checksum How to use checksums |
53703da7c9ed8dd1f8349cb06dfb57a813f6b975e7c4a46ad44dfde4d71bc41b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for prepare-toolbox 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.