c2cciutils 1.7.0.dev334__py3-none-any.whl → 1.7.0.dev338__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of c2cciutils might be problematic. Click here for more details.

@@ -4,275 +4,63 @@ Automatically generated file from a JSON schema.
4
4
 
5
5
  from typing import Any, Literal, TypedDict, Union
6
6
 
7
- AUDIT_DEFAULT = {"snyk": True}
8
- """ Default value of the field path 'configuration audit' """
9
7
 
10
-
11
- AUDIT_SNYK_FILES_NO_INSTALL_DEFAULT: list[Any] = []
12
- """ Default value of the field path 'Audit Snyk config files_no_install' """
13
-
14
-
15
- AUDIT_SNYK_FIX_ARGUMENTS_DEFAULT = ["--all-projects"]
16
- """ Default value of the field path 'Audit Snyk config fix_arguments' """
17
-
18
-
19
- AUDIT_SNYK_FIX_PULL_REQUEST_ARGUMENTS_DEFAULT = ["--fill", "--label=dependencies"]
20
- """ Default value of the field path 'Audit Snyk config fix_github_create_pull_request_arguments' """
21
-
22
-
23
- AUDIT_SNYK_MONITOR_ARGUMENTS_DEFAULT = ["--all-projects"]
24
- """ Default value of the field path 'Audit Snyk config monitor_arguments' """
25
-
26
-
27
- AUDIT_SNYK_PIPENV_SYNC_ARGUMENTS_DEFAULT: list[Any] = []
28
- """ Default value of the field path 'Audit Snyk config pipenv_sync_arguments' """
29
-
30
-
31
- AUDIT_SNYK_PIP_INSTALL_ARGUMENTS_DEFAULT = ["--user"]
32
- """ Default value of the field path 'Audit Snyk config pip_install_arguments' """
33
-
34
-
35
- AUDIT_SNYK_TEST_ARGUMENTS_DEFAULT = ["--all-projects", "--fail-on=all", "--severity-threshold=medium"]
36
- """ Default value of the field path 'Audit Snyk config test_arguments' """
37
-
38
-
39
- class Audit(TypedDict, total=False):
8
+ class Configuration(TypedDict, total=False):
40
9
  """
41
- Audit.
10
+ configuration.
42
11
 
43
- The audit configuration
44
-
45
- default:
46
- snyk: true
12
+ C2C CI utils configuration file
47
13
  """
48
14
 
49
- snyk: "AuditWithSnyk"
15
+ print_versions: "PrintVersions"
50
16
  """
51
- Audit with Snyk.
52
-
53
- The audit Snyk configuration
54
-
55
- Aggregation type: oneOf
56
- Subtype: "AuditSnykConfig"
57
- """
58
-
59
-
60
- class AuditSnykConfig(TypedDict, total=False):
61
- """
62
- Audit Snyk config.
63
-
64
- The audit Pipfile configuration
65
- """
66
-
67
- test_arguments: list[str]
68
- """
69
- audit snyk test arguments.
70
-
71
- The Snyk test arguments
72
-
73
- default:
74
- - --all-projects
75
- - --fail-on=all
76
- - --severity-threshold=medium
77
- """
78
-
79
- monitor_arguments: list[str]
80
- """
81
- audit snyk monitor arguments.
82
-
83
- The Snyk monitor arguments
84
-
85
- default:
86
- - --all-projects
87
- """
88
-
89
- fix_arguments: list[str]
90
- """
91
- audit snyk fix arguments.
92
-
93
- The Snyk fix arguments
94
-
95
- default:
96
- - --all-projects
97
- """
98
-
99
- fix_github_create_pull_request_arguments: list[str]
100
- """
101
- audit snyk fix pull request arguments.
102
-
103
- The Snyk fix pull request extra arguments
104
-
105
- default:
106
- - --fill
107
- - --label=dependencies
108
- """
109
-
110
- pip_install_arguments: list[str]
111
- """
112
- audit snyk pip install arguments.
113
-
114
- The Snyk pip install arguments
115
-
116
- default:
117
- - --user
118
- """
119
-
120
- pipenv_sync_arguments: list[str]
121
- """
122
- audit snyk pipenv sync arguments.
123
-
124
- The Snyk pipenv sync arguments
17
+ Print versions.
125
18
 
126
- default:
127
- []
19
+ The print versions configuration
128
20
  """
129
21
 
130
- files_no_install: list[str]
22
+ publish: "Publish"
131
23
  """
132
- audit snyk files no install.
24
+ Publish.
133
25
 
134
- The list of files to not install
26
+ The publishing configurations
135
27
 
136
28
  default:
137
- []
29
+ docker:
30
+ images: <auto-detected>
31
+ helm:
32
+ folders: <auto-detected>
33
+ versions:
34
+ - version_tag
35
+ pypi:
36
+ packages: <auto-detected>
37
+ versions:
38
+ - version_tag
138
39
  """
