Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(3.2.0): upgrade to next minor version #128

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/fossologytests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
test-latest:
name: Integration Tests (latest Fossology - 4.4.0)
name: Integration Tests (latest Fossology - 4.4.0-rc2)
runs-on: ubuntu-latest

container:
Expand All @@ -20,7 +20,7 @@ jobs:

services:
fossology:
image: fossology/fossology:4.4.0
image: fossology/fossology:4.4.0-rc2
ports:
- 8081:80
volumes:
Expand Down
12 changes: 8 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ A simple wrapper for the Fossology REST API.

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

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

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

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

API v1 is supported too, it needs to be specified explicitly.

Documentation
=============

Expand Down Expand Up @@ -61,17 +63,19 @@ Using the API
from fossology import fossology_token
from fossology.enum import TokenScope

FOSSOLOGY_SERVER = "https://fossology.example.com/repo" # Note the absense of the trailing slash, otherwise the token generation will fail
FOSSOLOGY_SERVER = "https://fossology.example.com/repo" # Note the absence of the trailing slash, otherwise the token generation will fail
FOSSOLOGY_USER = "fossy"
FOSSOLOGY_PASSWORD = "fossy"
TOKEN_NAME = "fossy_token"

# By default version v2 of the token generation API will be used
token = fossology_token(
FOSSOLOGY_SERVER,
FOSSOLOGY_USER,
FOSSOLOGY_PASSWORD,
TOKEN_NAME,
TokenScope.WRITE
version="v2"
)

- Start using the API:
Expand All @@ -80,8 +84,8 @@ Using the API

from fossology import Fossology

# Starting from API version 1.2.3, the `FOSSOLOGY_USER` option is not needed anymore
foss = Fossology(FOSSOLOGY_SERVER, token, FOSSOLOGY_USER)
# By default version v2 of the API will be used
foss = Fossology(FOSSOLOGY_SERVER, token, FOSSOLOGY_USER, version="v2")
print(f"Logged in as user {foss.user.name}")


Expand Down
2 changes: 1 addition & 1 deletion docs-source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
copyright = "2021, Siemens AG"

# The full version, including major/minor/patch tags
release = "3.1.1"
release = "3.2.0"


# -- General configuration ---------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion fossology/uploads.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,6 @@ def upload_permissions(
:raises AuthorizationError: if the REST call is not authorized
"""
response = self.session.get(f"{self.api}/uploads/{upload.id}/perm-groups")
print(response.request.url)
if response.status_code == 200:
return UploadPermGroups.from_json(response.json())

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "fossology"
version = "3.1.1"
version = "3.2.0"
description = "A library to automate Fossology from Python scripts"
authors = ["Marion Deveaud <[email protected]>"]
license = "MIT License"
Expand Down
2 changes: 1 addition & 1 deletion tests/test_upload_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_get_upload_permissions_if_upload_does_not_exists_raise_api_error(
upload = Upload(
1,
"non-existing-folder",
secrets.randbelow(192),
secrets.randbelow(1092),
"non-existing upload",
"none",
"2023-08-07",
Expand Down