PyFunceble-dev 4.2.16__py3-none-any.whl → 4.2.18__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.
@@ -55,7 +55,7 @@ License:
55
55
  import datetime
56
56
  import functools
57
57
  import secrets
58
- from typing import Any, Optional
58
+ from typing import Any, List, Optional
59
59
 
60
60
  import PyFunceble.cli.continuous_integration.exceptions
61
61
  import PyFunceble.facility
@@ -105,6 +105,8 @@ class ContinuousIntegrationBase:
105
105
  STD_END_COMMIT_MESSAGE: str = "PyFunceble - Results"
106
106
  STD_MAX_EXEC_MINUTES: int = 15
107
107
 
108
+ COMMON_CI_SKIP_MARKER: List[str] = ["[skip ci]", "[ci skip]", "[no ci]"]
109
+
108
110
  end_commit_marker: str = "[ci skip]"
109
111
 
110
112
  _authorized: bool = False
@@ -347,6 +349,17 @@ class ContinuousIntegrationBase:
347
349
 
348
350
  self._authorized = value
349
351
 
352
+ @property
353
+ def bypass_bypass(self) -> bool:
354
+ """
355
+ Provides the currently state of the :code:`_bypass_bypass` attribute.
356
+ """
357
+
358
+ return (
359
+ EnvironmentVariableHelper("PYFUNCEBLE_BYPASS_BYPASS").get_value()
360
+ is not None
361
+ )
362
+
350
363
  def set_authorized(self, value: bool) -> "ContinuousIntegrationBase":
351
364
  """
352
365
  Sets the value of the :code:`authorized` attribute.
@@ -1136,12 +1149,15 @@ class ContinuousIntegrationBase:
1136
1149
  raise PyFunceble.cli.continuous_integration.exceptions.StopExecution()
1137
1150
 
1138
1151
  @execute_if_authorized(None)
1139
- def apply_end_commit(self) -> None:
1152
+ def apply_end_commit(self, *, push: bool = True) -> None:
1140
1153
  """
1141
1154
  Apply the "end" commit and push.
1142
1155
 
1143
1156
  Side effect:
1144
1157
  It runs the declared command to execute.
1158
+
1159
+ :param push:
1160
+ Whether we should push the changes or not.
1145
1161
  """
1146
1162
 
1147
1163
  PyFunceble.facility.Logger.info(
@@ -1189,18 +1205,19 @@ class ContinuousIntegrationBase:
1189
1205
  "Finished to prepare and apply final GIT commit."
1190
1206
  )
1191
1207
 
1192
- if self.git_distribution_branch != self.git_branch:
1193
- self.push_changes(branch_to_use)
1194
- else:
1208
+ if push:
1195
1209
  self.push_changes(branch_to_use)
1196
1210
 
1197
1211
  @execute_if_authorized(None)
1198
- def apply_commit(self) -> None:
1212
+ def apply_commit(self, *, push: bool = True) -> None:
1199
1213
  """
1200
1214
  Apply the commit and push.
1201
1215
 
1202
1216
  Side effect:
1203
1217
  It runs the declared command to execute.
1218
+
1219
+ :param push:
1220
+ Whether we should push the changes or not.
1204
1221
  """
1205
1222
 
1206
1223
  PyFunceble.facility.Logger.info("Started to prepare and apply GIT commit.")
@@ -1234,7 +1251,8 @@ class ContinuousIntegrationBase:
1234
1251
 
1235
1252
  PyFunceble.facility.Logger.info("Finished to prepare and apply GIT commit.")
1236
1253
 
1237
- self.push_changes(self.git_branch)
1254
+ if push:
1255
+ self.push_changes(self.git_branch)
1238
1256
 
1239
1257
  @execute_if_authorized(None)
1240
1258
  def bypass(self) -> None:
@@ -1243,13 +1261,24 @@ class ContinuousIntegrationBase:
1243
1261
 
1244
1262
  - :code:`[PyFunceble skip]` (case insensitive)
1245
1263
  - :code:`[PyFunceble-skip]` (case insensitive)
1264
+ - :code:`[skip-PyFunceble]` (case insensitive)
1265
+ - :code:`[skip PyFunceble]` (case insensitive)
1246
1266
  - :attr:`~PyFunceble.cli.continuous_integration.base.end_commit_marker`
1267
+ - :attr:`~PyFunceble.cli.continuous_integration.base.COMMON_CI_SKIP_MARKER`
1247
1268
  """