139
40
 
140
-
141
- AuditWithSnyk = Union["AuditSnykConfig", bool]
142
- """
143
- Audit with Snyk.
144
-
145
- The audit Snyk configuration
146
-
147
- Aggregation type: oneOf
148
- Subtype: "AuditSnykConfig"
149
- """
150
-
151
-
152
- CODESPELL_ARGUMENTS_DEFAULT = ["--quiet-level=2", "--check-filenames", "--ignore-words-list=ro"]
153
- """ Default value of the field path 'Codespell arguments' """
154
-
155
-
156
- CODESPELL_DICTIONARIES_DEFAULT = ["clear", "rare", "informal", "code", "names", "en-GB_to_en-US"]
157
- """ Default value of the field path 'Codespell internal_dictionaries' """
158
-
159
-
160
- CODESPELL_IGNORE_REGULAR_EXPRESSION_DEFAULT = ["(.*/)?poetry\\.lock", "(.*/)?package-lock\\.json"]
161
- """ Default value of the field path 'Codespell ignore_re' """
162
-
163
-
164
- class Codespell(TypedDict, total=False):
41
+ version: "Version"
165
42
  """
166
- Codespell.
43
+ Version.
167
44
 
168
- The codespell check configuration
45
+ The version configurations
169
46
  """
170
47
 
171
- internal_dictionaries: list[str]
48
+ k8s: "K8SConfiguration"
172
49
  """
173
- codespell dictionaries.
174
-
175
- List of argument that will be added to the codespell command
50
+ K8s configuration.
176
51
 
177
52
  default:
178
- - clear
179
- - rare
180
- - informal
181
- - code
182
- - names
183
- - en-GB_to_en-US
184
- """
185
-
186
- arguments: list[str]
53
+ {}
187
54
  """
188
- codespell arguments.
189
55
 
190
- List of argument that will be added to the codespell command
191
-
192
- default:
193
- - --quiet-level=2
194
- - --check-filenames
195
- - --ignore-words-list=ro
56
+ dpkg: "Dpkg"
196
57
  """
58
+ dpkg.
197
59
 
198
- ignore_re: list[str]
199
- r"""
200
- codespell ignore regular expression.
201
-
202
- List of regular expression that should be ignored
203
-
204
- default:
205
- - (.*/)?poetry\.lock
206
- - (.*/)?package-lock\.json
60
+ The configuration use t manage the dpkg packages
207
61
  """
208
62
 
209
63
 
210
- # | configuration.
211
- # |
212
- # | C2C CI utils configuration file
213
- Configuration = TypedDict(
214
- "Configuration",
215
- {
216
- # | Print versions.
217
- # |
218
- # | The print versions configuration
219
- "print_versions": "PrintVersions",
220
- # | Codespell.
221
- # |
222
- # | The codespell check configuration
223
- "codespell": "Codespell",
224
- # | Audit.
225
- # |
226
- # | The audit configuration
227
- # |
228
- # | default:
229
- # | snyk: true
230
- "audit": "Audit",
231
- # | Pull request checks.
232
- # |
233
- # | The PR check configuration
234
- # |
235
- # | default:
236
- # | add_issue_link: true
237
- # | commits_messages: true
238
- # | commits_spell: true
239
- # | pull_request_labels: true
240
- # | pull_request_spell: true
241
- "pr-checks": "PullRequestChecks",
242
- # | Publish.
243
- # |
244
- # | The publishing configurations
245
- # |
246
- # | default:
247
- # | docker:
248
- # | images: <auto-detected>
249
- # | helm:
250
- # | folders: <auto-detected>
251
- # | versions:
252
- # | - version_tag
253
- # | pypi:
254
- # | packages: <auto-detected>
255
- # | versions:
256
- # | - version_tag
257
- "publish": "Publish",
258
- # | Version.
259
- # |
260
- # | The version configurations
261
- "version": "Version",
262
- # | K8s configuration.
263
- # |
264
- # | default:
265
- # | {}
266
- "k8s": "K8SConfiguration",
267
- # | dpkg.
268
- # |
269
- # | The configuration use t manage the dpkg packages
270
- "dpkg": "Dpkg",
271
- },
272
- total=False,
273
- )
274
-
275
-
276
64
  DB_CONFIGURATION_DEFAULT: dict[str, Any] = {}
277
65
  """ Default value of the field path 'K8s configuration db' """
278
66
 
