11# Checkrequirements
22
3+ [ Checkrequirements Index] ( ../README.md#checkrequirements-index ) /
4+ Checkrequirements
5+
36> Auto-generated documentation for [ checkrequirements] ( ../../../checkrequirements/__init__.py ) module.
47
5- Check that your requirements.txt is up to date with the most recent packageversions.
6-
7- - [ Checkrequirements] ( ../README.md#checkrequirements-index ) / [ Modules] ( ../MODULES.md#checkrequirements-modules ) / Checkrequirements
8- - [ Dependency] ( #dependency )
9- - [ UpdateCompatible] ( #updatecompatible )
10- - [ checkRequirements] ( #checkrequirements )
11- - [ cli] ( #cli )
12- - [ partCmp] ( #partcmp )
13- - [ semCmp] ( #semcmp )
14- - [ semPad] ( #sempad )
15- - [ semver] ( #semver )
16- - [ updateCompatible] ( #updatecompatible )
17- - Modules
18- - [ Module] ( module.md#module )
8+ - [ Checkrequirements] ( #checkrequirements )
9+ - [ Dependency] ( #dependency )
10+ - [ UpdateCompatible] ( #updatecompatible )
11+ - [ checkRequirements] ( #checkrequirements )
12+ - [ cli] ( #cli )
13+ - [ partCmp] ( #partcmp )
14+ - [ semCmp] ( #semcmp )
15+ - [ semPad] ( #sempad )
16+ - [ semver] ( #semver )
17+ - [ updateCompatible] ( #updatecompatible )
18+ - [ Modules] ( #modules )
1919
2020## Dependency
2121
22- [[ find in source code]] ( ../../../checkrequirements/__init__.py#L25 )
22+ [ Show source in __ init__ .py:25] ( ../../../checkrequirements/__init__.py#L25 )
23+
24+ Dependency type.
25+
26+ #### Signature
2327
2428``` python
2529class Dependency (typing .TypedDict ):
30+ ...
2631```
2732
28- Dependency type.
33+
2934
3035## UpdateCompatible
3136
32- [[ find in source code]] ( ../../../checkrequirements/__init__.py#L18 )
37+ [ Show source in __ init__ .py:18] ( ../../../checkrequirements/__init__.py#L18 )
38+
39+ UpdateCompatible type.
40+
41+ #### Signature
3342
3443``` python
3544class UpdateCompatible (typing .TypedDict ):
45+ ...
3646```
3747
38- UpdateCompatible type.
3948
40- ## checkRequirements
4149
42- [[ find in source code ]] ( ../../../checkrequirements/__init__.py#L190 )
50+ ## checkRequirements
4351
44- ``` python
45- def checkRequirements (requirementsFile : str ) -> list[Dependency]:
46- ```
52+ [ Show source in __ init__ .py:190] ( ../../../checkrequirements/__init__.py#L190 )
4753
4854Check that your requirements.txt is up to date with the most recent package
4955versions. Put in a function so dependants can use this function rather than
@@ -55,31 +61,41 @@ reimplement it themselves.
5561
5662#### Returns
5763
58- - ` Dependency ` - dictionary containing info on each requirement such as the name,
64+ - [ Dependency] ( #dependency ) - dictionary containing info on each requirement such as the name,
5965specs (from requirements_parser), ver (most recent version), compatible
6066(is our version compatible with ver)
6167
68+ #### Signature
69+
70+ ``` python
71+ def checkRequirements (requirementsFile : str ) -> list[Dependency]:
72+ ...
73+ ```
74+
6275#### See also
6376
6477- [ Dependency] ( #dependency )
6578
79+
80+
6681## cli
6782
68- [[ find in source code]] ( ../../../checkrequirements/__init__.py#L211 )
83+ [ Show source in __ init__ .py:211] ( ../../../checkrequirements/__init__.py#L211 )
84+
85+ CLI entry point.
86+
87+ #### Signature
6988
7089``` python
7190def cli ():
91+ ...
7292```
7393
74- CLI entry point.
94+
7595
7696## partCmp
7797
78- [[ find in source code]] ( ../../../checkrequirements/__init__.py#L62 )
79-
80- ``` python
81- def partCmp (verA : str , verB : str ) -> int :
82- ```
98+ [ Show source in __ init__ .py:62] ( ../../../checkrequirements/__init__.py#L62 )
8399
84100Compare parts of a semver.
85101
@@ -92,14 +108,19 @@ Compare parts of a semver.
92108
93109- ` int ` - 0 if equal, 1 if verA > verB and -1 if verA < verB
94110
95- ## semCmp
96-
97- [[ find in source code]] ( ../../../checkrequirements/__init__.py#L149 )
111+ #### Signature
98112
99113``` python
100- def semCmp (versionA : str , versionB : str , sign : str ) -> bool :
114+ def partCmp (verA : str , verB : str ) -> int :
115+ ...
101116```
102117
118+
119+
120+ ## semCmp
121+
122+ [ Show source in __ init__ .py:149] ( ../../../checkrequirements/__init__.py#L149 )
123+
103124Compare two semvers of any length. e.g. 1.1 and 2.2.2.
104125
105126#### Arguments
@@ -116,14 +137,19 @@ Compare two semvers of any length. e.g. 1.1 and 2.2.2.
116137
117138- ` bool ` - true if the comparison is met. e.g. 1.1.1, 2.2.2, <= -> True
118139
119- ## semPad
120-
121- [[ find in source code]] ( ../../../checkrequirements/__init__.py#L46 )
140+ #### Signature
122141
123142``` python
124- def semPad (ver : list[str ], length : int ) -> list[str ]:
143+ def semCmp (versionA : str , versionB : str , sign : str ) -> bool :
144+ ...
125145```
126146
147+
148+
149+ ## semPad
150+
151+ [ Show source in __ init__ .py:46] ( ../../../checkrequirements/__init__.py#L46 )
152+
127153Pad a semver list to the required size. e.g. [ "1", "0"] to [ "1", "0", "0"] .
128154
129155#### Arguments
@@ -135,14 +161,19 @@ Pad a semver list to the required size. e.g. ["1", "0"] to ["1", "0", "0"].
135161
136162- ` list[str] ` - the new semver
137163
138- ## semver
139-
140- [[ find in source code]] ( ../../../checkrequirements/__init__.py#L34 )
164+ #### Signature
141165
142166``` python
143- def semver (version : str ) -> list[str ]:
167+ def semPad (ver : list[str ], length : int ) -> list[str ]:
168+ ...
144169```
145170
171+
172+
173+ ## semver
174+
175+ [ Show source in __ init__ .py:34] ( ../../../checkrequirements/__init__.py#L34 )
176+
146177Convert a semver/ python-ver string to a list in the form major, minor patch
147178
148179#### Arguments
@@ -153,14 +184,19 @@ Convert a semver/ python-ver string to a list in the form major, minor patch
153184
154185- ` list[str] ` - A list in the form major, minor, patch
155186
156- ## updateCompatible
157-
158- [[ find in source code]] ( ../../../checkrequirements/__init__.py#L169 )
187+ #### Signature
159188
160189``` python
161- def updateCompatible (req : Requirement) -> UpdateCompatible:
190+ def semver (version : str ) -> list[str ]:
191+ ...
162192```
163193
194+
195+
196+ ## updateCompatible
197+
198+ [ Show source in __ init__ .py:169] ( ../../../checkrequirements/__init__.py#L169 )
199+
164200Check if the most recent version of a python requirement is compatible with
165201the current version.
166202
@@ -170,10 +206,23 @@ the current version.
170206
171207#### Returns
172208
173- - ` UpdateCompatible ` - return a dict of the most recent version (ver) and
209+ - [ UpdateCompatible] ( #updatecompatible ) - return a dict of the most recent version (ver) and
174210is our requirement from requirements.txt or similar compatible
175211with the new version per the version specifier (compatible)
176212
213+ #### Signature
214+
215+ ``` python
216+ def updateCompatible (req : Requirement) -> UpdateCompatible:
217+ ...
218+ ```
219+
177220#### See also
178221
179222- [ UpdateCompatible] ( #updatecompatible )
223+
224+
225+
226+ ## Modules
227+
228+ - [ Module] ( ./module.md )
0 commit comments