Skip to content

Commit

Permalink
rel 2024.1
Browse files Browse the repository at this point in the history
  • Loading branch information
FredHappyface committed Mar 16, 2024
1 parent f5f5885 commit dd02bd7
Show file tree
Hide file tree
Showing 17 changed files with 194 additions and 183 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ patch-level version changes can be found in [commit messages](../../commits/mast
- fix issue where onlyLicenses logic caused licensecompat to be `false` when unspecified from the command line
- move `cli()` to `cli.py`
- add tests for the main entry point
- update deps

## 2024 - 2024/01/27

Expand Down
1 change: 1 addition & 0 deletions documentation/reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ A full list of `Licensecheck` project modules.

- [Licensecheck](licensecheck/index.md#licensecheck)
- [Module](licensecheck/module.md#module)
- [Cli](licensecheck/cli.md#cli)
- [Formatter](licensecheck/formatter.md#formatter)
- [Get Deps](licensecheck/get_deps.md#get-deps)
- [License Matrix](licensecheck/license_matrix.md#license-matrix)
Expand Down
35 changes: 35 additions & 0 deletions documentation/reference/licensecheck/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Cli

[Licensecheck Index](../README.md#licensecheck-index) / [Licensecheck](./index.md#licensecheck) / Cli

> Auto-generated documentation for [licensecheck.cli](../../../licensecheck/cli.py) module.
- [Cli](#cli)
- [cli](#cli)
- [main](#main)

## cli

[Show source in cli.py:20](../../../licensecheck/cli.py#L20)

Cli entry point.

#### Signature

```python
def cli() -> None: ...
```



## main

[Show source in cli.py:89](../../../licensecheck/cli.py#L89)

Test entry point.

#### Signature

```python
def main(args: dict) -> int: ...
```
47 changes: 36 additions & 11 deletions documentation/reference/licensecheck/formatter.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

## ansi

[Show source in formatter.py:59](../../../licensecheck/formatter.py#L59)
[Show source in formatter.py:61](../../../licensecheck/formatter.py#L61)

Format to ansi.

Expand All @@ -23,6 +23,7 @@ Format to ansi.
----
- `myLice` *License* - project license
- `packages` *list[PackageInfo]* - list of PackageCompats to format.
- `hide_parameters` *list[str]* - list of parameters to ignore in the output.

#### Returns

Expand All @@ -32,7 +33,11 @@ Format to ansi.
#### Signature

```python
def ansi(myLice: License, packages: list[PackageInfo]) -> str: ...
def ansi(
myLice: License,
packages: list[PackageInfo],
hide_parameters: list[ucstr] | None = None,
) -> str: ...
```

#### See also
Expand All @@ -44,7 +49,7 @@ def ansi(myLice: License, packages: list[PackageInfo]) -> str: ...

## markdown

[Show source in formatter.py:123](../../../licensecheck/formatter.py#L123)
[Show source in formatter.py:151](../../../licensecheck/formatter.py#L151)

Format to markdown.

Expand All @@ -53,6 +58,7 @@ Format to markdown.
----
- `myLice` *License* - project license
- `packages` *list[PackageInfo]* - list of PackageCompats to format.
- `hide_parameters` *list[str]* - list of parameters to ignore in the output.

#### Returns

Expand All @@ -62,7 +68,11 @@ Format to markdown.
#### Signature

```python
def markdown(myLice: License, packages: list[PackageInfo]) -> str: ...
def markdown(
myLice: License,
packages: list[PackageInfo],
hide_parameters: list[ucstr] | None = None,
) -> str: ...
```

#### See also
Expand All @@ -74,7 +84,7 @@ def markdown(myLice: License, packages: list[PackageInfo]) -> str: ...

## plainText

[Show source in formatter.py:107](../../../licensecheck/formatter.py#L107)
[Show source in formatter.py:128](../../../licensecheck/formatter.py#L128)

Format to ansi.

Expand All @@ -83,6 +93,7 @@ Format to ansi.
----
- `myLice` *License* - project license
- `packages` *list[PackageInfo]* - list of PackageCompats to format.
- `hide_parameters` *list[str]* - list of parameters to ignore in the output.

#### Returns

Expand All @@ -92,7 +103,11 @@ Format to ansi.
#### Signature

```python
def plainText(myLice: License, packages: list[PackageInfo]) -> str: ...
def plainText(
myLice: License,
packages: list[PackageInfo],
hide_parameters: list[ucstr] | None = None,
) -> str: ...
```

#### See also
Expand All @@ -104,7 +119,7 @@ def plainText(myLice: License, packages: list[PackageInfo]) -> str: ...

## raw

[Show source in formatter.py:165](../../../licensecheck/formatter.py#L165)
[Show source in formatter.py:206](../../../licensecheck/formatter.py#L206)

Format to json.

Expand All @@ -113,6 +128,7 @@ Format to json.
----
- `myLice` *License* - project license
- `packages` *list[PackageInfo]* - list of PackageCompats to format.
- `hide_parameters` *list[str]* - list of parameters to ignore in the output.

#### Returns

Expand All @@ -122,7 +138,11 @@ Format to json.
#### Signature

```python
def raw(myLice: License, packages: list[PackageInfo]) -> str: ...
def raw(
myLice: License,
packages: list[PackageInfo],
hide_parameters: list[ucstr] | None = None,
) -> str: ...
```

#### See also
Expand All @@ -134,7 +154,7 @@ def raw(myLice: License, packages: list[PackageInfo]) -> str: ...

## rawCsv

[Show source in formatter.py:188](../../../licensecheck/formatter.py#L188)
[Show source in formatter.py:236](../../../licensecheck/formatter.py#L236)

Format to csv.

Expand All @@ -143,6 +163,7 @@ Format to csv.
----
- `myLice` *License* - project license
- `packages` *list[PackageInfo]* - list of PackageCompats to format.
- `hide_parameters` *list[str]* - list of parameters to ignore in the output.

#### Returns

Expand All @@ -152,7 +173,11 @@ Format to csv.
#### Signature

```python
def rawCsv(myLice: License, packages: list[PackageInfo]) -> str: ...
def rawCsv(
myLice: License,
packages: list[PackageInfo],
hide_parameters: list[ucstr] | None = None,
) -> str: ...
```

#### See also
Expand All @@ -164,7 +189,7 @@ def rawCsv(myLice: License, packages: list[PackageInfo]) -> str: ...

## stripAnsi

[Show source in formatter.py:44](../../../licensecheck/formatter.py#L44)
[Show source in formatter.py:46](../../../licensecheck/formatter.py#L46)

Strip ansi codes from a given string.

Expand Down
24 changes: 21 additions & 3 deletions documentation/reference/licensecheck/get_deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,31 @@

## do_get_reqs

[Show source in get_deps.py:61](../../../licensecheck/get_deps.py#L61)
[Show source in get_deps.py:64](../../../licensecheck/get_deps.py#L64)

Underlying machineary to get requirements.

#### Arguments

----
- `using` *str* - use requirements, poetry or PEP631.
- `skipDependencies` *list[str]* - list of dependencies to skip.
extras (str | None): to-do
pyproject (dict[str, Any]): to-do
- `requirementsPaths` *list[Path]* - to-do

#### Returns

-------
- `set[str]` - set of requirement packages

#### Signature

```python
def do_get_reqs(
using: str,
skipDependencies: list[ucstr],
extras: str | None,
extras: list[str],
pyproject: dict[str, Any],
requirementsPaths: list[Path],
) -> set[ucstr]: ...
Expand All @@ -33,7 +49,7 @@ def do_get_reqs(

## getDepsWithLicenses

[Show source in get_deps.py:173](../../../licensecheck/get_deps.py#L173)
[Show source in get_deps.py:188](../../../licensecheck/get_deps.py#L188)

Get a set of dependencies with licenses and determine license compatibility.

Expand All @@ -46,6 +62,7 @@ Get a set of dependencies with licenses and determine license compatibility.
- `ignoreLicenses` *list[ucstr]* - a list of licenses to ignore (skipped, compat may still be
False)
- `failLicenses` *list[ucstr]* - a list of licenses to fail (compat=False)
- `onlyLicenses` *list[ucstr]* - a list of allowed licenses (any other license will fail)
- `skipDependencies` *list[ucstr]* - a list of dependencies to skip (compat=False)

#### Returns
Expand All @@ -64,6 +81,7 @@ def getDepsWithLicenses(
failPackages: list[ucstr],
ignoreLicenses: list[ucstr],
failLicenses: list[ucstr],
onlyLicenses: list[ucstr],
skipDependencies: list[ucstr],
) -> tuple[License, set[PackageInfo]]: ...
```
Expand Down
16 changes: 1 addition & 15 deletions documentation/reference/licensecheck/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,12 @@
> Auto-generated documentation for [licensecheck](../../../licensecheck/__init__.py) module.
- [Licensecheck](#licensecheck)
- [cli](#cli)
- [Modules](#modules)

## cli

[Show source in __init__.py:18](../../../licensecheck/__init__.py#L18)

Cli entry point.

#### Signature

```python
def cli() -> None: ...
```



## Modules

- [Module](./module.md)
- [Cli](./cli.md)
- [Formatter](./formatter.md)
- [Get Deps](./get_deps.md)
- [License Matrix](./license_matrix.md)
Expand Down
17 changes: 12 additions & 5 deletions documentation/reference/licensecheck/license_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

## depCompatWMyLice

[Show source in license_matrix.py:135](../../../licensecheck/license_matrix.py#L135)
[Show source in license_matrix.py:136](../../../licensecheck/license_matrix.py#L136)

Identify if the end user license is compatible with the dependency license(s).

Expand All @@ -23,6 +23,7 @@ Identify if the end user license is compatible with the dependency license(s).
- `depLice` *list[L]* - dependency license
- `ignoreLicenses` *list[L], optional* - list of licenses to ignore. Defaults to None.
- `failLicenses` *list[L], optional* - list of licenses to fail on. Defaults to None.
- `onlyLicenses` *list[L], optional* - list of allowed licenses. Defaults to None.

#### Returns

Expand All @@ -37,6 +38,7 @@ def depCompatWMyLice(
depLice: list[L],
ignoreLicenses: list[L] | None = None,
failLicenses: list[L] | None = None,
onlyLicenses: list[L] | None = None,
) -> bool: ...
```

Expand All @@ -48,7 +50,7 @@ def depCompatWMyLice(

## liceCompat

[Show source in license_matrix.py:171](../../../licensecheck/license_matrix.py#L171)
[Show source in license_matrix.py:176](../../../licensecheck/license_matrix.py#L176)

Identify if the end user license is compatible with the dependency license.

Expand All @@ -58,6 +60,7 @@ Identify if the end user license is compatible with the dependency license.
- `lice` *L* - dependency license
:param list[L] ignoreLicenses: list of licenses to ignore. Defaults to None.
:param list[L] failLicenses: list of licenses to fail on. Defaults to None.
:param list[L] onlyLicenses: list of allowed licenses. Defaults to None.

#### Returns

Expand All @@ -68,7 +71,11 @@ True if compatible, otherwise False

```python
def liceCompat(
myLicense: L, lice: L, ignoreLicenses: list[L], failLicenses: list[L]
myLicense: L,
lice: L,
ignoreLicenses: list[L],
failLicenses: list[L],
onlyLicenses: list[L],
) -> bool: ...
```

Expand All @@ -80,7 +87,7 @@ def liceCompat(

## licenseLookup

[Show source in license_matrix.py:54](../../../licensecheck/license_matrix.py#L54)
[Show source in license_matrix.py:55](../../../licensecheck/license_matrix.py#L55)

Identify a license from an uppercase string representation of a license.

Expand Down Expand Up @@ -110,7 +117,7 @@ def licenseLookup(licenseStr: ucstr, ignoreLicenses: list[ucstr] | None = None)

## licenseType

[Show source in license_matrix.py:116](../../../licensecheck/license_matrix.py#L116)
[Show source in license_matrix.py:117](../../../licensecheck/license_matrix.py#L117)

Return a list of license types from a license string.

Expand Down
Loading

0 comments on commit dd02bd7

Please sign in to comment.