@@ -508,48 +296,6 @@ PUBLISH_PYPI_DEFAULT: dict[str, Any] = {}
508
296
  """ Default value of the field path 'publish_pypi' """
509
297
 
510
298
 
511
- PULL_REQUEST_CHECKS_COMMITS_MESSAGES_FIRST_CAPITAL_DEFAULT = True
512
- """ Default value of the field path 'pull request checks commits messages configuration check_first_capital' """
513
-
514
-
515
- PULL_REQUEST_CHECKS_COMMITS_MESSAGES_FIXUP_DEFAULT = True
516
- """ Default value of the field path 'pull request checks commits messages configuration check_fixup' """
517
-
518
-
519
- PULL_REQUEST_CHECKS_COMMITS_MESSAGES_MIN_HEAD_LENGTH_DEFAULT = 5
520
- """ Default value of the field path 'pull request checks commits messages configuration min_head_length' """
521
-
522
-
523
- PULL_REQUEST_CHECKS_COMMITS_MESSAGES_NO_MERGE_COMMITS_DEFAULT = True
524
- """ Default value of the field path 'pull request checks commits messages configuration check_no_merge_commits' """
525
-
526
-
527
- PULL_REQUEST_CHECKS_COMMITS_MESSAGES_NO_OWN_REVERT_DEFAULT = True
528
- """ Default value of the field path 'pull request checks commits messages configuration check_no_own_revert' """
529
-
530
-
531
- PULL_REQUEST_CHECKS_COMMITS_MESSAGES_ONLY_HEAD_DEFAULT = True
532
- """ Default value of the field path 'pull request checks commits spelling configuration only_head' """
533
-
534
-
535
- PULL_REQUEST_CHECKS_COMMITS_MESSAGES_SQUASH_DEFAULT = True
536
- """ Default value of the field path 'pull request checks commits messages configuration check_squash' """
537
-
538
-
539
- PULL_REQUEST_CHECKS_DEFAULT = {
540
- "commits_messages": True,
541
- "commits_spell": True,
542
- "pull_request_spell": True,
543
- "pull_request_labels": True,
544
- "add_issue_link": True,
545
- }
546
- """ Default value of the field path 'configuration pr-checks' """
547
-
548
-
549
- PULL_REQUEST_CHECKS_ONLY_HEAD_DEFAULT = True
550
- """ Default value of the field path 'pull request checks pull request spelling configuration only_head' """
551
-
552
-
553
299
  class PrintVersions(TypedDict, total=False):
