Skip to content

Commit

Permalink
Improve package usability (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioFuchsTT authored Sep 11, 2024
1 parent b4280f1 commit 9753df6
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 15 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,8 @@ In the end, the report generator will take the assembled *TestSuite* and generat
A small example may look like this:

```
# import necessary classes for the TestSuite creation
from testguide_report_generator.model.TestSuite import TestSuite
from testguide_report_generator.model.TestCase import TestCase, Verdict
# import the .json generator
from testguide_report_generator.ReportGenerator import Generator
# import necessary classes for the TestSuite creation and the .json generator
from testguide_report_generator import TestSuite, TestCase, Verdict, Generator
def create_testsuite():
Expand Down
8 changes: 4 additions & 4 deletions config/license/allowlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
},
{
"moduleLicense": "Apache-2.0",
"moduleVersion": "6.4.4",
"moduleVersion": "6.4.5",
"moduleName": "importlib-resources",
"licenseUrl": "https://github.com/python/importlib_resources/blob/v6.4.4/LICENSE",
"licenseUrl": "https://github.com/python/importlib_resources/blob/v6.4.5/LICENSE",
"moduleCopyright": "",
"actualLicense": "Apache-2.0",
"violationAllowance": ""
Expand Down Expand Up @@ -47,9 +47,9 @@
},
{
"moduleLicense": "MIT",
"moduleVersion": "3.20.0",
"moduleVersion": "3.20.1",
"moduleName": "zipp",
"licenseUrl": "https://github.com/jaraco/zipp/blob/v3.20.0/LICENSE",
"licenseUrl": "https://github.com/jaraco/zipp/blob/v3.20.1/LICENSE",
"moduleCopyright": "",
"actualLicense": "MIT",
"violationAllowance": ""
Expand Down
7 changes: 2 additions & 5 deletions example_TestSuite.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,8 @@
Example Script.
"""

from testguide_report_generator.model.TestSuite import TestSuite
from testguide_report_generator.model.TestCase import TestCase, TestStep, TestStepFolder, Verdict, Parameter, \
Direction, Review, TestStepArtifactType
from testguide_report_generator.model.TestCaseFolder import TestCaseFolder
from testguide_report_generator.ReportGenerator import Generator
from testguide_report_generator import TestSuite, TestCase, TestStep, TestStepFolder, Verdict, Parameter, \
Direction, Review, TestStepArtifactType, TestCaseFolder, Generator


def create_testsuite():
Expand Down
29 changes: 29 additions & 0 deletions testguide_report_generator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# Copyright (c) 2023-2024 tracetronic GmbH
#
# SPDX-License-Identifier: MIT

"""
This module provides essential imports for the testguide_report_generator package.
"""

from .ReportGenerator import Generator
from .model.TestSuite import TestSuite
from .model.TestCase import TestCase, TestStep, TestStepFolder, Verdict, Parameter, \
Direction, Review, TestStepArtifactType, Artifact, TestStepArtifact, Attribute
from .model.TestCaseFolder import TestCaseFolder
from .util.JsonValidator import JsonValidator

__all__ = [
"Generator",
"TestSuite",
"TestCase",
"TestStep",
"TestStepFolder",
"Verdict",
"Parameter",
"Direction",
"Review",
"TestStepArtifactType",
"Artifact",
"TestStepArtifact",
"Attribute",
"TestCaseFolder",
"JsonValidator"
]

0 comments on commit 9753df6

Please sign in to comment.