Skip to content

Commit 04fa421

Browse files
authoredMar 11, 2024··
Fix project's metadata. Add common READMEs (#799)
1 parent 00591e1 commit 04fa421

File tree

8 files changed

+224
-9
lines changed

8 files changed

+224
-9
lines changed
 

‎allure-behave/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def main():
5151
"Documentation": "https://allurereport.org/docs/behave/",
5252
"Source": "https://github.com/allure-framework/allure-python",
5353
},
54-
author="QAMetaSoftware, Stanislav Seliverstov",
54+
author="Qameta Software Inc., Stanislav Seliverstov",
5555
author_email="sseliverstov@qameta.io",
5656
license="Apache-2.0",
5757
classifiers=classifiers,

‎allure-nose2/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def main():
4949
project_urls={
5050
"Source": "https://github.com/allure-framework/allure-python",
5151
},
52-
author="QAMetaSoftware, Stanislav Seliverstov",
52+
author="Qameta Software Inc., Stanislav Seliverstov",
5353
author_email="sseliverstov@qameta.io",
5454
license="Apache-2.0",
5555
classifiers=classifiers,

‎allure-pytest-bdd/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def main():
5151
project_urls={
5252
"Source": "https://github.com/allure-framework/allure-python",
5353
},
54-
author="QAMetaSoftware, Stanislav Seliverstov",
54+
author="Qameta Software Inc., Stanislav Seliverstov",
5555
author_email="sseliverstov@qameta.io",
5656
license="Apache-2.0",
5757
classifiers=classifiers,

‎allure-pytest/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def main():
6464
"Documentation": "https://allurereport.org/docs/pytest/",
6565
"Source": "https://github.com/allure-framework/allure-python",
6666
},
67-
author="QAMetaSoftware, Stanislav Seliverstov",
67+
author="Qameta Software Inc., Stanislav Seliverstov",
6868
author_email="sseliverstov@qameta.io",
6969
license="Apache-2.0",
7070
classifiers=classifiers,

