| Name | aware-release JSON |
| Version |
0.1.2
JSON |
| download |
| home_page | None |
| Summary | Shared release tooling for aware-cli bundles and companion automation. |
| upload_time | 2025-10-29 21:15:31 |
| maintainer | None |
| docs_url | None |
| author | AWARE Team |
| requires_python | >=3.12 |
| license | MIT License
Copyright (c) 2025 AWARE
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. |
| keywords |
automation
aware
bundle
release
|
| VCS |
 |
| bugtrack_url |
|
| requirements |
No requirements were recorded.
|
| Travis-CI |
No Travis.
|
| coveralls test coverage |
No coveralls.
|
# aware-release
`aware-release` packages the release automation used by aware-cli, Studio, and pipeline tooling. It assembles bundle artefacts, generates manifests, and publishes archives through a consistent, schema-validated interface.
## Install
```bash
pip install aware-release
```
The CLI executable `aware-release` is added to your PATH. The library targets Python 3.12+.
## Features
- Build aware-cli bundle directories and archives (zip/tar) without baking a virtualenv.
- Generate manifest metadata backed by Pydantic models for deterministic validation.
- Provide publishing adapters (command, GitHub Releases, S3) that emit structured receipts.
- Supply helper workflows for rule versioning so CLI bundles ship with current documentation.
- Share a reusable secret registry with resolver diagnostics for environment variables and `.env` files.
## Quick Start
Run the bundled CLI help to explore subcommands:
```bash
aware-release --help
aware-release bundle --help
```
Bundle an aware-cli wheel:
```bash
aware-release bundle \
--channel dev \
--version 0.1.0 \
--platform linux-x86_64 \
--wheel dist/aware_cli-0.1.0-py3-none-any.whl
```
Generate publish metadata (dry-run by default):
```bash
aware-release publish \
--manifest releases/dev/0.1.0/linux-x86_64/manifest.json \
--archive releases/dev/0.1.0/linux-x86_64/bundle.tar.gz \
--adapter command \
--adapter-command "echo upload {archive}"
```
## Secret diagnostics
`aware-release` powers the shared secret registry used by aware-cli and the release pipeline. Tokens may come from process environment variables, `.env` files, or custom resolvers registered via `aware_release.secrets.register_resolver()`. Inspect the current state with:
```bash
uv run --project tools/cli aware-cli release secrets-list
```
Each entry reports whether the secret is present, the resolver (`env`, `dotenv@...`, etc.), and any resolver metadata (e.g., `.env` paths or parse warnings). When a workflow token is missing, the error message now lists the resolvers that were checked and points back to `secrets-list` for remediation. Programmatic callers can use `aware_release.resolve_secret_info("GH_TOKEN_RELEASE")` to obtain the same diagnostics.
## Python Usage
```python
from pathlib import Path
from aware_release.bundle.builder import BundleBuilder, BundleConfig
builder = BundleBuilder()
config = BundleConfig(
channel="dev",
version="0.1.0",
platform="linux-x86_64",
source_wheels=[Path("dist/aware_cli-0.1.0-py3-none-any.whl")],
output_dir=Path("releases"),
)
bundle_path = builder.build(config)
print(bundle_path)
```
## Release automation
The release pipeline bundles build/test/publish flows so agents can ship packages with a single command. Example (dry run):
```bash
uv run --project tools/release-pipeline release-pipeline pipeline run \
--pipeline tests-release \
--input bump=patch \
--input dry-run=true \
--input skip-workflow=true
```
Remove `dry-run`/`skip-workflow` once the build succeeds to trigger the GitHub `publish-aware-test-runner` workflow and PyPI publish.
## Rule Version Automation
```bash
aware-release rules render \
--rules-root docs/rules \
--manifest build/rule-manifest.json
```
This wrapper regenerates rule versions (mirroring `aware-cli docs render --target rules --write-version`) and emits a manifest for downstream packaging.
## Publishing
To publish to PyPI using the shared workflow:
```bash
# Dry run via release-pipeline helper
uv run --project tools/release-pipeline release-pipeline cli aware-release publish-pypi --dry-run
# Then trigger GitHub Action (Publish aware-release) with dry_run=false
```
The workflow uses trusted publishers (OIDC), so no persistent PyPI token is required.
## CI / Tests
Run the test suite with:
```bash
uv run --project tools/release pytest
```
## Changelog
See [CHANGELOG.md](CHANGELOG.md) for release notes.
## License
MIT © 2025 AWARE
```
All commands emit structured JSON for automation pipelines.
## Rule version automation
aware-cli owns rule rendering, so every release pipeline should regenerate the versioned rule set before building bundles. The new `--write-version` workflow turns templates into versioned/current copies and emits a manifest for downstream packaging.
Minimal example (run inside the aware repository):
```bash
export AWARE_RULES_ROOT=${AWARE_RULES_ROOT:-docs/rules}
CLI_VERSION=$(uv run --project tools/cli python -c "import aware_cli; print(aware_cli.__version__)")
# Iterate over the rule ids we ship (list_rules() may be used for automation)
for rule_id in 02-task-01-lifecycle 02-task-03-change-tracking 04-agent-01-memory-hierarchy; do
uv run --project tools/cli aware-cli docs render \
--target rules \
--rule "$rule_id" \
--write-version \
--cli-version "$CLI_VERSION" \
--rules-root "$AWARE_RULES_ROOT" \
--update-current copy \
--json-output build/rule-manifest.json
done
```
The above command:
- Loads each template from `$AWARE_RULES_ROOT/templates/<rule>.md` and renders fresh fragments.
- Writes versioned copies under `$AWARE_RULES_ROOT/versions/<cli-version>/` with frontmatter containing `aware_cli_version`, `generated_at`, and `source_template`.
- Copies the version into `$AWARE_RULES_ROOT/current/` (use `--update-current symlink` if the platform supports symlinks).
- Appends a JSON manifest entry to `build/rule-manifest.json`; the release scripts can read this manifest to stage artefacts or publish alongside the bundle.
For more dynamic pipelines, you can gather rule identifiers programmatically:
```bash
uv run --project tools/cli python - <<'PY'
from aware_cli.objects.rule.meta import list_rules
for rule in list_rules():
print(rule.id)
PY
```
Always regenerate rules before invoking `aware-release bundle` so the archive includes up-to-date `rules/versions/<cli-version>` and `rules/current`. External consumers (e.g., aware-sdk) can call the same CLI command by pointing `--rules-root` at their unpacked package data.
To trigger the regeneration workflow from automation, use the release-pipeline registry slug:
```bash
uv run --project tools/release-pipeline release-pipeline workflow trigger \
--workflow cli-rules-version \
--dry-run
You can also invoke rule regeneration directly via the pipeline helper:
```bash
uv run --project tools/release-pipeline release-pipeline rules render \
--rules-root docs/rules \
--manifest build/rule-manifest.json
```
```
The corresponding GitHub Actions workflow lives at `.github/workflows/cli-rules-version.yml` and uploads the refreshed manifest and rule directories as artefacts.
## Contributing
- Keep code/tests/docs aligned per `docs/BEST_PRACTICES.md`.
- Update `CHANGELOG.md` whenever modifying public APIs.
- Run `uv run pytest` before submitting changes.
Raw data
{
"_id": null,
"home_page": null,
"name": "aware-release",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "automation, aware, bundle, release",
"author": "AWARE Team",
"author_email": null,
"download_url": null,
"platform": null,
"description": "# aware-release\n\n`aware-release` packages the release automation used by aware-cli, Studio, and pipeline tooling. It assembles bundle artefacts, generates manifests, and publishes archives through a consistent, schema-validated interface.\n\n## Install\n\n```bash\npip install aware-release\n```\n\nThe CLI executable `aware-release` is added to your PATH. The library targets Python 3.12+.\n\n## Features\n\n- Build aware-cli bundle directories and archives (zip/tar) without baking a virtualenv.\n- Generate manifest metadata backed by Pydantic models for deterministic validation.\n- Provide publishing adapters (command, GitHub Releases, S3) that emit structured receipts.\n- Supply helper workflows for rule versioning so CLI bundles ship with current documentation.\n- Share a reusable secret registry with resolver diagnostics for environment variables and `.env` files.\n\n## Quick Start\n\nRun the bundled CLI help to explore subcommands:\n\n```bash\naware-release --help\naware-release bundle --help\n```\n\nBundle an aware-cli wheel:\n\n```bash\naware-release bundle \\\n --channel dev \\\n --version 0.1.0 \\\n --platform linux-x86_64 \\\n --wheel dist/aware_cli-0.1.0-py3-none-any.whl\n```\n\nGenerate publish metadata (dry-run by default):\n\n```bash\naware-release publish \\\n --manifest releases/dev/0.1.0/linux-x86_64/manifest.json \\\n --archive releases/dev/0.1.0/linux-x86_64/bundle.tar.gz \\\n --adapter command \\\n --adapter-command \"echo upload {archive}\"\n```\n\n## Secret diagnostics\n\n`aware-release` powers the shared secret registry used by aware-cli and the release pipeline. Tokens may come from process environment variables, `.env` files, or custom resolvers registered via `aware_release.secrets.register_resolver()`. Inspect the current state with:\n\n```bash\nuv run --project tools/cli aware-cli release secrets-list\n```\n\nEach entry reports whether the secret is present, the resolver (`env`, `dotenv@...`, etc.), and any resolver metadata (e.g., `.env` paths or parse warnings). When a workflow token is missing, the error message now lists the resolvers that were checked and points back to `secrets-list` for remediation. Programmatic callers can use `aware_release.resolve_secret_info(\"GH_TOKEN_RELEASE\")` to obtain the same diagnostics.\n\n## Python Usage\n\n```python\nfrom pathlib import Path\n\nfrom aware_release.bundle.builder import BundleBuilder, BundleConfig\n\nbuilder = BundleBuilder()\nconfig = BundleConfig(\n channel=\"dev\",\n version=\"0.1.0\",\n platform=\"linux-x86_64\",\n source_wheels=[Path(\"dist/aware_cli-0.1.0-py3-none-any.whl\")],\n output_dir=Path(\"releases\"),\n)\nbundle_path = builder.build(config)\nprint(bundle_path)\n```\n\n## Release automation\n\nThe release pipeline bundles build/test/publish flows so agents can ship packages with a single command. Example (dry run):\n\n```bash\nuv run --project tools/release-pipeline release-pipeline pipeline run \\\n --pipeline tests-release \\\n --input bump=patch \\\n --input dry-run=true \\\n --input skip-workflow=true\n```\n\nRemove `dry-run`/`skip-workflow` once the build succeeds to trigger the GitHub `publish-aware-test-runner` workflow and PyPI publish.\n\n## Rule Version Automation\n\n```bash\naware-release rules render \\\n --rules-root docs/rules \\\n --manifest build/rule-manifest.json\n```\n\nThis wrapper regenerates rule versions (mirroring `aware-cli docs render --target rules --write-version`) and emits a manifest for downstream packaging.\n\n\n## Publishing\n\nTo publish to PyPI using the shared workflow:\n\n```bash\n# Dry run via release-pipeline helper\nuv run --project tools/release-pipeline release-pipeline cli aware-release publish-pypi --dry-run\n\n# Then trigger GitHub Action (Publish aware-release) with dry_run=false\n```\n\nThe workflow uses trusted publishers (OIDC), so no persistent PyPI token is required.\n## CI / Tests\n\nRun the test suite with:\n\n```bash\nuv run --project tools/release pytest\n```\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for release notes.\n\n## License\n\nMIT \u00a9 2025 AWARE\n```\n\nAll commands emit structured JSON for automation pipelines.\n\n## Rule version automation\n\naware-cli owns rule rendering, so every release pipeline should regenerate the versioned rule set before building bundles. The new `--write-version` workflow turns templates into versioned/current copies and emits a manifest for downstream packaging.\n\nMinimal example (run inside the aware repository):\n\n```bash\nexport AWARE_RULES_ROOT=${AWARE_RULES_ROOT:-docs/rules}\nCLI_VERSION=$(uv run --project tools/cli python -c \"import aware_cli; print(aware_cli.__version__)\")\n\n# Iterate over the rule ids we ship (list_rules() may be used for automation)\nfor rule_id in 02-task-01-lifecycle 02-task-03-change-tracking 04-agent-01-memory-hierarchy; do\n uv run --project tools/cli aware-cli docs render \\\n --target rules \\\n --rule \"$rule_id\" \\\n --write-version \\\n --cli-version \"$CLI_VERSION\" \\\n --rules-root \"$AWARE_RULES_ROOT\" \\\n --update-current copy \\\n --json-output build/rule-manifest.json\ndone\n```\n\nThe above command:\n\n- Loads each template from `$AWARE_RULES_ROOT/templates/<rule>.md` and renders fresh fragments.\n- Writes versioned copies under `$AWARE_RULES_ROOT/versions/<cli-version>/` with frontmatter containing `aware_cli_version`, `generated_at`, and `source_template`.\n- Copies the version into `$AWARE_RULES_ROOT/current/` (use `--update-current symlink` if the platform supports symlinks).\n- Appends a JSON manifest entry to `build/rule-manifest.json`; the release scripts can read this manifest to stage artefacts or publish alongside the bundle.\n\nFor more dynamic pipelines, you can gather rule identifiers programmatically:\n\n```bash\nuv run --project tools/cli python - <<'PY'\nfrom aware_cli.objects.rule.meta import list_rules\nfor rule in list_rules():\n print(rule.id)\nPY\n```\n\nAlways regenerate rules before invoking `aware-release bundle` so the archive includes up-to-date `rules/versions/<cli-version>` and `rules/current`. External consumers (e.g., aware-sdk) can call the same CLI command by pointing `--rules-root` at their unpacked package data.\n\nTo trigger the regeneration workflow from automation, use the release-pipeline registry slug:\n\n```bash\nuv run --project tools/release-pipeline release-pipeline workflow trigger \\\n --workflow cli-rules-version \\\n --dry-run\n\nYou can also invoke rule regeneration directly via the pipeline helper:\n\n```bash\nuv run --project tools/release-pipeline release-pipeline rules render \\\n --rules-root docs/rules \\\n --manifest build/rule-manifest.json\n```\n```\n\nThe corresponding GitHub Actions workflow lives at `.github/workflows/cli-rules-version.yml` and uploads the refreshed manifest and rule directories as artefacts.\n\n## Contributing\n- Keep code/tests/docs aligned per `docs/BEST_PRACTICES.md`.\n- Update `CHANGELOG.md` whenever modifying public APIs.\n- Run `uv run pytest` before submitting changes.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 AWARE\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.",
"summary": "Shared release tooling for aware-cli bundles and companion automation.",
"version": "0.1.2",
"project_urls": {
"Changelog": "https://github.com/aware-network/aware-sdk/tree/main/tools/release/CHANGELOG.md",
"Documentation": "https://github.com/aware-network/aware-sdk/tree/main/tools/release/docs",
"Homepage": "https://github.com/aware-network/aware-sdk",
"Repository": "https://github.com/aware-network/aware-sdk/tree/main/tools/release"
},
"split_keywords": [
"automation",
" aware",
" bundle",
" release"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5d49b959666ebda118d977ca88cbb01c88156693a37dab497579501b27dda118",
"md5": "60f037f8021174f2c548aca6e3efdd18",
"sha256": "47cc267019bd3cef5133447daaff3b264c7c725403bc92ecdf2af98b21587e70"
},
"downloads": -1,
"filename": "aware_release-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "60f037f8021174f2c548aca6e3efdd18",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 28619,
"upload_time": "2025-10-29T21:15:31",
"upload_time_iso_8601": "2025-10-29T21:15:31.920220Z",
"url": "https://files.pythonhosted.org/packages/5d/49/b959666ebda118d977ca88cbb01c88156693a37dab497579501b27dda118/aware_release-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-29 21:15:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "aware-network",
"github_project": "aware-sdk",
"github_not_found": true,
"lcname": "aware-release"
}