1248
1269
 
1249
- our_marker = ["[pyfunceble skip]", "[pyfunceble-skip]", self.end_commit_marker]
1270
+ our_marker = self.COMMON_CI_SKIP_MARKER + [
1271
+ "[pyfunceble skip]",
1272
+ "[pyfunceble-skip]",
1273
+ "[skip-pyfunceble]",
1274
+ "[skip pyfunceble]",
1275
+ self.end_commit_marker,
1276
+ ]
1250
1277
  latest_commit = CommandHelper("git log -1").execute().lower()
1251
1278
 
1252
- if any(x.lower() in latest_commit for x in our_marker):
1279
+ if not self.bypass_bypass and any(
1280
+ x.lower() in latest_commit for x in our_marker
1281
+ ):
1253
1282
  PyFunceble.facility.Logger.info(
1254
1283
  "Bypass marker caught. Saving and stopping process."
1255
1284
  )
@@ -543,8 +543,10 @@ class CollectionQueryTool:
543
543
  PyFunceble.facility.Logger.info("Finished to pull next contract")
544
544
 
545
545
  yield response_json
546
+ else:
547
+ response_json = []
546
548
  except (requests.RequestException, json.decoder.JSONDecodeError):
547
- response_json = [{"subject": {}}]
549
+ response_json = []
548
550
 
