Skip to content

Commit 232b674

Browse files
committed
2022.2
1 parent fe7e6e8 commit 232b674

File tree

16 files changed

+492
-426
lines changed

16 files changed

+492
-426
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
All major and minor version changes will be documented in this file. Details of
44
patch-level version changes can be found in [commit messages](../../commits/master).
55

6+
## 2022.2.0 - 2022/10/22
7+
8+
- Add support for `setup.cfg` https://github.com/FHPythonUtils/LicenseCheck/issues/21
9+
(thank you https://github.com/NicolaDonelli for the code :))
10+
- Use rich for table rendering https://github.com/FHPythonUtils/LicenseCheck/issues/20
11+
612
## 2022.1.1 - 2022/04/09
713

814
- More detailed warnings per https://github.com/FHPythonUtils/LicenseCheck/issues/19

documentation/reference/MODULES.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

documentation/reference/README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# Licensecheck Modules
1+
# Licensecheck Index
22

3-
> Auto-generated documentation modules index.
3+
> Auto-generated documentation index.
44
5-
Full list of [Licensecheck](README.md#licensecheck-index) project modules.
5+
A full list of `Licensecheck` project modules.
66

7-
- [Licensecheck Index](README.md#licensecheck-index)
87
- [Licensecheck](licensecheck/index.md#licensecheck)
98
- [Module](licensecheck/module.md#module)
109
- [Formatter](licensecheck/formatter.md#formatter)

documentation/reference/licensecheck/formatter.md

Lines changed: 101 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,173 @@
11
# Formatter
22

3+
[Licensecheck Index](../README.md#licensecheck-index) /
4+
[Licensecheck](./index.md#licensecheck) /
5+
Formatter
6+
37
> Auto-generated documentation for [licensecheck.formatter](../../../licensecheck/formatter.py) module.
48
5-
Take our package compat dictionary and give things a pretty format.
6-
7-
- [Licensecheck](../README.md#licensecheck-index) / [Modules](../MODULES.md#licensecheck-modules) / [Licensecheck](index.md#licensecheck) / Formatter
8-
- [ansi](#ansi)
9-
- [csv](#csv)
10-
- [json](#json)
11-
- [markdown](#markdown)
12-
- [simple](#simple)
13-
14-
```json
15-
{
16-
name: str
17-
version: str
18-
namever: str
19-
size: int
20-
home_page: str
21-
author: str
22-
license: str
23-
license_compat: bool
24-
}
25-
```
9+
- [Formatter](#formatter)
10+
- [ansi](#ansi)
11+
- [markdown](#markdown)
12+
- [plainText](#plaintext)
13+
- [raw](#raw)
14+
- [rawCsv](#rawcsv)
15+
- [stripAnsi](#stripansi)
2616

27-
Formats
17+
## ansi
2818

29-
- markdown
30-
- json
31-
- csv
32-
- ansi
19+
[Show source in formatter.py:50](../../../licensecheck/formatter.py#L50)
3320

34-
## ansi
21+
Format to ansi
3522

36-
[[find in source code]](../../../licensecheck/formatter.py#L133)
23+
#### Arguments
24+
25+
- `packages` *list[PackageCompat]* - list of PackageCompats to format.
26+
27+
#### Returns
28+
29+
- `str` - string to send to specified output in ansi format
30+
31+
#### Signature
3732

3833
```python
39-
def ansi(packages: list[PackageCompat], heading: str | None = None) -> str:
34+
def ansi(packages: list[PackageCompat]) -> str:
35+
...
4036
```
4137

42-
Format to ansi.
38+
#### See also
39+
40+
- [PackageCompat](./types.md#packagecompat)
41+
42+
43+
44+
## markdown
45+
46+
[Show source in formatter.py:91](../../../licensecheck/formatter.py#L91)
47+
48+
Format to markdown
4349

4450
#### Arguments
4551

46-
- `packages` *list[PackageCompat]* - PackageCompats to format
47-
- `heading` *str, optional* - Optional heading to include. Defaults to None.
52+
- `packages` *list[PackageCompat]* - list of PackageCompats to format.
4853

4954
#### Returns
5055

51-
- `str` - String to write to a file of stdout
56+
- `str` - string to send to specified output in markdown format
57+
58+
#### Signature
59+
60+
```python
61+
def markdown(packages: list[PackageCompat]) -> str:
62+
...
63+
```
5264

5365
#### See also
5466

55-
- [PackageCompat](types.md#packagecompat)
67+
- [PackageCompat](./types.md#packagecompat)
5668

57-
## csv
5869

59-
[[find in source code]](../../../licensecheck/formatter.py#L91)
6070

61-
```python
62-
def csv(packages: list[PackageCompat], heading: str | None = None) -> str:
63-
```
71+
## plainText
72+
73+
[Show source in formatter.py:79](../../../licensecheck/formatter.py#L79)
6474

65-
Format to CSV.
75+
Format to plain text
6676

6777
#### Arguments
6878

69-
- `packages` *list[PackageCompat]* - PackageCompats to format
70-
- `heading` *str, optional* - Optional heading to include. Defaults to None.
79+
- `packages` *list[PackageCompat]* - list of PackageCompats to format.
7180

7281
#### Returns
7382

74-
- `str` - String to write to a file of stdout
83+
- `str` - string to send to specified output in plain text format
84+
85+
#### Signature
86+
87+
```python
88+
def plainText(packages: list[PackageCompat]) -> str:
89+
...
90+
```
7591

7692
#### See also
7793

78-
- [PackageCompat](types.md#packagecompat)
94+
- [PackageCompat](./types.md#packagecompat)
7995

80-
## json
8196

82-
[[find in source code]](../../../licensecheck/formatter.py#L71)
8397

84-
```python
85-
def json(packages: list[PackageCompat], heading: str | None = None) -> str:
86-
```
98+
## raw
99+
100+
[Show source in formatter.py:127](../../../licensecheck/formatter.py#L127)
87101

88-
Format to Json.
102+
Format to raw json
89103

90104
#### Arguments
91105

92-
- `packages` *list[PackageCompat]* - PackageCompats to format
93-
- `heading` *str, optional* - Optional heading to include. Defaults to None.
106+
- `packages` *list[PackageCompat]* - list of PackageCompats to format.
94107

95108
#### Returns
96109

97-
- `str` - String to write to a file of stdout
110+
- `str` - string to send to specified output in raw json format
111+
112+
#### Signature
113+
114+
```python
115+
def raw(packages: list[PackageCompat]) -> str:
116+
...
117+
```
98118

99119
#### See also
100120

101-
- [PackageCompat](types.md#packagecompat)
121+
- [PackageCompat](./types.md#packagecompat)
102122

103-
## markdown
104123

105-
[[find in source code]](../../../licensecheck/formatter.py#L32)
106124

107-
```python
108-
def markdown(
109-
packages: list[PackageCompat],
110-
heading: str | None = None,
111-
) -> str:
112-
```
125+
## rawCsv
113126

114-
Format to Markdown.
127+
[Show source in formatter.py:139](../../../licensecheck/formatter.py#L139)
128+
129+
Format to raw csv
115130

116131
#### Arguments
117132

118-
- `packages` *list[PackageCompat]* - PackageCompats to format
119-
- `heading` *str, optional* - Optional heading to include. Defaults to None.
133+
- `packages` *list[PackageCompat]* - list of PackageCompats to format.
120134

121135
#### Returns
122136

123-
- `str` - String to write to a file of stdout
137+
- `str` - string to send to specified output in raw csv format
138+
139+
#### Signature
140+
141+
```python
142+
def rawCsv(packages: list[PackageCompat]) -> str:
143+
...
144+
```
124145

125146
#### See also
126147

127-
- [PackageCompat](types.md#packagecompat)
148+
- [PackageCompat](./types.md#packagecompat)
128149

129-
## simple
130150

131-
[[find in source code]](../../../licensecheck/formatter.py#L186)
132151

133-
```python
134-
def simple(packages: list[PackageCompat]) -> str:
135-
```
152+
## stripAnsi
136153

137-
Format to plain text.
154+
[Show source in formatter.py:38](../../../licensecheck/formatter.py#L38)
155+
156+
Strip ansi codes from a given string
138157

139158
#### Arguments
140159

141-
- `packages` *list[PackageCompat]* - PackageCompats to format
160+
- `string` *str* - string to strip codes from
142161

143162
#### Returns
144163

145-
- `str` - String to write to a file of stdout
164+
- `str` - plaintext, utf-8 string (safe for writing to files)
165+
166+
#### Signature
167+
168+
```python
169+
def stripAnsi(string: str) -> str:
170+
...
171+
```
146172

147-
#### See also
148173

149-
- [PackageCompat](types.md#packagecompat)
Lines changed: 42 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,18 @@
11
# Get Deps
22

3-
> Auto-generated documentation for [licensecheck.get_deps](../../../licensecheck/get_deps.py) module.
4-
5-
Get a list of packages with package compatibility.
3+
[Licensecheck Index](../README.md#licensecheck-index) /
4+
[Licensecheck](./index.md#licensecheck) /
5+
Get Deps
66

7-
- [Licensecheck](../README.md#licensecheck-index) / [Modules](../MODULES.md#licensecheck-modules) / [Licensecheck](index.md#licensecheck) / Get Deps
8-
- [getDepsWLicenses](#getdepswlicenses)
9-
- [getReqs](#getreqs)
7+
> Auto-generated documentation for [licensecheck.get_deps](../../../licensecheck/get_deps.py) module.
108
11-
## getDepsWLicenses
9+
- [Get Deps](#get-deps)
10+
- [getDepsWithLicenses](#getdepswithlicenses)
11+
- [getReqs](#getreqs)
1212

13-
[[find in source code]](../../../licensecheck/get_deps.py#L85)
13+
## getDepsWithLicenses
1414

15-
```python
16-
def getDepsWLicenses(
17-
using: str,
18-
ignorePackages: list[str],
19-
failPackages: list[str],
20-
ignoreLicenses: list[str],
21-
failLicenses: list[str],
22-
) -> list[PackageCompat]:
23-
```
15+
[Show source in get_deps.py:90](../../../licensecheck/get_deps.py#L90)
2416

2517
Get a list of dependencies with licenses and determin license compatibility.
2618

@@ -36,24 +28,51 @@ Get a list of dependencies with licenses and determin license compatibility.
3628

3729
- `list[PackageCompat]` - list of packagecompat types: dependency info + licence compat
3830

31+
#### Signature
32+
33+
```python
34+
def getDepsWithLicenses(
35+
using: str,
36+
ignorePackages: list[str],
37+
failPackages: list[str],
38+
ignoreLicenses: list[str],
39+
failLicenses: list[str],
40+
) -> list[PackageCompat]:
41+
...
42+
```
43+
3944
#### See also
4045

41-
- [PackageCompat](types.md#packagecompat)
46+
- [PackageCompat](./types.md#packagecompat)
47+
48+
4249

4350
## getReqs
4451

45-
[[find in source code]](../../../licensecheck/get_deps.py#L41)
52+
[Show source in get_deps.py:41](../../../licensecheck/get_deps.py#L41)
53+
54+
Get requirements for the end user project/ lib.
4655

4756
```python
48-
def getReqs(using: str) -> list[str]:
57+
>>> getReqs("poetry")
58+
>>> getReqs("poetry:dev")
59+
>>> getReqs("requirements")
60+
>>> getReqs("requirements:requirements.txt;requirements-dev.txt")
4961
```
5062

51-
Get requirements for the end user project/ lib.
52-
5363
#### Arguments
5464

55-
- `using` *str* - use requirements or poetry
65+
- `using` *str* - use requirements or poetry.
5666

5767
#### Returns
5868

5969
- `list[str]` - list of requirement packages
70+
71+
#### Signature
72+
73+
```python
74+
def getReqs(using: str) -> list[str]:
75+
...
76+
```
77+
78+

0 commit comments

Comments
 (0)