Skip to content

Commit

Permalink
rel 2024.3
Browse files Browse the repository at this point in the history
  • Loading branch information
FredHappyface committed Aug 26, 2024
1 parent be31ed8 commit ce61579
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 55 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
All major and minor version changes will be documented in this file. Details of
patch-level version changes can be found in [commit messages](../../commits/master).

## 2024.3
## 2024.3 - 2024/08/26

- Use uv to parse dependencies before falling back to the native resolver
- deprecate the native resolver as many 3rd party libs (uv/pip/poetry) have done better
Expand Down
3 changes: 3 additions & 0 deletions documentation/reference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,8 @@ A full list of `Licensecheck` project modules.
- [Get Deps](licensecheck/get_deps.md#get-deps)
- [License Matrix](licensecheck/license_matrix.md#license-matrix)
- [Packageinfo](licensecheck/packageinfo.md#packageinfo)
- [Resolvers](licensecheck/resolvers/index.md#resolvers)
- [Native](licensecheck/resolvers/native.md#native)
- [Uv](licensecheck/resolvers/uv.md#uv)
- [Session](licensecheck/session.md#session)
- [Types](licensecheck/types.md#types)
47 changes: 5 additions & 42 deletions documentation/reference/licensecheck/get_deps.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,58 +5,20 @@
> Auto-generated documentation for [licensecheck.get_deps](../../../licensecheck/get_deps.py) module.
- [Get Deps](#get-deps)
- [do_get_reqs](#do_get_reqs)
- [getDepsWithLicenses](#getdepswithlicenses)
- [getReqs](#getreqs)

## do_get_reqs

[Show source in get_deps.py:65](../../../licensecheck/get_deps.py#L65)

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: list[str],
pyproject: dict[str, Any],
requirementsPaths: list[Path],
) -> set[ucstr]: ...
```

#### See also

- [ucstr](./types.md#ucstr)



## getDepsWithLicenses

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

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

#### Arguments

----
- `using` *str* - use requirements or poetry
- `myLice` *License* - user license
- `ignorePackages` *list[ucstr]* - a list of packages to ignore (compat=True)
- `failPackages` *list[ucstr]* - a list of packages to fail (compat=False)
- `ignoreLicenses` *list[ucstr]* - a list of licenses to ignore (skipped, compat may still be
Expand All @@ -77,13 +39,14 @@ Get a set of dependencies with licenses and determine license compatibility.
```python
def getDepsWithLicenses(
using: str,
myLice: License,
ignorePackages: list[ucstr],
failPackages: list[ucstr],
ignoreLicenses: list[ucstr],
failLicenses: list[ucstr],
onlyLicenses: list[ucstr],
skipDependencies: list[ucstr],
) -> tuple[License, set[PackageInfo]]: ...
) -> set[PackageInfo]: ...
```

#### See also
Expand All @@ -96,7 +59,7 @@ def getDepsWithLicenses(

## getReqs

[Show source in get_deps.py:22](../../../licensecheck/get_deps.py#L22)
[Show source in get_deps.py:17](../../../licensecheck/get_deps.py#L17)

Get requirements for the end user project/ lib.

Expand Down
1 change: 1 addition & 0 deletions documentation/reference/licensecheck/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
- [Get Deps](./get_deps.md)
- [License Matrix](./license_matrix.md)
- [Packageinfo](./packageinfo.md)
- [Resolvers](resolvers/index.md)
- [Session](./session.md)
- [Types](./types.md)
10 changes: 5 additions & 5 deletions documentation/reference/licensecheck/packageinfo.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _pkgMetadataGet(

## getModuleSize

[Show source in packageinfo.py:193](../../../licensecheck/packageinfo.py#L193)
[Show source in packageinfo.py:195](../../../licensecheck/packageinfo.py#L195)

Get the size of a given module as an int.

Expand Down Expand Up @@ -61,7 +61,7 @@ def getModuleSize(path: Path, name: ucstr) -> int: ...

## getMyPackageLicense

[Show source in packageinfo.py:174](../../../licensecheck/packageinfo.py#L174)
[Show source in packageinfo.py:176](../../../licensecheck/packageinfo.py#L176)

Get the package license from "setup.cfg", "pyproject.toml" or user input.

Expand All @@ -83,7 +83,7 @@ def getMyPackageLicense() -> ucstr: ...

## getMyPackageMetadata

[Show source in packageinfo.py:145](../../../licensecheck/packageinfo.py#L145)
[Show source in packageinfo.py:147](../../../licensecheck/packageinfo.py#L147)

Get the package classifiers and license from "setup.cfg", "pyproject.toml".

Expand Down Expand Up @@ -167,7 +167,7 @@ def getPackageInfoPypi(requirement: ucstr) -> PackageInfo: ...

## getPackages

[Show source in packageinfo.py:120](../../../licensecheck/packageinfo.py#L120)
[Show source in packageinfo.py:122](../../../licensecheck/packageinfo.py#L122)

Get dependency info.

Expand Down Expand Up @@ -196,7 +196,7 @@ def getPackages(reqs: set[ucstr]) -> set[PackageInfo]: ...

## licenseFromClassifierlist

[Show source in packageinfo.py:96](../../../licensecheck/packageinfo.py#L96)
[Show source in packageinfo.py:98](../../../licensecheck/packageinfo.py#L98)

Get license string from a list of project classifiers.

Expand Down
13 changes: 13 additions & 0 deletions documentation/reference/licensecheck/resolvers/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Resolvers

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

> Auto-generated documentation for [licensecheck.resolvers](../../../../licensecheck/resolvers/__init__.py) module.
- [Resolvers](#resolvers)
- [Modules](#modules)

## Modules

- [Native](./native.md)
- [Uv](./uv.md)
44 changes: 44 additions & 0 deletions documentation/reference/licensecheck/resolvers/native.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Native

[Licensecheck Index](../../README.md#licensecheck-index) / [Licensecheck](../index.md#licensecheck) / [Resolvers](./index.md#resolvers) / Native

> Auto-generated documentation for [licensecheck.resolvers.native](../../../../licensecheck/resolvers/native.py) module.
- [Native](#native)
- [get_reqs](#get_reqs)

## get_reqs

[Show source in native.py:16](../../../../licensecheck/resolvers/native.py#L16)

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 get_reqs(
using: str,
skipDependencies: list[ucstr],
extras: list[str],
pyproject: dict[str, Any],
requirementsPaths: list[Path],
) -> set[ucstr]: ...
```

#### See also

- [ucstr](../types.md#ucstr)
27 changes: 27 additions & 0 deletions documentation/reference/licensecheck/resolvers/uv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Uv

[Licensecheck Index](../../README.md#licensecheck-index) / [Licensecheck](../index.md#licensecheck) / [Resolvers](./index.md#resolvers) / Uv

> Auto-generated documentation for [licensecheck.resolvers.uv](../../../../licensecheck/resolvers/uv.py) module.
- [Uv](#uv)
- [get_reqs](#get_reqs)

## get_reqs

[Show source in uv.py:15](../../../../licensecheck/resolvers/uv.py#L15)

#### Signature

```python
def get_reqs(
using: str,
skipDependencies: list[ucstr],
extras: list[str],
requirementsPaths: list[str],
) -> set[ucstr]: ...
```

#### See also

- [ucstr](../types.md#ucstr)
10 changes: 5 additions & 5 deletions documentation/reference/licensecheck/types.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

## License

[Show source in types.py:54](../../../licensecheck/types.py#L54)
[Show source in types.py:56](../../../licensecheck/types.py#L56)

#### Attributes

Expand Down Expand Up @@ -49,7 +49,7 @@ class License(Enum): ...

## PackageInfo

[Show source in types.py:28](../../../licensecheck/types.py#L28)
[Show source in types.py:30](../../../licensecheck/types.py#L30)

PackageInfo type.

Expand All @@ -61,7 +61,7 @@ class PackageInfo: ...

### PackageInfo().__post_init__

[Show source in types.py:41](../../../licensecheck/types.py#L41)
[Show source in types.py:43](../../../licensecheck/types.py#L43)

Set the namever once the object is initialised.

Expand All @@ -73,7 +73,7 @@ def __post_init__(self) -> None: ...

### PackageInfo().get_filtered_dict

[Show source in types.py:45](../../../licensecheck/types.py#L45)
[Show source in types.py:47](../../../licensecheck/types.py#L47)

Return a filtered dictionary of the object.

Expand Down Expand Up @@ -126,5 +126,5 @@ uppercase string.
#### Signature

```python
def __new__(cls, v: str) -> ucstr: ...
def __new__(cls, v: str | None) -> ucstr: ...
```
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ packaging = "<25,>=24.0"
loguru = "<2,>=0.7.2"
appdirs = "<2,>=1.4.4"
markdown = "<4,>=3.6"
uv = "^0.3.3"
requirements-parser = "^0.11.0"
uv = "<2,>=0.3.3"
requirements-parser = "<2,>=0.11.0"

[tool.poetry.group.dev.dependencies]
pytest = "^8.1.1"
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ markdown<4,>=3.6
packaging<25,>=24.0
requests-cache<2,>=1.2.0
requests<3,>=2.31.0
requirements-parser<2,>=0.11.0
rich<14,>=13.7.1
tomli<3,>=2.0.1
uv<2,>=0.3.3

0 comments on commit ce61579

Please sign in to comment.