Skip to content

Commit 5fe5645

Browse files
authored
Merge pull request #128 from fossology/feat/release-3.2.0
feat(3.2.0): upgrade to next minor version
2 parents dacf44e + ba51a85 commit 5fe5645

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

Diff for: .github/workflows/fossologytests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
test-latest:
13-
name: Integration Tests (latest Fossology - 4.4.0)
13+
name: Integration Tests (latest Fossology - 4.4.0-rc2)
1414
runs-on: ubuntu-latest
1515

1616
container:
@@ -20,7 +20,7 @@ jobs:
2020

2121
services:
2222
fossology:
23-
image: fossology/fossology:4.4.0
23+
image: fossology/fossology:4.4.0-rc2
2424
ports:
2525
- 8081:80
2626
volumes:

Diff for: README.rst

+8-4
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ A simple wrapper for the Fossology REST API.
2626

2727
See `the OpenAPI specification <https://raw.githubusercontent.com/fossology/fossology/master/src/www/ui/api/documentation/openapi.yaml>`_ used to implement this library.
2828

29-
Current release is compatible with **Fossology version 4.4.0** - API version 2.0.0 (not all endpoints are supported)
29+
Current release is compatible with **Fossology version 4.4.0-rc2** - API version 2.0.0 (not all endpoints are supported)
3030

3131
`See release notes <https://github.com/fossology/fossology-python/releases>`_ for all details.
3232

3333
If you miss an API Endpoint, please open a new issue or contribute a pull request.
3434

35+
API v1 is supported too, it needs to be specified explicitly.
36+
3537
Documentation
3638
=============
3739

@@ -61,17 +63,19 @@ Using the API
6163
from fossology import fossology_token
6264
from fossology.enum import TokenScope
6365
64-
FOSSOLOGY_SERVER = "https://fossology.example.com/repo" # Note the absense of the trailing slash, otherwise the token generation will fail
66+
FOSSOLOGY_SERVER = "https://fossology.example.com/repo" # Note the absence of the trailing slash, otherwise the token generation will fail
6567
FOSSOLOGY_USER = "fossy"
6668
FOSSOLOGY_PASSWORD = "fossy"
6769
TOKEN_NAME = "fossy_token"
6870
71+
# By default version v2 of the token generation API will be used
6972
token = fossology_token(
7073
FOSSOLOGY_SERVER,
7174
FOSSOLOGY_USER,
7275
FOSSOLOGY_PASSWORD,
7376
TOKEN_NAME,
7477
TokenScope.WRITE
78+
version="v2"
7579
)
7680
7781
- Start using the API:
@@ -80,8 +84,8 @@ Using the API
8084
8185
from fossology import Fossology
8286
83-
# Starting from API version 1.2.3, the `FOSSOLOGY_USER` option is not needed anymore
84-
foss = Fossology(FOSSOLOGY_SERVER, token, FOSSOLOGY_USER)
87+
# By default version v2 of the API will be used
88+
foss = Fossology(FOSSOLOGY_SERVER, token, FOSSOLOGY_USER, version="v2")
8589
print(f"Logged in as user {foss.user.name}")
8690
8791

Diff for: docs-source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
copyright = "2021, Siemens AG"
2323

2424
# The full version, including major/minor/patch tags
25-
release = "3.1.1"
25+
release = "3.2.0"
2626

2727

2828
# -- General configuration ---------------------------------------------------

Diff for: fossology/uploads.py

-1
Original file line numberDiff line numberDiff line change
@@ -777,7 +777,6 @@ def upload_permissions(
777777
:raises AuthorizationError: if the REST call is not authorized
778778
"""
779779
response = self.session.get(f"{self.api}/uploads/{upload.id}/perm-groups")
780-
print(response.request.url)
781780
if response.status_code == 200:
782781
return UploadPermGroups.from_json(response.json())
783782

Diff for: pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "fossology"
3-
version = "3.1.1"
3+
version = "3.2.0"
44
description = "A library to automate Fossology from Python scripts"
55
authors = ["Marion Deveaud <[email protected]>"]
66
license = "MIT License"

Diff for: tests/test_upload_permissions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_get_upload_permissions_if_upload_does_not_exists_raise_api_error(
4141
upload = Upload(
4242
1,
4343
"non-existing-folder",
44-
secrets.randbelow(192),
44+
secrets.randbelow(1092),
4545
"non-existing upload",
4646
"none",
4747
"2023-08-07",

0 commit comments

Comments
 (0)