Skip to content

Commit 45b4b99

Browse files
committed
Merge branch 'main' into 1145-load-spdx-dependencies
2 parents 113fda8 + 1e444a6 commit 45b4b99

131 files changed

Lines changed: 1381 additions & 766 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
**/.*
12
**/.git
23
**/.gitignore
34
**/.github
@@ -9,6 +10,7 @@
910
**/.DS_Store
1011
**/.aof
1112
**/venv
13+
**/.venv
1214
**/env
1315
**/bin
1416
**/build
@@ -18,11 +20,14 @@
1820
**/lib
1921
**/var
2022
**/*.egg-info
23+
**/.*cache
2124
.dockerignore
2225
.readthedocs.yaml
2326
docker.env
2427
.env
2528
CHANGELOG.rst
29+
MANIFEST.in
30+
Makefile
2631
Dockerfile
2732
README.rst
2833
docker-compose.yml
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build aboutcode.pipeline Python distributions and publish on PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "aboutcode.pipeline/*"
8+
9+
jobs:
10+
build-and-publish:
11+
name: Build and publish library to PyPI
12+
runs-on: ubuntu-22.04
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.12
21+
22+
- name: Install flot
23+
run: python -m pip install flot --user
24+
25+
- name: Build a binary wheel and a source tarball
26+
run: python -m flot --pyproject pipeline-pyproject.toml --sdist --wheel --output-dir dist/
27+
28+
- name: Publish to PyPI
29+
if: startsWith(github.ref, 'refs/tags')
30+
uses: pypa/gh-action-pypi-publish@release/v1
31+
with:
32+
password: ${{ secrets.PYPI_API_TOKEN_ABOUTCODE_PIPELINE }}
33+
34+
- name: Upload built archives
35+
uses: actions/upload-artifact@v4
36+
with:
37+
name: pypi_archives
38+
path: dist/*

CHANGELOG.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,31 @@ v34.7.2 (unreleased)
2626
- Add a new Dependency view that renders the project dependencies as a tree.
2727
https://github.com/nexB/scancode.io/issues/1145
2828

29+
- The ``purldb-scan-worker`` command has been updated to send project results
30+
back using the Project webhook subscriptions. This allows us to not have the
31+
main task loop to monitor a single project run for completion in order to
32+
return data, and allows us to have multiple scan projects active at once while
33+
we use ``purldb-scan-worker``. A new option ``--max-concurrent-projects`` has
34+
been added to set the number of purldb packages that can be requested and
35+
processed at once.
36+
https://github.com/nexB/scancode.io/issues/1287
37+
38+
- Add notes field on the DiscoveredPackage model.
39+
https://github.com/nexB/scancode.io/issues/1342
40+
41+
- Fix an issue with conflicting groups checkbox id in the Add pipeline modal.
42+
https://github.com/nexB/scancode.io/issues/1353
43+
44+
- Move the BasePipeline class to a new `aboutcode.pipeline` module.
45+
https://github.com/nexB/scancode.io/issues/1351
46+
47+
- Update link references of ownership from nexB to aboutcode-org
48+
https://github.com/aboutcode-org/scancode.io/issues/1350
49+
50+
- Add a new ``check-compliance`` management command to check for compliance issues in
51+
a project.
52+
https://github.com/nexB/scancode.io/issues/1182
53+
2954
v34.7.1 (2024-07-15)
3055
--------------------
3156

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: Apache-2.0
22
#
3-
# http://nexb.com and https://github.com/nexB/scancode.io
3+
# http://nexb.com and https://github.com/aboutcode-org/scancode.io
44
# The ScanCode.io software is licensed under the Apache License version 2.0.
55
# Data generated with ScanCode.io is provided as-is without warranties.
66
# ScanCode is a trademark of nexB Inc.
@@ -18,11 +18,11 @@
1818
# for any legal advice.
1919
#
2020
# ScanCode.io is a free software code scanning tool from nexB Inc. and others.
21-
# Visit https://github.com/nexB/scancode.io for support and download.
21+
# Visit https://github.com/aboutcode-org/scancode.io for support and download.
2222

23-
FROM --platform=linux/amd64 python:3.12-slim
23+
FROM python:3.12-slim
2424

25-
LABEL org.opencontainers.image.source="https://github.com/nexB/scancode.io"
25+
LABEL org.opencontainers.image.source="https://github.com/aboutcode-org/scancode.io"
2626
LABEL org.opencontainers.image.description="ScanCode.io"
2727
LABEL org.opencontainers.image.licenses="Apache-2.0"
2828

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: Apache-2.0
22
#
3-
# http://nexb.com and https://github.com/nexB/scancode.io
3+
# http://nexb.com and https://github.com/aboutcode-org/scancode.io
44
# The ScanCode.io software is licensed under the Apache License version 2.0.
55
# Data generated with ScanCode.io is provided as-is without warranties.
66
# ScanCode is a trademark of nexB Inc.
@@ -18,7 +18,7 @@
1818
# for any legal advice.
1919
#
2020
# ScanCode.io is a free software code scanning tool from nexB Inc. and others.
21-
# Visit https://github.com/nexB/scancode.io for support and download.
21+
# Visit https://github.com/aboutcode-org/scancode.io for support and download.
2222

2323
# Python version can be specified with `$ PYTHON_EXE=python3.x make conf`
2424
PYTHON_EXE?=python3
@@ -86,7 +86,7 @@ check-deploy:
8686

8787
clean:
8888
@echo "-> Clean the Python env"
89-
rm -rf .venv/ .*_cache/ *.egg-info/ build/ dist/
89+
rm -rf .venv/ .*cache/ *.egg-info/ build/ dist/
9090
find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete
9191

9292
migrate:
@@ -125,6 +125,10 @@ test:
125125
@echo "-> Run the test suite"
126126
${MANAGE} test --noinput
127127

128+
fasttest:
129+
@echo "-> Run the test suite without the PipelinesIntegrationTest"
130+
${MANAGE} test --noinput --exclude-tag slow
131+
128132
worker:
129133
${MANAGE} rqworker --worker-class scancodeio.worker.ScanCodeIOWorker --queue-class scancodeio.worker.ScanCodeIOQueue --verbosity 2
130134

@@ -152,4 +156,4 @@ offline-package: docker-images
152156
@mkdir -p dist/
153157
@tar -cf dist/scancodeio-offline-package-`git describe --tags`.tar build/
154158

155-
.PHONY: virtualenv conf dev envfile install doc8 check valid check-deploy clean migrate upgrade postgresdb sqlitedb backupdb run test docs bump docker-images offline-package
159+
.PHONY: virtualenv conf dev envfile install doc8 check valid check-deploy clean migrate upgrade postgresdb sqlitedb backupdb run test fasttest docs bump docker-images offline-package

NOTICE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SPDX-License-Identifier: Apache-2.0
22

3-
http://nexb.com and https://github.com/nexB/scancode.io
3+
http://nexb.com and https://github.com/aboutcode-org/scancode.io
44
The ScanCode.io software is licensed under the Apache License version 2.0.
55
Data generated with ScanCode.io is provided as-is without warranties.
66
ScanCode is a trademark of nexB Inc.
@@ -18,4 +18,4 @@ ScanCode.io should be considered or used as legal advice. Consult an Attorney
1818
for any legal advice.
1919

2020
ScanCode.io is a free software code scanning tool from nexB Inc. and others.
21-
Visit https://github.com/nexB/scancode.io for support and download.
21+
Visit https://github.com/aboutcode-org/scancode.io for support and download.

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ The ScanCode.io documentation is available here: https://scancodeio.readthedocs.
1414
If you have questions that are not covered by our
1515
`Documentation <https://scancodeio.readthedocs.io/en/latest/faq.html>`_ or
1616
`FAQs <https://scancodeio.readthedocs.io/en/latest/faq.html>`_,
17-
please ask them in `Discussions <https://github.com/nexB/scancode.io/discussions>`_.
17+
please ask them in `Discussions <https://github.com/aboutcode-org/scancode.io/discussions>`_.
1818

1919
If you want to contribute to ScanCode.io, start with our
2020
`Contributing <https://scancodeio.readthedocs.io/en/latest/contributing.html>`_ page.
2121

2222
A new GitHub action is now available at
23-
`scancode-action <https://github.com/nexB/scancode-action>`_
23+
`scancode-action <https://github.com/aboutcode-org/scancode-action>`_
2424
to run ScanCode.io pipelines from your GitHub Workflows.
2525
Visit https://scancodeio.readthedocs.io/en/latest/automation.html to learn more
2626
about automation.
@@ -56,8 +56,8 @@ ScanCode.io should be considered or used as legal advice. Consult an Attorney
5656
for any legal advice.
5757

5858

59-
.. |ci-tests| image:: https://github.com/nexB/scancode.io/actions/workflows/ci.yml/badge.svg?branch=main
60-
:target: https://github.com/nexB/scancode.io/actions/workflows/ci.yml
59+
.. |ci-tests| image:: https://github.com/aboutcode-org/scancode.io/actions/workflows/ci.yml/badge.svg?branch=main
60+
:target: https://github.com/aboutcode-org/scancode.io/actions/workflows/ci.yml
6161
:alt: CI Tests Status
6262

6363
.. |docs-rtd| image:: https://readthedocs.org/projects/scancodeio/badge/?version=latest

aboutcode/pipeline/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Changelog
2+
3+
## Release 0.1.0 (August 9, 2023)
4+
5+
* Initial release of the `aboutcode.pipeline` library. [Issue #1351](https://github.com/nexB/scancode.io/issues/1351)

aboutcode/pipeline/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# `aboutcode.pipeline`
2+
3+
Define and run pipelines.
4+
5+
### Install
6+
7+
```bash
8+
pip install aboutcode.pipeline
9+
```
10+
11+
### Define and execute a pipeline
12+
13+
```python
14+
from aboutcode.pipeline import BasePipeline
15+
16+
class PrintMessages(BasePipeline):
17+
@classmethod
18+
def steps(cls):
19+
return (cls.step1,)
20+
21+
def step1(self):
22+
print("Message from step1")
23+
24+
PrintMessages().execute()
25+
```
26+
27+
### Groups and steps selection
28+
29+
```python
30+
from aboutcode.pipeline import BasePipeline
31+
from aboutcode.pipeline import group
32+
33+
class PrintMessages(BasePipeline):
34+
@classmethod
35+
def steps(cls):
36+
return (cls.step1, cls.step2)
37+
38+
def step1(self):
39+
print("Message from step1")
40+
41+
@group("foo")
42+
def step2(self):
43+
print("Message from step2")
44+
45+
46+
# Execute pipeline with group selection
47+
run = PrintMessages(selected_groups=["foo"])
48+
exitcode, error = run.execute()
49+
50+
# Execute pipeline with steps selection
51+
run = PrintMessages(selected_steps=["step1"])
52+
exitcode, error = run.execute()
53+
```

aboutcode/pipeline/RELEASE.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Release instructions for `aboutcode.pipeline`
2+
3+
### Automated release workflow
4+
5+
- Create a new `aboutcode.pipeline-release-x.x.x` branch
6+
- Update the version in:
7+
- `pipeline-pyproject.toml`
8+
- `aboutcode/pipeline/__init__.py`
9+
- Commit and push this branch
10+
- Create a PR and merge once approved
11+
- Tag and push to trigger the `pypi-release-aboutcode-pipeline.yml` workflow that
12+
takes care of building the distribution archives and upload those to pypi::
13+
```
14+
VERSION=x.x.x # <- Set the new version here
15+
TAG=aboutcode.pipeline/$VERSION
16+
git tag -a $TAG -m ""
17+
git push origin $TAG
18+
```
19+
20+
### Manual build
21+
22+
```
23+
cd scancode.io
24+
source .venv/bin/activate
25+
pip install flot
26+
flot --pyproject pipeline-pyproject.toml --sdist --wheel --output-dir dist/
27+
```
28+
29+
The distribution archives will be available in the local `dist/` directory.

0 commit comments

Comments
 (0)