554
300
  """
555
301
  Print versions.
@@ -894,190 +640,6 @@ class PublishPypiPackage(TypedDict, total=False):
894
640
  """ The command used to do the build """
895
641
 
896
642
 
897
- class PullRequestChecks(TypedDict, total=False):
898
- """
899
- Pull request checks.
900
-
901
- The PR check configuration
902
-
903
- default:
904
- add_issue_link: true
905
- commits_messages: true
906
- commits_spell: true
907
- pull_request_labels: true
908
- pull_request_spell: true
909
- """
910
-
911
- commits_messages: "PullRequestChecksCommitsMessages"
912
- """
913
- pull request checks commits messages.
914
-
915
- Check the pull request commits messages
916
-
917
- Aggregation type: oneOf
918
- Subtype: "PullRequestChecksCommitsMessagesConfiguration"
919
- """
920
-
921
- commits_spell: "PullRequestChecksCommitsSpelling"
922
- """
923
- pull request checks commits spelling.
924
-
925
- Aggregation type: oneOf
926
- Subtype: "PullRequestChecksCommitsSpellingConfiguration"
927
- """
928
-
929
- pull_request_spell: "PullRequestChecksPullRequestSpelling"
930
- """
931
- pull request checks pull request spelling.
932
-
933
- Aggregation type: oneOf
934
- Subtype: "PullRequestChecksPullRequestSpellingConfiguration"
935
- """
936
-
937
- pull_request_labels: "PullRequestChecksRequestLabels"
938
- """
939
- pull request checks request labels.
940
-
941
- According the create changelog configuration
942
- """
943
-
944
- add_issue_link: "PullRequestChecksAddIssueLink"
945
- """ pull request checks add issue link. """
946
-
947
-
948
- PullRequestChecksAddIssueLink = bool
949
- """ pull request checks add issue link. """
950
-
951
-
952
- PullRequestChecksCommitsMessages = Union["PullRequestChecksCommitsMessagesConfiguration", bool]
953
- """
954
- pull request checks commits messages.
955
-
956
- Check the pull request commits messages
957
-
958
- Aggregation type: oneOf
959
- Subtype: "PullRequestChecksCommitsMessagesConfiguration"
960
- """
961
-
962
-
963
- class PullRequestChecksCommitsMessagesConfiguration(TypedDict, total=False):
964
- """
965
- pull request checks commits messages configuration.
966
-
967
- The commit message check configuration
968
- """
969
-
970
- check_fixup: bool
971
- """
972
- pull request checks commits messages fixup.
973
-
974
- Check that we don't have one fixup commit in the pull request
975
-
976
- default: True
977
- """
978
-
979
- check_squash: bool
980
- """
981
- pull request checks commits messages squash.
982
-
983
- Check that we don't have one squash commit in the pull request
984
-
985
- default: True
986
- """
987
-
988
- check_first_capital: bool
989
- """
990
- pull request checks commits messages first capital.
991
-
992
- Check that the all the commits message starts with a capital letter
993
-
994
- default: True
995
- """
996
-
997
- min_head_length: int
998
- """
999
- pull request checks commits messages min head length.
1000
-
1001
- Check that the commits message head is at least this long, use 0 to disable
1002
-
1003
- default: 5
1004
- """
1005
-
1006
- check_no_merge_commits: bool
1007
- """
1008
- pull request checks commits messages no merge commits.
1009
-
1010
- Check that we don't have merge commits in the pull request
1011
-
1012
- default: True
1013
- """
1014
-
1015
- check_no_own_revert: bool
1016
- """
1017
- pull request checks commits messages no own revert.
1018
-
1019
- Check that we don't have reverted one of our commits in the pull request
1020
-
1021
- default: True
1022
- """
1023
-
1024
-
1025
- PullRequestChecksCommitsSpelling = Union["PullRequestChecksCommitsSpellingConfiguration", bool]
1026
- """
1027
- pull request checks commits spelling.
1028
-
1029
- Aggregation type: oneOf
1030
- Subtype: "PullRequestChecksCommitsSpellingConfiguration"
1031
- """
1032
-
1033
-
1034
- class PullRequestChecksCommitsSpellingConfiguration(TypedDict, total=False):
1035
- """
1036
- pull request checks commits spelling configuration.
1037
-
1038
- Configuration used to check the spelling of the commits
1039
- """
1040
-
1041
- only_head: bool
1042
- """
1043
- pull request checks commits messages only head.
1044
-
1045
- default: True
1046
- """
1047
-
1048
-
1049
- PullRequestChecksPullRequestSpelling = Union["PullRequestChecksPullRequestSpellingConfiguration", bool]
1050
- """
1051
- pull request checks pull request spelling.
1052
-
1053
- Aggregation type: oneOf
1054
- Subtype: "PullRequestChecksPullRequestSpellingConfiguration"
1055
- """
1056
-
1057
-
1058
- class PullRequestChecksPullRequestSpellingConfiguration(TypedDict, total=False):
1059
- """
1060
- pull request checks pull request spelling configuration.
1061
-
1062
- Configuration used to check the spelling of the title and body of the pull request
1063
- """
1064
-
1065
- only_head: bool
1066
- """
1067
- pull request checks only head.
1068
-
1069
- default: True
1070
- """
1071
-
1072
-
1073
- PullRequestChecksRequestLabels = bool
1074
- """
1075
- pull request checks request labels.
1076
-
1077
- According the create changelog configuration
1078
- """
1079
-
1080
-
1081
643
  class Version(TypedDict, total=False):
1082
644
  """
1083
645
  Version.
c2cciutils/publish.py CHANGED
@@ -10,11 +10,11 @@ import pickle # nosec
10
10
  import re
11
11
  import subprocess # nosec
12
12
  import sys
13
+ import tomllib
13
14
  import uuid
14
15
  from typing import Optional
15
16
 
16
17
  import ruamel.yaml
17
- import tomlkit
18
18
  from google.auth.transport.requests import Request
19
19
  from google.oauth2.credentials import Credentials
20
20
  from google_auth_oauthlib.flow import InstalledAppFlow
@@ -289,8 +289,8 @@ def pip(
289
289
  if os.path.exists(os.path.join(cwd, "pyproject.toml")):
290
290
  use_poetry = False
291
291
  if "build_command" not in package:
292
- with open(os.path.join(cwd, "pyproject.toml"), encoding="utf-8") as project_file:
293
- pyproject = tomlkit.load(project_file)
292
+ with open(os.path.join(cwd, "pyproject.toml"), "rb") as project_file:
293
+ pyproject = tomllib.load(project_file)
294
294
  re_splitter = re.compile(r"[<>=]+")
295
295
  for requirement in pyproject.get("build-system", {}).get("requires", []):
296
296
  requirement_split = re_splitter.split(requirement)