‎allure-python-commons-test/README.md

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
## Allure Python Testing Utilities
2+
3+
[![Release Status](https://img.shields.io/pypi/v/allure-python-commons-test)](https://pypi.python.org/pypi/allure-python-commons-test)
4+
[![Downloads](https://img.shields.io/pypi/dm/allure-python-commons-test)](https://pypi.python.org/pypi/allure-python-commons-test)
5+
6+
> The package contains pyhamcrest matchers to assert the Allure results. They
7+
> come in handy when you need to test an Allure adapter.
8+
9+
[<img src="https://allurereport.org/public/img/allure-report.svg" height="85px" alt="Allure Report logo" align="right" />](https://allurereport.org "Allure Report")
10+
11+
- Learn more about Allure Report at [https://allurereport.org](https://allurereport.org)
12+
- 📚 [Documentation](https://allurereport.org/docs/) – discover official documentation for Allure Report
13+
-[Questions and Support](https://github.com/orgs/allure-framework/discussions/categories/questions-support) – get help from the team and community
14+
- 📢 [Official announcements](https://github.com/orgs/allure-framework/discussions/categories/announcements) – stay updated with our latest news and updates
15+
- 💬 [General Discussion](https://github.com/orgs/allure-framework/discussions/categories/general-discussion) – engage in casual conversations, share insights and ideas with the community
16+
- 🖥️ [Live Demo](https://demo.allurereport.org/) — explore a live example of Allure Report in action
17+
18+
---
19+
20+
## The matchers library
21+
22+
Here is the list of available matchers. Refer to [https://github.com/allure-framework/allure-python/tree/master/tests](https://github.com/allure-framework/allure-python/tree/master/tests) for usage examples.
23+
24+
|Module|Matcher|Check|
25+
|------|-------|-----|
26+
|container|`has_container`|The report contains a container that matches all the provided matchers.|
27+
|container|`has_same_container`|The report contains a container that has all the specified tests as its children|
28+
|container|`has_before`|The container has a before fixture with the specified name that matches all the provided matchers|
29+
|container|`has_after`|The container has an after fixture with the specified name that matches all the provided matchers|
30+
|content|`csv_equivalent`|The string (typically, an attachment's content) contains a CSV document that is equvalent to the provided one|
31+
|label|`has_label`|The test contains a label with the specified name and (optionaly) the value|
32+
|label|`has_severity`|The test has the specified severity label|
33+
|label|`has_epic`|The test has the specified epic label|
34+
|label|`has_feature`|The test has the specified feature label|
35+
|label|`has_story`|The test has the specified story label|
36+
|label|`has_tag`|The test has the specified tag label|
37+
|label|`has_package`|The test has the specified package label|
38+
|label|`has_suite`|The test has the specified suite label|
39+
|label|`has_parent_suite`|The test has the specified parentSuite label|
40+
|label|`has_sub_suite`|The test has the specified subSuite label|
41+
|report|`has_test_case`|The report contains a test whose fullName ends, or name starts with the specified name. Additionally, the test must match all the provided matchers|
42+
|report|`has_only_testcases`|Each test of the report matches at least one of the provided matchers|
43+
|report|`has_only_n_test_cases`|Same as `has_test_case` but also checks if the number of matched tests is equal to the expected one|
44+
|result|`has_title`|The test has an expected name|
45+
|result|`has_description`|The test has a description that matches all the provided matchers|
46+
|result|`has_description_html`|The test has a descriptionHtml that matches all the provided matchers|
47+
|result|`has_step`|The test or step has a step with the specified name that matches all the provided matchers|
48+
|result|`has_parameter`|The test or step has a parameter with the specified name whose value matches the provided matchers|
49+
|result|`doesnt_have_parameter`|The test or step doesn't have a parameter with the specified name|
50+
|result|`has_link`|The test has a link with the expected url, type (if provided) and name (if provided)|
51+
|result|`has_issue_link`|The test has an issue link with the expected url and name (if provided)|
52+
|result|`has_test_case_link`|The test has an issue link with the expected url and name (if provided)|
53+
|result|`has_attachment`|The test or step has an attachment with the expected name and type.|
54+
|result|`has_attachment_with_content`|The test or step has an attachment with the expected name and type. In addition, the content must match the provided matcher.|
55+
|result|`with_id`|The test or container has the expected uuid|
56+
|result|`with_status`|The test or step has the expected status|
57+
|result|`has_status_details`|The status details of the test or step matches all the provided matchers|
58+
|result|`with_message_contains`|The status details' message contains the provided text|
59+
|result|`with_trace_contains`|The status details' trace contains the provided text|
60+
|result|`with_excluded`|The parameter is excluded from the historyId calculation|
61+
|result|`with_mode`|The parameter has the specified mode|
62+
|result|`has_history_id`|The test has historyId|

‎allure-python-commons-test/setup.py

+34-3
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,53 @@
1+
import os
12
from setuptools import setup
23

34
PACKAGE = "allure-python-commons-test"
45

6+
classifiers = [
7+
'Development Status :: 5 - Production/Stable',
8+
'Intended Audience :: Developers',
9+
'License :: OSI Approved :: Apache Software License',
10+
'Topic :: Software Development :: Quality Assurance',
11+
'Topic :: Software Development :: Testing',
12+
'Programming Language :: Python :: 3',
13+
'Programming Language :: Python :: 3 :: Only',
14+
'Programming Language :: Python :: 3.7',
15+
'Programming Language :: Python :: 3.8',
16+
'Programming Language :: Python :: 3.9',
17+
'Programming Language :: Python :: 3.10',
18+
'Programming Language :: Python :: 3.11',
19+
'Programming Language :: Python :: 3.12',
20+
]
21+
522
install_requires = [
623
"pyhamcrest>=1.9.0"
724
]
825

926

27+
def get_readme(fname):
28+
return open(os.path.join(os.path.dirname(__file__), fname)).read()
29+
30+
1031
def main():
1132
setup(
1233
name=PACKAGE,
1334
use_scm_version={"root": "..", "relative_to": __file__},
1435
setup_requires=['setuptools_scm'],
15-
description="Common module for self-testing allure integrations with python-based frameworks",
16-
url="https://github.com/allure-framework/allure-python",
17-
author="QAMetaSoftware, Stanislav Seliverstov",
36+
description=(
37+
"A collection of PyHamcrest matchers to test Allure adapters for "
38+
"Python test frameworks"
39+
),
40+
url="https://allurereport.org/",
41+
project_urls={
42+
"Source": "https://github.com/allure-framework/allure-python",
43+
},
44+
author="Qameta Software Inc., Stanislav Seliverstov",
1845
author_email="sseliverstov@qameta.io",
1946
license="Apache-2.0",
47+
classifiers=classifiers,
48+
keywords="allure reporting testing matchers",
49+
long_description=get_readme("README.md"),
50+
long_description_content_type="text/markdown",
2051
packages=["allure_commons_test"],
2152
package_dir={"allure_commons_test": "src"},
2253
install_requires=install_requires

‎allure-python-commons/README.md

+112
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
## Allure Common API
2+
3+
[![Release Status](https://img.shields.io/pypi/v/allure-python-commons)](https://pypi.python.org/pypi/allure-python-commons)
4+
[![Downloads](https://img.shields.io/pypi/dm/allure-python-commons)](https://pypi.python.org/pypi/allure-python-commons)
5+
6+
> The package contains classes and functions for users of Allure Report. It can
7+
> be used to enhance reports using an existing Allure adapter or to create new
8+
> adapters.
9+
10+
[<img src="https://allurereport.org/public/img/allure-report.svg" height="85px" alt="Allure Report logo" align="right" />](https://allurereport.org "Allure Report")
11+
12+
- Learn more about Allure Report at [https://allurereport.org](https://allurereport.org)
13+
- 📚 [Documentation](https://allurereport.org/docs/) – discover official documentation for Allure Report
14+
-[Questions and Support](https://github.com/orgs/allure-framework/discussions/categories/questions-support) – get help from the team and community
15+
- 📢 [Official announcements](https://github.com/orgs/allure-framework/discussions/categories/announcements) – stay updated with our latest news and updates
16+
- 💬 [General Discussion](https://github.com/orgs/allure-framework/discussions/categories/general-discussion) – engage in casual conversations, share insights and ideas with the community
17+
- 🖥️ [Live Demo](https://demo.allurereport.org/) — explore a live example of Allure Report in action
18+
19+
---
20+
21+
## User's API
22+
23+
Install an adapter that suits your test framework. You can then add more
24+
information to the report by using functions from the `allure` module.
25+
26+
### Decorators API
27+
28+
Use these functions as decorators of your own functions, e.g.:
29+
30+
```python
31+
import allure
32+
33+
@allure.title("My test")
34+
def test_fn():
35+
pass
36+
```
37+
38+
The full list of decorators:
39+
40+
- `allure.title`
41+
- `allure.description`
42+
- `allure.description_html`
43+
- `allure.label`
44+
- `allure.severity`
45+
- `allure.epic`
46+
- `allure.feature`
47+
- `allure.story`
48+
- `allure.suite`
49+
- `allure.parent_suite`
50+
- `allure.sub_suite`
51+
- `allure.tag`
52+
- `allure.id`
53+
- `allure.manual`
54+
- `allure.link`
55+
- `allure.issue`
56+
- `allure.testcase`
57+
- `allure.step`
58+
59+
Refer to the adapter's documentation for the information about what decorators
60+
are supported and what functions they can be applied to.
61+
62+
### Runtime API
63+
64+
Most of the functions of Runtime API can be accessed via `allure.dynamic.*`.
65+
Call them at runtime from your code.
66+
67+
The full list includes:
68+
69+
- `allure.dynamic.title`
70+
- `allure.dynamic.description`
71+
- `allure.dynamic.description_html`
72+
- `allure.dynamic.label`
73+
- `allure.dynamic.severity`
74+
- `allure.dynamic.epic`
75+
- `allure.dynamic.feature`
76+
- `allure.dynamic.story`
77+
- `allure.dynamic.suite`
78+
- `allure.dynamic.parent_suite`
79+
- `allure.dynamic.sub_suite`
80+
- `allure.dynamic.tag`
81+
- `allure.dynamic.id`
82+
- `allure.dynamic.manual`
83+
- `allure.dynamic.link`
84+
- `allure.dynamic.issue`
85+
- `allure.dynamic.testcase`
86+
- `allure.dynamic.parameter`
87+
- `allure.attach`
88+
- `allure.attach.file`
89+
- `allure.step`
90+
91+
Refer to the adapter's documentation for the information about what functions
92+
are supported and where you can use them.
93+
94+
## Adapter API
95+
96+
You may use `allure-pytest-commons` to build your own Allure adapter. The key
97+
elements of the corresponding API are:
98+
99+
- `allure_python_commons.model2`: the object model of Allure Report.
100+
- `allure_python_commons.logger`: classes that are used to emit Allure Report objects (tests, containers, attachments):
101+
- `AllureFileLogger`: emits to the file system.
102+
- `AllureMemoryLogger`: collects the objects in memory. Useful for
103+
testing.
104+
- `allure_python_commons.lifecycle.AllureLifecycle`: an implementation of
105+
Allure lifecycle that doesn't isolate the state between threads.
106+
- `allure_python_commons.reporter.AllureReporter`: an implementation of
107+
Allure lifecycle that supports some multithreaded scenarios.
108+
109+
A new version of the API is likely to be released in the future as we need
110+
a decent support for multithreaded and async-based concurrency (see
111+
[here](https://github.com/allure-framework/allure-python/issues/697) and
112+
[here](https://github.com/allure-framework/allure-python/issues/720)).

‎allure-python-commons/setup.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from setuptools import setup
23

34
PACKAGE = "allure-python-commons"
@@ -24,21 +25,30 @@
2425
]
2526

2627

28+
def get_readme(fname):
29+
return open(os.path.join(os.path.dirname(__file__), fname)).read()
30+
31+
2732
def main():
2833
setup(
2934
name=PACKAGE,
3035
use_scm_version={"root": "..", "relative_to": __file__},
3136
setup_requires=['setuptools_scm'],
32-
description="Common module for integrate allure with python-based frameworks",
37+
description=(
38+
"Contains the API for end users as well as helper functions and "
39+
"classes to build Allure adapters for Python test frameworks",
40+
),
3341
url="https://allurereport.org/",
3442
project_urls={
3543
"Source": "https://github.com/allure-framework/allure-python",
3644
},
37-
author="QAMetaSoftware, Stanislav Seliverstov",
45+
author="Qameta Software Inc., Stanislav Seliverstov",
3846
author_email="sseliverstov@qameta.io",
3947
license="Apache-2.0",
4048
classifiers=classifiers,
4149
keywords="allure reporting report-engine",
50+
long_description=get_readme("README.md"),
51+
long_description_content_type="text/markdown",
4252
packages=["allure_commons"],
4353
package_dir={"allure_commons": 'src'},
4454
install_requires=install_requires,

0 commit comments

Comments
 (0)
Please sign in to comment.