549
551
  PyFunceble.facility.Logger.debug(
550
552
  "Failed to pull next contract. Response: %r", response_json
PyFunceble/storage.py CHANGED
@@ -61,7 +61,7 @@ from dotenv import load_dotenv
61
61
  from PyFunceble.storage_facility import get_config_directory
62
62
 
63
63
  PROJECT_NAME: str = "PyFunceble"
64
- PROJECT_VERSION: str = "4.2.16.dev (Blue Duckling: Ixora)"
64
+ PROJECT_VERSION: str = "4.2.18.dev (Blue Duckling: Ixora)"
65
65
 
66
66
  DISTRIBUTED_CONFIGURATION_FILENAME: str = ".PyFunceble_production.yaml"
67
67
  DISTRIBUTED_DIR_STRUCTURE_FILENAME: str = "dir_structure_production.json"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyFunceble-dev
3
- Version: 4.2.16
3
+ Version: 4.2.18
4
4
  Summary: The tool to check the availability or syntax of domain, IP or URL.
5
5
  Home-page: https://github.com/funilrys/PyFunceble
6
6
  Author: funilrys
@@ -22,72 +22,72 @@ Classifier: License :: OSI Approved
22
22
  Requires-Python: >=3.8, <4
23
23
  License-File: LICENSE
24
24
  Requires-Dist: domain2idna ~=1.12.0
25
- Requires-Dist: setuptools >=65.5.1
25
+ Requires-Dist: PyMySQL
26
+ Requires-Dist: colorama
26
27
  Requires-Dist: python-dotenv
27
- Requires-Dist: cryptography ~=42.0
28
- Requires-Dist: inflection
28
+ Requires-Dist: python-box[all] ~=6.0.0
29
29
  Requires-Dist: PyYAML
30
- Requires-Dist: alembic
31
- Requires-Dist: colorama
30
+ Requires-Dist: dnspython[doh] ~=2.6.0
31
+ Requires-Dist: setuptools >=65.5.1
32
32
  Requires-Dist: shtab
33
- Requires-Dist: packaging
34
- Requires-Dist: python-box[all] ~=6.0.0
35
33
  Requires-Dist: SQLAlchemy ~=2.0
36
- Requires-Dist: dnspython[doh] ~=2.6.0
37
- Requires-Dist: PyMySQL
34
+ Requires-Dist: cryptography ~=42.0
35
+ Requires-Dist: inflection
36
+ Requires-Dist: packaging
37
+ Requires-Dist: alembic
38
38
  Requires-Dist: requests[socks] <3
39
39
  Provides-Extra: dev
40
- Requires-Dist: black ; extra == 'dev'
40
+ Requires-Dist: flake8 ; extra == 'dev'
41
41
  Requires-Dist: isort ; extra == 'dev'
42
42
  Requires-Dist: pylint ; extra == 'dev'
43
- Requires-Dist: flake8 ; extra == 'dev'
43
+ Requires-Dist: black ; extra == 'dev'
44
44
  Provides-Extra: docs
45
- Requires-Dist: Pygments >=2.0 ; extra == 'docs'
46
45
  Requires-Dist: alabaster <0.8,>=0.7 ; extra == 'docs'
47
- Requires-Dist: sphinx-rtd-theme ; extra == 'docs'
48
46
  Requires-Dist: sphinx >=3.4.3 ; extra == 'docs'
47
+ Requires-Dist: Pygments >=2.0 ; extra == 'docs'
48
+ Requires-Dist: sphinx-rtd-theme ; extra == 'docs'
49
49
  Provides-Extra: full
50
- Requires-Dist: python-dotenv ; extra == 'full'
51
- Requires-Dist: inflection ; extra == 'full'
52
- Requires-Dist: alembic ; extra == 'full'
53
- Requires-Dist: colorama ; extra == 'full'
54
- Requires-Dist: tox ; extra == 'full'
55
- Requires-Dist: SQLAlchemy ~=2.0 ; extra == 'full'
56
- Requires-Dist: dnspython[doh] ~=2.6.0 ; extra == 'full'
57
50
  Requires-Dist: alabaster <0.8,>=0.7 ; extra == 'full'
58
- Requires-Dist: PyYAML ; extra == 'full'
59
- Requires-Dist: isort ; extra == 'full'
51
+ Requires-Dist: PyMySQL ; extra == 'full'
60
52
  Requires-Dist: python-box[all] ~=6.0.0 ; extra == 'full'
53
+ Requires-Dist: PyYAML ; extra == 'full'
54
+ Requires-Dist: setuptools >=65.5.1 ; extra == 'full'
55
+ Requires-Dist: packaging ; extra == 'full'
56
+ Requires-Dist: alembic ; extra == 'full'
61
57
  Requires-Dist: black ; extra == 'full'
62
- Requires-Dist: Pygments >=2.0 ; extra == 'full'
63
58
  Requires-Dist: domain2idna ~=1.12.0 ; extra == 'full'
64
- Requires-Dist: setuptools >=65.5.1 ; extra == 'full'
59
+ Requires-Dist: flake8 ; extra == 'full'
60
+ Requires-Dist: python-dotenv ; extra == 'full'
61
+ Requires-Dist: tox ; extra == 'full'
62
+ Requires-Dist: SQLAlchemy ~=2.0 ; extra == 'full'
65
63
  Requires-Dist: sphinx-rtd-theme ; extra == 'full'
66
- Requires-Dist: sphinx >=3.4.3 ; extra == 'full'
67
- Requires-Dist: coverage ; extra == 'full'
68
64
  Requires-Dist: cryptography ~=42.0 ; extra == 'full'
69
- Requires-Dist: shtab ; extra == 'full'
70
- Requires-Dist: packaging ; extra == 'full'
65
+ Requires-Dist: isort ; extra == 'full'
71
66
  Requires-Dist: pylint ; extra == 'full'
72
- Requires-Dist: flake8 ; extra == 'full'
73
- Requires-Dist: PyMySQL ; extra == 'full'
67
+ Requires-Dist: inflection ; extra == 'full'
68
+ Requires-Dist: sphinx >=3.4.3 ; extra == 'full'
74
69
  Requires-Dist: requests[socks] <3 ; extra == 'full'
70
+ Requires-Dist: colorama ; extra == 'full'
71
+ Requires-Dist: coverage ; extra == 'full'
72
+ Requires-Dist: dnspython[doh] ~=2.6.0 ; extra == 'full'
73
+ Requires-Dist: Pygments >=2.0 ; extra == 'full'
74
+ Requires-Dist: shtab ; extra == 'full'
75
75
  Provides-Extra: psql
76
76
  Requires-Dist: domain2idna ~=1.12.0 ; extra == 'psql'
77
- Requires-Dist: setuptools >=65.5.1 ; extra == 'psql'
77
+ Requires-Dist: PyMySQL ; extra == 'psql'
78
+ Requires-Dist: colorama ; extra == 'psql'
78
79
  Requires-Dist: python-dotenv ; extra == 'psql'
79
- Requires-Dist: cryptography ~=42.0 ; extra == 'psql'
80
- Requires-Dist: inflection ; extra == 'psql'
80
+ Requires-Dist: python-box[all] ~=6.0.0 ; extra == 'psql'
81
81
  Requires-Dist: PyYAML ; extra == 'psql'
82
- Requires-Dist: alembic ; extra == 'psql'
83
- Requires-Dist: colorama ; extra == 'psql'
82
+ Requires-Dist: dnspython[doh] ~=2.6.0 ; extra == 'psql'
83
+ Requires-Dist: setuptools >=65.5.1 ; extra == 'psql'
84
84
  Requires-Dist: shtab ; extra == 'psql'
85
- Requires-Dist: packaging ; extra == 'psql'
86
- Requires-Dist: python-box[all] ~=6.0.0 ; extra == 'psql'
87
85
  Requires-Dist: SQLAlchemy ~=2.0 ; extra == 'psql'
86
+ Requires-Dist: cryptography ~=42.0 ; extra == 'psql'
87
+ Requires-Dist: inflection ; extra == 'psql'
88
+ Requires-Dist: packaging ; extra == 'psql'
89
+ Requires-Dist: alembic ; extra == 'psql'
88
90
  Requires-Dist: psycopg2 ; extra == 'psql'
89
- Requires-Dist: dnspython[doh] ~=2.6.0 ; extra == 'psql'
90
- Requires-Dist: PyMySQL ; extra == 'psql'
91
91
  Requires-Dist: requests[socks] <3 ; extra == 'psql'
92
92
  Provides-Extra: test
93
93
  Requires-Dist: tox ; extra == 'test'
@@ -4,7 +4,7 @@ PyFunceble/facility.py,sha256=zwQ-5JFtBr-n0uahkCLIheXNADX34A3uzVcEdFTWT8o,2640
4
4
  PyFunceble/factory.py,sha256=EIMObS1gaWpGamlqIoLoHAg9xpcXdfKEnDGe31O9WIw,2590
5
5
  PyFunceble/logger.py,sha256=8ex6ccGeV8sXtF6MMZsIfCAv2ZJmwKrvRQZd_4cIDCM,16829
6
6
  PyFunceble/sessions.py,sha256=lmqepbwtCCU8KVBNZ-XBo6kFFh5cpCKPgT_GegiLhk8,2582
7
- PyFunceble/storage.py,sha256=116CzdF0_BxHeNuRx9lhKwdzPyToEa7gvEQlaGomQJc,6299
7
+ PyFunceble/storage.py,sha256=yREI2fl8F_nRi1P6ZIzA2wde9sW_z3xwroH3sUcH4us,6299
8
8
  PyFunceble/storage_facility.py,sha256=dnjRkVbH3kFtbWlX7evPyNT6rfo7nGCd4oNC9AajWtY,4833
9
9
  PyFunceble/checker/__init__.py,sha256=aiQBstQTw1nXwZ3IGxf_k3CofRbbtFB4WAu_ezvmi_0,2444
10
10
  PyFunceble/checker/base.py,sha256=iFNezdMIpfx6kwEaaDzniP7erPEbHWsBsIIMG96MAEY,13677
@@ -58,7 +58,7 @@ PyFunceble/cli/file_preloader.py,sha256=-aAFw9n0BWNM2QtEyiYliYMs1h7iHH61_zMAby9F
58
58
  PyFunceble/cli/storage.py,sha256=aK3r9-WTgjk-Ks3Q9ESlCm2dIQj9Ol1lCXgopDquhTQ,11910
59
59
  PyFunceble/cli/storage_facility.py,sha256=e5kg74syMhVepblIDMCYJtmSlBCPMrUnemLTqur094A,3170
60
60
  PyFunceble/cli/continuous_integration/__init__.py,sha256=gw-QNJQJ0ExuuqBljnNAj1zj8sWRDZ1dY4BguJ4s1Z0,2515
61
- PyFunceble/cli/continuous_integration/base.py,sha256=Y-xOTL01ry1G6GgjIM6KVCy-pvOrky0pyd33h-UK72o,38948
61
+ PyFunceble/cli/continuous_integration/base.py,sha256=njteIKUVjOErVJfgB4lFa3zjtTDgMuClD4rlqrTFcTk,39830
62
62
  PyFunceble/cli/continuous_integration/exceptions.py,sha256=398w9PjMAgVgkRdvKKR7LjGKWsLnv7B2SLjMNlSFyxA,3735
63
63
  PyFunceble/cli/continuous_integration/github_actions.py,sha256=socfgqyQmM4c-3cRVSuYxc-KaUpnJWUTv3no2r961Hg,3969
64
64
  PyFunceble/cli/continuous_integration/gitlab_ci.py,sha256=zm2Elx2MbrQjU_zeWaaERb23xdNaUedoElIauhjoYUA,4285
@@ -242,7 +242,7 @@ PyFunceble/helpers/list.py,sha256=42SX78D6cbUbSctxBZLE-kBzJmBQ3iZTDQiB7Ficfkk,50
242
242
  PyFunceble/helpers/merge.py,sha256=qU9z5mUGxNEKv2fjPokSU8B-HMC62izEIk8LZQU9duE,6060
243
243
  PyFunceble/helpers/regex.py,sha256=ySrV2FaKJPVL4glaA1jx2_1Jq_5ydup86FWrRsfB7eo,6937
244
244
  PyFunceble/query/__init__.py,sha256=OrSc30ozkbsgboBkO3IWmsHZS3AxhnvfQuJLZlnbhoI,2514
245
- PyFunceble/query/collection.py,sha256=DRWG0bOzMZoL62gkcXNzxC5xmEIjptEruCnk2OEcVqc,25835
245
+ PyFunceble/query/collection.py,sha256=xqP4-fA9lYEMtD58wfrqCd2t_gzNVVkpjz4YoMPvqsE,25873
246
246
  PyFunceble/query/http_status_code.py,sha256=Li6uWA-GLJ0Hj_dKz527w4i4gLX78W-AC87MeVdDJdI,11777
247
247
  PyFunceble/query/dns/__init__.py,sha256=Q0M83ZMZf7wJMgTVFmnXyfLb8XNdBHe2gTWs2dHTpK4,2479
248
248
  PyFunceble/query/dns/nameserver.py,sha256=ogE6jXBOy94f36KtUx4y1kB_G2H_X65SJWTzuaTbVDI,9796
@@ -274,9 +274,9 @@ PyFunceble/utils/__init__.py,sha256=l6Mz-0GPHPCSPXuNFtHbnjD0fYI5BRr-RwDbVgAUdmI,
274
274
  PyFunceble/utils/platform.py,sha256=px_pauOFMCEtc9ST0vYZvDWDhcWNP1S595iKK4P3n7c,3920
275
275
  PyFunceble/utils/profile.py,sha256=Fp5yntq5Ys5eQe-FbQsUpx4ydxDxVYW3ACn-3KcTk_A,4566
276
276
  PyFunceble/utils/version.py,sha256=Tb3DWk96Xl6WbdDa2t3QQGBBDcnKDNJV_iFWMVQfCoc,8330
277
- PyFunceble_dev-4.2.16.dist-info/LICENSE,sha256=JBG6UfPnf3940AtwZB6vwAK6YH82Eo6nzMVnjGqopF0,10796
278
- PyFunceble_dev-4.2.16.dist-info/METADATA,sha256=FEgoO8dvCsFUw7o5fn2f3uojXps9j_cs3DS4afvZlIo,15119
279
- PyFunceble_dev-4.2.16.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
280
- PyFunceble_dev-4.2.16.dist-info/entry_points.txt,sha256=Ic1suwopOi_XTgiQi2ErtpY5xT3R8EFMI6B_ONDuR9E,201
281
- PyFunceble_dev-4.2.16.dist-info/top_level.txt,sha256=J7GBKIiNYv93m1AxLy8_gr6ExXyZbMmCVXHMQBTUq2Y,11
282
- PyFunceble_dev-4.2.16.dist-info/RECORD,,
277
+ PyFunceble_dev-4.2.18.dist-info/LICENSE,sha256=JBG6UfPnf3940AtwZB6vwAK6YH82Eo6nzMVnjGqopF0,10796
278
+ PyFunceble_dev-4.2.18.dist-info/METADATA,sha256=7pEREuNy4Wn6f2b51CIWvzVKp6vEQjjXU1UFpkrvxS8,15119
279
+ PyFunceble_dev-4.2.18.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
280
+ PyFunceble_dev-4.2.18.dist-info/entry_points.txt,sha256=Ic1suwopOi_XTgiQi2ErtpY5xT3R8EFMI6B_ONDuR9E,201
281
+ PyFunceble_dev-4.2.18.dist-info/top_level.txt,sha256=J7GBKIiNYv93m1AxLy8_gr6ExXyZbMmCVXHMQBTUq2Y,11
282
+ PyFunceble_dev-4.2.18.dist-info/RECORD,,