-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add pyproject.toml for packaging aboutcode.pipeline module #1351 Signed-off-by: tdruez <[email protected]> * Add GitHub action to publish aboutcode.pipeline Signed-off-by: Keshav Priyadarshi <[email protected]> * Enable GitHub release Signed-off-by: Keshav Priyadarshi <[email protected]> * Refine workflow and add documentation and changelog #1351 Signed-off-by: tdruez <[email protected]> --------- Signed-off-by: tdruez <[email protected]> Signed-off-by: Keshav Priyadarshi <[email protected]> Co-authored-by: Keshav Priyadarshi <[email protected]>
- Loading branch information
1 parent
eeff642
commit ceb345e
Showing
6 changed files
with
120 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Build aboutcode.pipeline Python distributions and publish on PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- "aboutcode.pipeline/*" | ||
|
||
jobs: | ||
build-and-publish: | ||
name: Build and publish library to PyPI | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Install flot | ||
run: python -m pip install flot --user | ||
|
||
- name: Build a binary wheel and a source tarball | ||
run: python -m flot --pyproject pipeline-pyproject.toml --sdist --wheel --output-dir dist/ | ||
|
||
- name: Publish to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
|
||
- name: Upload built archives | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pypi_archives | ||
path: dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Changelog | ||
|
||
## Release 0.1.0 (August 9, 2023) | ||
|
||
* Initial release of the `aboutcode.pipeline` library. [Issue #1351](https://github.com/nexB/scancode.io/issues/1351) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Release instructions for `aboutcode.pipeline` | ||
|
||
### Automated release workflow | ||
|
||
- Create a new `aboutcode.pipeline-release-x.x.x` branch | ||
- Update the version in: | ||
- `pipeline-pyproject.toml` | ||
- `aboutcode/pipeline/__init__.py` | ||
- Commit and push this branch | ||
- Create a PR and merge once approved | ||
- Tag and push to trigger the `pypi-release-aboutcode-pipeline.yml` workflow that | ||
takes care of building the distribution archives and upload those to pypi:: | ||
``` | ||
VERSION=x.x.x # <- Set the new version here | ||
TAG=aboutcode.pipeline/$VERSION | ||
git tag -a $TAG -m "" | ||
git push origin $TAG | ||
``` | ||
|
||
### Manual build | ||
|
||
``` | ||
cd scancode.io | ||
source .venv/bin/activate | ||
pip install flot | ||
flot --pyproject pipeline-pyproject.toml --sdist --wheel --output-dir dist/ | ||
``` | ||
|
||
The distribution archives will be available in the local `dist/` directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,8 @@ | |
|
||
module_logger = logging.getLogger(__name__) | ||
|
||
__version__ = "0.1.0" | ||
|
||
|
||
class PipelineDefinition: | ||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[build-system] | ||
requires = ["flot"] | ||
build-backend = "flot.buildapi" | ||
|
||
[project] | ||
name = "aboutcode.pipeline" | ||
version = "0.1.0" | ||
description = "AboutCode Pipeline library. Execute code in steps." | ||
license = { text = "Apache-2.0" } | ||
readme = "aboutcode/pipeline/README.md" | ||
requires-python = ">=3.9" | ||
authors = [ { name = "nexB. Inc. and others", email = "[email protected]" } ] | ||
keywords = [ | ||
"open source", | ||
"pipeline", | ||
"scancode", | ||
] | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Topic :: Software Development", | ||
"Topic :: Utilities", | ||
] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/nexB/scancode.io" | ||
Documentation = "https://scancodeio.readthedocs.io/" | ||
Changelog = "https://github.com/nexB/scancode.io/tree/main/aboutcode/pipeline/CHANGELOG.md" | ||
Repository = "https://github.com/nexB/scancode.io/tree/main/aboutcode/pipeline" | ||
Issues = "https://github.com/nexB/scancode.io/issues" | ||
|
||
[tool.flot] | ||
includes = [ | ||
"aboutcode/pipeline/*", | ||
] | ||
metadata_files = [ | ||
"LICENSE", | ||
"NOTICE", | ||
] |