backlogops 1.4__tar.gz → 1.6__tar.gz

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.
Files changed (81) hide show
  1. {backlogops-1.4 → backlogops-1.6}/PKG-INFO +12 -11
  2. {backlogops-1.4 → backlogops-1.6}/README_pypi.md +3 -3
  3. {backlogops-1.4 → backlogops-1.6}/backlogops.egg-info/PKG-INFO +12 -11
  4. backlogops-1.6/backlogops.egg-info/requires.txt +8 -0
  5. {backlogops-1.4 → backlogops-1.6}/pyproject.toml +1 -0
  6. {backlogops-1.4 → backlogops-1.6}/setup.py +8 -8
  7. {backlogops-1.4 → backlogops-1.6}/src/backlogops/available_teams_config.py +44 -20
  8. {backlogops-1.4 → backlogops-1.6}/src/backlogops/backlog_ops_config.py +20 -6
  9. {backlogops-1.4 → backlogops-1.6}/src/backlogops/blo_version_reporter.py +5 -3
  10. {backlogops-1.4 → backlogops-1.6}/src/backlogops/config_editing.py +14 -11
  11. {backlogops-1.4 → backlogops-1.6}/src/backlogops/config_file_io.py +7 -2
  12. {backlogops-1.4 → backlogops-1.6}/src/backlogops/default_story_points.py +22 -4
  13. {backlogops-1.4 → backlogops-1.6}/src/backlogops/io_config.py +43 -25
  14. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_io_config.py +27 -6
  15. {backlogops-1.4 → backlogops-1.6}/src/backlogops/level_defaults.py +11 -2
  16. {backlogops-1.4 → backlogops-1.6}/src/backlogops/remaining_time_config.py +22 -4
  17. backlogops-1.4/backlogops.egg-info/requires.txt +0 -8
  18. {backlogops-1.4 → backlogops-1.6}/LICENSE.txt +0 -0
  19. {backlogops-1.4 → backlogops-1.6}/backlogops.egg-info/SOURCES.txt +0 -0
  20. {backlogops-1.4 → backlogops-1.6}/backlogops.egg-info/dependency_links.txt +0 -0
  21. {backlogops-1.4 → backlogops-1.6}/backlogops.egg-info/top_level.txt +0 -0
  22. {backlogops-1.4 → backlogops-1.6}/setup.cfg +0 -0
  23. {backlogops-1.4 → backlogops-1.6}/src/backlogops/__init__.py +0 -0
  24. {backlogops-1.4 → backlogops-1.6}/src/backlogops/apply_format_rules.py +0 -0
  25. {backlogops-1.4 → backlogops-1.6}/src/backlogops/available_teams.py +0 -0
  26. {backlogops-1.4 → backlogops-1.6}/src/backlogops/backlog.py +0 -0
  27. {backlogops-1.4 → backlogops-1.6}/src/backlogops/backlog_helpers.py +0 -0
  28. {backlogops-1.4 → backlogops-1.6}/src/backlogops/backlog_in_release_order.py +0 -0
  29. {backlogops-1.4 → backlogops-1.6}/src/backlogops/backlog_ops_wizard.py +0 -0
  30. {backlogops-1.4 → backlogops-1.6}/src/backlogops/backlog_releases.py +0 -0
  31. {backlogops-1.4 → backlogops-1.6}/src/backlogops/backlog_releases_io.py +0 -0
  32. {backlogops-1.4 → backlogops-1.6}/src/backlogops/config_descriptions.py +0 -0
  33. {backlogops-1.4 → backlogops-1.6}/src/backlogops/date_ranges.py +0 -0
  34. {backlogops-1.4 → backlogops-1.6}/src/backlogops/demo_backlog.py +0 -0
  35. {backlogops-1.4 → backlogops-1.6}/src/backlogops/duration_text.py +0 -0
  36. {backlogops-1.4 → backlogops-1.6}/src/backlogops/estimate_ready_date.py +0 -0
  37. {backlogops-1.4 → backlogops-1.6}/src/backlogops/estimate_rt_ready_date.py +0 -0
  38. {backlogops-1.4 → backlogops-1.6}/src/backlogops/estimate_wizard.py +0 -0
  39. {backlogops-1.4 → backlogops-1.6}/src/backlogops/format_rules.py +0 -0
  40. {backlogops-1.4 → backlogops-1.6}/src/backlogops/io_preset_wizard.py +0 -0
  41. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_connect.py +0 -0
  42. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_field_json.py +0 -0
  43. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_order_releases.py +0 -0
  44. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_rank_backlog.py +0 -0
  45. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_rank_by_keys.py +0 -0
  46. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_rank_move_keys.py +0 -0
  47. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_read.py +0 -0
  48. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_rename_releases.py +0 -0
  49. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_search.py +0 -0
  50. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_token.py +0 -0
  51. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_update_backlog.py +0 -0
  52. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_update_releases.py +0 -0
  53. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_wizard.py +0 -0
  54. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_write.py +0 -0
  55. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_write_fields.py +0 -0
  56. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_write_format.py +0 -0
  57. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_write_releases.py +0 -0
  58. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_write_status.py +0 -0
  59. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_write_time.py +0 -0
  60. {backlogops-1.4 → backlogops-1.6}/src/backlogops/jira_write_types.py +0 -0
  61. {backlogops-1.4 → backlogops-1.6}/src/backlogops/key_list_io.py +0 -0
  62. {backlogops-1.4 → backlogops-1.6}/src/backlogops/levels.py +0 -0
  63. {backlogops-1.4 → backlogops-1.6}/src/backlogops/move_keys_first.py +0 -0
  64. {backlogops-1.4 → backlogops-1.6}/src/backlogops/name_list_io.py +0 -0
  65. {backlogops-1.4 → backlogops-1.6}/src/backlogops/no_text_io.py +0 -0
  66. {backlogops-1.4 → backlogops-1.6}/src/backlogops/order_by_dependencies.py +0 -0
  67. {backlogops-1.4 → backlogops-1.6}/src/backlogops/person.py +0 -0
  68. {backlogops-1.4 → backlogops-1.6}/src/backlogops/py.typed +0 -0
  69. {backlogops-1.4 → backlogops-1.6}/src/backlogops/ready_date_schedule.py +0 -0
  70. {backlogops-1.4 → backlogops-1.6}/src/backlogops/release_backlog_updates.py +0 -0
  71. {backlogops-1.4 → backlogops-1.6}/src/backlogops/release_change_io.py +0 -0
  72. {backlogops-1.4 → backlogops-1.6}/src/backlogops/releases.py +0 -0
  73. {backlogops-1.4 → backlogops-1.6}/src/backlogops/rename_list_io.py +0 -0
  74. {backlogops-1.4 → backlogops-1.6}/src/backlogops/table_create.py +0 -0
  75. {backlogops-1.4 → backlogops-1.6}/src/backlogops/table_rows.py +0 -0
  76. {backlogops-1.4 → backlogops-1.6}/src/backlogops/team.py +0 -0
  77. {backlogops-1.4 → backlogops-1.6}/src/backlogops/use_story_points.py +0 -0
  78. {backlogops-1.4 → backlogops-1.6}/src/backlogops/wizard_forms.py +0 -0
  79. {backlogops-1.4 → backlogops-1.6}/src/backlogops/wizard_helpers.py +0 -0
  80. {backlogops-1.4 → backlogops-1.6}/src/backlogops/wizard_navigator.py +0 -0
  81. {backlogops-1.4 → backlogops-1.6}/src/backlogops/work_hours.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: backlogops
3
- Version: 1.4
3
+ Version: 1.6
4
4
  Summary: Library with backlog operations.
5
5
  Author: Tom Björkholm
6
6
  Author-email: Tom Björkholm <klausuler_linnet0q@icloud.com>
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
15
  Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: 3.15
16
17
  Classifier: Operating System :: OS Independent
17
18
  Classifier: Intended Audience :: Developers
18
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
@@ -21,14 +22,14 @@ Classifier: Typing :: Typed
21
22
  Requires-Python: >=3.12
22
23
  Description-Content-Type: text/markdown
23
24
  License-File: LICENSE.txt
24
- Requires-Dist: config-as-json>=1.7
25
+ Requires-Dist: config-as-json>=1.9
25
26
  Requires-Dist: cryptography>=50.0.2
26
- Requires-Dist: jira[cli,opt]>=3.10.5
27
- Requires-Dist: tableio>=1.2
28
- Requires-Dist: tableio-cfg-json>=1.5
29
- Requires-Dist: wizard-ui-bridge[textual]>=1.4
30
- Requires-Dist: versionreporter>=0.4
31
- Requires-Dist: edit-cfg-json>=0.4.0
27
+ Requires-Dist: jira>=3.10.5
28
+ Requires-Dist: tableio>=1.3
29
+ Requires-Dist: tableio-cfg-json>=2.1
30
+ Requires-Dist: wizard-ui-bridge>=1.5
31
+ Requires-Dist: versionreporter>=0.5
32
+ Requires-Dist: edit-cfg-json>=1.1.0
32
33
  Dynamic: author
33
34
  Dynamic: license-file
34
35
  Dynamic: requires-dist
@@ -386,10 +387,10 @@ For the full set of public names see the API documentation linked above.
386
387
 
387
388
  ## Test summary
388
389
 
389
- - Test result: 2902 passed, 1 deselected in 68s (0:01:08)
390
+ - Test result: 2981 passed, 1 deselected in 80s (0:01:20)
390
391
  - No flake8 warnings.
391
392
  - No mypy errors found.
392
393
  - No pylint warnings.
393
394
  - No python layout warnings.
394
- - Built version(s): 1.4
395
- - Build and test using Python 3.14.7
395
+ - Built version(s): 1.6
396
+ - Build and test using Python 3.15.2
@@ -350,10 +350,10 @@ For the full set of public names see the API documentation linked above.
350
350
 
351
351
  ## Test summary
352
352
 
353
- - Test result: 2902 passed, 1 deselected in 68s (0:01:08)
353
+ - Test result: 2981 passed, 1 deselected in 80s (0:01:20)
354
354
  - No flake8 warnings.
355
355
  - No mypy errors found.
356
356
  - No pylint warnings.
357
357
  - No python layout warnings.
358
- - Built version(s): 1.4
359
- - Build and test using Python 3.14.7
358
+ - Built version(s): 1.6
359
+ - Build and test using Python 3.15.2
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: backlogops
3
- Version: 1.4
3
+ Version: 1.6
4
4
  Summary: Library with backlog operations.
5
5
  Author: Tom Björkholm
6
6
  Author-email: Tom Björkholm <klausuler_linnet0q@icloud.com>
@@ -13,6 +13,7 @@ Classifier: Programming Language :: Python :: 3
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
15
  Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Programming Language :: Python :: 3.15
16
17
  Classifier: Operating System :: OS Independent
17
18
  Classifier: Intended Audience :: Developers
18
19
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
@@ -21,14 +22,14 @@ Classifier: Typing :: Typed
21
22
  Requires-Python: >=3.12
22
23
  Description-Content-Type: text/markdown
23
24
  License-File: LICENSE.txt
24
- Requires-Dist: config-as-json>=1.7
25
+ Requires-Dist: config-as-json>=1.9
25
26
  Requires-Dist: cryptography>=50.0.2
26
- Requires-Dist: jira[cli,opt]>=3.10.5
27
- Requires-Dist: tableio>=1.2
28
- Requires-Dist: tableio-cfg-json>=1.5
29
- Requires-Dist: wizard-ui-bridge[textual]>=1.4
30
- Requires-Dist: versionreporter>=0.4
31
- Requires-Dist: edit-cfg-json>=0.4.0
27
+ Requires-Dist: jira>=3.10.5
28
+ Requires-Dist: tableio>=1.3
29
+ Requires-Dist: tableio-cfg-json>=2.1
30
+ Requires-Dist: wizard-ui-bridge>=1.5
31
+ Requires-Dist: versionreporter>=0.5
32
+ Requires-Dist: edit-cfg-json>=1.1.0
32
33
  Dynamic: author
33
34
  Dynamic: license-file
34
35
  Dynamic: requires-dist
@@ -386,10 +387,10 @@ For the full set of public names see the API documentation linked above.
386
387
 
387
388
  ## Test summary
388
389
 
389
- - Test result: 2902 passed, 1 deselected in 68s (0:01:08)
390
+ - Test result: 2981 passed, 1 deselected in 80s (0:01:20)
390
391
  - No flake8 warnings.
391
392
  - No mypy errors found.
392
393
  - No pylint warnings.
393
394
  - No python layout warnings.
394
- - Built version(s): 1.4
395
- - Build and test using Python 3.14.7
395
+ - Built version(s): 1.6
396
+ - Build and test using Python 3.15.2
@@ -0,0 +1,8 @@
1
+ config-as-json>=1.9
2
+ cryptography>=50.0.2
3
+ jira>=3.10.5
4
+ tableio>=1.3
5
+ tableio-cfg-json>=2.1
6
+ wizard-ui-bridge>=1.5
7
+ versionreporter>=0.5
8
+ edit-cfg-json>=1.1.0
@@ -20,6 +20,7 @@ classifiers = [
20
20
  "Programming Language :: Python :: 3.12",
21
21
  "Programming Language :: Python :: 3.13",
22
22
  "Programming Language :: Python :: 3.14",
23
+ "Programming Language :: Python :: 3.15",
23
24
  "Operating System :: OS Independent",
24
25
  "Intended Audience :: Developers",
25
26
  "Topic :: Software Development :: Libraries :: Python Modules",
@@ -5,7 +5,7 @@ from setuptools import setup
5
5
 
6
6
  setup(
7
7
  name='backlogops',
8
- version='1.4',
8
+ version='1.6',
9
9
  description='Library with backlog operations.',
10
10
  author='Tom Björkholm',
11
11
  author_email='klausuler_linnet0q@icloud.com',
@@ -14,13 +14,13 @@ setup(
14
14
  package_dir={'backlogops': 'src/backlogops'},
15
15
  package_data={'backlogops': ['src/py.typed']},
16
16
  install_requires=[
17
- 'config-as-json >= 1.7',
17
+ 'config-as-json >= 1.9',
18
18
  'cryptography >= 50.0.2',
19
- 'jira[cli,opt] >= 3.10.5',
20
- 'tableio >= 1.2',
21
- 'tableio-cfg-json >= 1.5',
22
- 'wizard-ui-bridge[textual] >= 1.4',
23
- 'versionreporter >= 0.4',
24
- 'edit-cfg-json >= 0.4.0',
19
+ 'jira >= 3.10.5',
20
+ 'tableio >= 1.3',
21
+ 'tableio-cfg-json >= 2.1',
22
+ 'wizard-ui-bridge >= 1.5',
23
+ 'versionreporter >= 0.5',
24
+ 'edit-cfg-json >= 1.1.0',
25
25
  ]
26
26
  )
@@ -118,7 +118,8 @@ class _BridgeConfig(Config):
118
118
 
119
119
  def __init__(self, from_json_data_text: Optional[str],
120
120
  from_json_filename: Optional[PathOrStr], stderr_file: TextIO,
121
- *, member_name: Optional[str] = None) -> None:
121
+ *, member_name: Optional[str] = None,
122
+ ok_to_use_defaults: bool = False) -> None:
122
123
  """Run the Config lifecycle for a bridge instance.
123
124
 
124
125
  Each bridge first creates its data class attributes, then calls
@@ -126,11 +127,14 @@ class _BridgeConfig(Config):
126
127
  ``member_name`` is the path for reaching this object from the top
127
128
  level configuration, so that a diagnostic about a value inside it
128
129
  names the whole path; it is None for a bridge that is a whole
129
- configuration file of its own.
130
+ configuration file of its own. With ``ok_to_use_defaults`` true the
131
+ JSON source may lack values, which then keep the placeholder
132
+ defaults that the bridge created.
130
133
  """
131
134
  Config.__init__(self, from_json_data_text=from_json_data_text,
132
135
  from_json_filename=from_json_filename,
133
- stderr_file=stderr_file, member_name=member_name)
136
+ stderr_file=stderr_file, member_name=member_name,
137
+ ok_to_use_defaults=ok_to_use_defaults)
134
138
 
135
139
  @staticmethod
136
140
  def _consistency() -> WholeConfigValidationStep:
@@ -159,12 +163,14 @@ class FteExceptionConfig(FteException, _BridgeConfig):
159
163
  def __init__(self, from_json_data_text: Optional[str] = None,
160
164
  from_json_filename: Optional[PathOrStr] = None,
161
165
  stderr_file: TextIO = sys.stderr, *,
162
- member_name: Optional[str] = None) -> None:
166
+ member_name: Optional[str] = None,
167
+ ok_to_use_defaults: bool = False) -> None:
163
168
  """Create placeholder defaults, then read one FTE exception."""
164
169
  FteException.__init__(self, start_date=date(2000, 1, 1),
165
170
  end_date=date(2000, 1, 1), fte=1.0)
166
171
  _BridgeConfig.__init__(self, from_json_data_text, from_json_filename,
167
- stderr_file, member_name=member_name)
172
+ stderr_file, member_name=member_name,
173
+ ok_to_use_defaults=ok_to_use_defaults)
168
174
 
169
175
  @override
170
176
  def get_validation_plan(self, stderr_file: TextIO) -> ValidationPlan:
@@ -185,13 +191,15 @@ class ExceptionWorkHoursConfig(ExceptionWorkHours, _BridgeConfig):
185
191
  def __init__(self, from_json_data_text: Optional[str] = None,
186
192
  from_json_filename: Optional[PathOrStr] = None,
187
193
  stderr_file: TextIO = sys.stderr, *,
188
- member_name: Optional[str] = None) -> None:
194
+ member_name: Optional[str] = None,
195
+ ok_to_use_defaults: bool = False) -> None:
189
196
  """Create placeholder defaults, then read one work-hours exception."""
190
197
  ExceptionWorkHours.__init__(self, start_date=date(2000, 1, 1),
191
198
  end_date=date(2000, 1, 1),
192
199
  hours_per_day=0.0)
193
200
  _BridgeConfig.__init__(self, from_json_data_text, from_json_filename,
194
- stderr_file, member_name=member_name)
201
+ stderr_file, member_name=member_name,
202
+ ok_to_use_defaults=ok_to_use_defaults)
195
203
 
196
204
  @override
197
205
  def get_validation_plan(self, stderr_file: TextIO) -> ValidationPlan:
@@ -212,11 +220,13 @@ class MembershipConfig(Membership, _BridgeConfig):
212
220
  def __init__(self, from_json_data_text: Optional[str] = None,
213
221
  from_json_filename: Optional[PathOrStr] = None,
214
222
  stderr_file: TextIO = sys.stderr, *,
215
- member_name: Optional[str] = None) -> None:
223
+ member_name: Optional[str] = None,
224
+ ok_to_use_defaults: bool = False) -> None:
216
225
  """Create placeholder defaults, then read one membership."""
217
226
  Membership.__init__(self, person_name='person')
218
227
  _BridgeConfig.__init__(self, from_json_data_text, from_json_filename,
219
- stderr_file, member_name=member_name)
228
+ stderr_file, member_name=member_name,
229
+ ok_to_use_defaults=ok_to_use_defaults)
220
230
 
221
231
  @override
222
232
  def nested_configs(self) -> NestedConfigs:
@@ -249,12 +259,14 @@ class TeamConfig(Team, _BridgeConfig):
249
259
  def __init__(self, from_json_data_text: Optional[str] = None,
250
260
  from_json_filename: Optional[PathOrStr] = None,
251
261
  stderr_file: TextIO = sys.stderr, *,
252
- member_name: Optional[str] = None) -> None:
262
+ member_name: Optional[str] = None,
263
+ ok_to_use_defaults: bool = False) -> None:
253
264
  """Create placeholder defaults, then read one team."""
254
265
  Team.__init__(self, name='team', velocity=0.0, sum_fte_at_velocity=1.0,
255
266
  sprint_length=1)
256
267
  _BridgeConfig.__init__(self, from_json_data_text, from_json_filename,
257
- stderr_file, member_name=member_name)
268
+ stderr_file, member_name=member_name,
269
+ ok_to_use_defaults=ok_to_use_defaults)
258
270
 
259
271
  @override
260
272
  def nested_configs(self) -> NestedConfigs:
@@ -280,11 +292,13 @@ class PersonConfig(Person, _BridgeConfig):
280
292
  def __init__(self, from_json_data_text: Optional[str] = None,
281
293
  from_json_filename: Optional[PathOrStr] = None,
282
294
  stderr_file: TextIO = sys.stderr, *,
283
- member_name: Optional[str] = None) -> None:
295
+ member_name: Optional[str] = None,
296
+ ok_to_use_defaults: bool = False) -> None:
284
297
  """Create placeholder defaults, then read one person."""
285
298
  Person.__init__(self, name='person')
286
299
  _BridgeConfig.__init__(self, from_json_data_text, from_json_filename,
287
- stderr_file, member_name=member_name)
300
+ stderr_file, member_name=member_name,
301
+ ok_to_use_defaults=ok_to_use_defaults)
288
302
 
289
303
  @override
290
304
  def nested_configs(self) -> NestedConfigs:
@@ -306,12 +320,14 @@ class CompanyWorkHoursConfig(CompanyWorkHours, _BridgeConfig):
306
320
  def __init__(self, from_json_data_text: Optional[str] = None,
307
321
  from_json_filename: Optional[PathOrStr] = None,
308
322
  stderr_file: TextIO = sys.stderr, *,
309
- member_name: Optional[str] = None) -> None:
323
+ member_name: Optional[str] = None,
324
+ ok_to_use_defaults: bool = False) -> None:
310
325
  """Create defaults, then read the company work hours."""
311
326
  CompanyWorkHours.__init__(self)
312
327
  self._unchecked_dicts = ['work_hours']
313
328
  _BridgeConfig.__init__(self, from_json_data_text, from_json_filename,
314
- stderr_file, member_name=member_name)
329
+ stderr_file, member_name=member_name,
330
+ ok_to_use_defaults=ok_to_use_defaults)
315
331
 
316
332
  @override
317
333
  def nested_configs(self) -> NestedConfigs:
@@ -339,12 +355,14 @@ class CompanyWorkHoursConfig(CompanyWorkHours, _BridgeConfig):
339
355
  class AvailableTeamsConfig(AvailableTeams, _BridgeConfig):
340
356
  """JSON bridge for the available workforce (persons and teams)."""
341
357
 
342
- # pylint: disable-next=super-init-not-called
358
+ # Config.__init__ fixes five of these; the workforce is the sixth.
359
+ # pylint: disable-next=too-many-arguments,super-init-not-called
343
360
  def __init__(self, *, neutral: Optional[AvailableTeams] = None,
344
361
  from_json_data_text: Optional[str] = None,
345
362
  from_json_filename: Optional[PathOrStr] = None,
346
363
  stderr_file: TextIO = sys.stderr,
347
- member_name: Optional[str] = None) -> None:
364
+ member_name: Optional[str] = None,
365
+ ok_to_use_defaults: bool = False) -> None:
348
366
  """Create the bridge from a neutral workforce or from JSON.
349
367
 
350
368
  ``AvailableTeams.__init__`` is intentionally not invoked because
@@ -356,7 +374,8 @@ class AvailableTeamsConfig(AvailableTeams, _BridgeConfig):
356
374
  neutral = AvailableTeams(persons={}, teams=[])
357
375
  Config.copy_initial_data(neutral, self)
358
376
  _BridgeConfig.__init__(self, from_json_data_text, from_json_filename,
359
- stderr_file, member_name=member_name)
377
+ stderr_file, member_name=member_name,
378
+ ok_to_use_defaults=ok_to_use_defaults)
360
379
 
361
380
  @override
362
381
  def nested_configs(self) -> NestedConfigs:
@@ -390,16 +409,21 @@ def write_available_teams(teams: AvailableTeams, filename: PathOrStr,
390
409
  config.write(to_json_filename=filename, stderr_file=stderr_file)
391
410
 
392
411
 
393
- def read_available_teams(filename: PathOrStr, stderr_file: TextIO = sys.stderr
412
+ def read_available_teams(filename: PathOrStr, stderr_file: TextIO = sys.stderr,
413
+ *, ok_to_use_defaults: bool = False
394
414
  ) -> AvailableTeamsConfig:
395
415
  """Read an available workforce from a JSON configuration file.
396
416
 
397
417
  Args:
398
418
  filename: Source JSON configuration file.
399
419
  stderr_file: Stream used for user-facing diagnostics.
420
+ ok_to_use_defaults: Whether the file may lack values, which then
421
+ keep their defaults. Running commands read strictly; an editor
422
+ may not.
400
423
 
401
424
  Returns:
402
425
  The loaded workforce. The returned object is an ``AvailableTeams``.
403
426
  """
404
427
  return AvailableTeamsConfig(from_json_filename=filename,
405
- stderr_file=stderr_file)
428
+ stderr_file=stderr_file,
429
+ ok_to_use_defaults=ok_to_use_defaults)
@@ -219,7 +219,7 @@ DEF_STATUS_INPUT_MAP: dict[str, Status] = {
219
219
  class BacklogOpsConfig(Config): # pylint: disable=too-many-instance-attributes
220
220
  """Top-level backlog-ops configuration stored as config-as-json."""
221
221
 
222
- # The library contract fixes five of these; the workforce is the one
222
+ # The library contract fixes six of these; the workforce is the one
223
223
  # argument of this application, and every one of them is keyword only.
224
224
  # pylint: disable-next=too-many-arguments
225
225
  def __init__(self, *, available_teams: Optional[AvailableTeams] = None,
@@ -227,7 +227,8 @@ class BacklogOpsConfig(Config): # pylint: disable=too-many-instance-attributes
227
227
  from_json_filename: Optional[PathOrStr] = None,
228
228
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
229
229
  stderr_file: TextIO = sys.stderr,
230
- member_name: Optional[str] = None) -> None:
230
+ member_name: Optional[str] = None,
231
+ ok_to_use_defaults: bool = False) -> None:
231
232
  """Create defaults, or read the configuration from JSON.
232
233
 
233
234
  The supplied workforce establishes the schema of the nested
@@ -239,7 +240,10 @@ class BacklogOpsConfig(Config): # pylint: disable=too-many-instance-attributes
239
240
  nested sections are created under the path of the member holding
240
241
  each of them, so that a diagnostic names the whole path even
241
242
  before any file is read; ``member_name`` is None for a whole
242
- configuration file, which is a member of nothing.
243
+ configuration file, which is a member of nothing. With
244
+ ``ok_to_use_defaults`` true the JSON source may lack values, which
245
+ then keep these defaults; :meth:`Config.kept_value_paths` tells
246
+ which.
243
247
  """
244
248
  self.available_teams: AvailableTeams = (
245
249
  AvailableTeams(persons={}, teams=[]) if available_teams is None
@@ -261,10 +265,14 @@ class BacklogOpsConfig(Config): # pylint: disable=too-many-instance-attributes
261
265
  stderr_file=stderr_file,
262
266
  member_name=member_path(member_name, 'remaining_time'))
263
267
  self._unchecked_dicts = ['status_input_map']
268
+ # Every config class forwards these arguments alike.
269
+ # pylint: disable=duplicate-code
264
270
  Config.__init__(self, from_json_data_text=from_json_data_text,
265
271
  from_json_filename=from_json_filename,
266
272
  auto_ch_hook=auto_ch_hook, stderr_file=stderr_file,
267
- member_name=member_name)
273
+ member_name=member_name,
274
+ ok_to_use_defaults=ok_to_use_defaults)
275
+ # pylint: enable=duplicate-code
268
276
 
269
277
  @override
270
278
  def _get_read_old_config(self) -> ReadOldConfiguration:
@@ -386,7 +394,9 @@ def write_backlog_ops_config(config: BacklogOpsConfig, filename: PathOrStr,
386
394
 
387
395
  def read_backlog_ops_config(filename: PathOrStr,
388
396
  stderr_file: TextIO = sys.stderr,
389
- auto_ch_hook: Optional[ConfigAutoChangeHook] = None
397
+ auto_ch_hook: Optional[
398
+ ConfigAutoChangeHook] = None, *,
399
+ ok_to_use_defaults: bool = False
390
400
  ) -> BacklogOpsConfig:
391
401
  """Read a backlog-ops configuration from a JSON configuration file.
392
402
 
@@ -395,12 +405,16 @@ def read_backlog_ops_config(filename: PathOrStr,
395
405
  stderr_file: Stream used for user-facing diagnostics.
396
406
  auto_ch_hook: Hook notified when an old file needed
397
407
  backward-compatible normalization while reading.
408
+ ok_to_use_defaults: Whether the file may lack values, which then
409
+ keep their defaults. Running commands read strictly; an editor
410
+ may not.
398
411
 
399
412
  Returns:
400
413
  The loaded configuration.
401
414
  """
402
415
  return BacklogOpsConfig(from_json_filename=filename,
403
- auto_ch_hook=auto_ch_hook, stderr_file=stderr_file)
416
+ auto_ch_hook=auto_ch_hook, stderr_file=stderr_file,
417
+ ok_to_use_defaults=ok_to_use_defaults)
404
418
 
405
419
 
406
420
  # pylint: disable-next=too-few-public-methods
@@ -17,7 +17,7 @@ class BloVersionReporter(VersionReporter):
17
17
  def package_names(self) -> list[str]:
18
18
  """Return the package names that this package reports."""
19
19
  ret = ['backlogops', 'tableio', 'tableio-cfg-json', 'wizard-ui-bridge',
20
- 'config-as-json', 'mformat']
20
+ 'config-as-json', 'mformat', 'edit-cfg-json']
21
21
  ret += super().package_names()
22
22
  return ret
23
23
 
@@ -25,7 +25,9 @@ class BloVersionReporter(VersionReporter):
25
25
  def get_app_support_expires(self) -> dict[date, str]:
26
26
  """Return when this package will stop supporting older Python."""
27
27
  return {date(year=2026, month=1, day=1): '3.11',
28
- date(year=2027, month=10, day=1): '3.12'}
28
+ date(year=2027, month=3, day=1): '3.12',
29
+ date(year=2027, month=11, day=1): '3.13',
30
+ date(year=2028, month=11, day=1): '3.14'}
29
31
 
30
32
  @override
31
33
  @classmethod
@@ -37,4 +39,4 @@ class BloVersionReporter(VersionReporter):
37
39
  @classmethod
38
40
  def recommended_python(cls) -> Version:
39
41
  """Return the Python version this package recommends."""
40
- return Version('3.14')
42
+ return Version('3.15')
@@ -39,18 +39,21 @@ the notes below follows from.
39
39
  Four things are worth knowing before the editor is offered instead of the
40
40
  wizard:
41
41
 
42
- * One entry of the Jira column maps and of the issue-type maps is a map of
43
- its own, which the class does not name a type for, so there is no pattern
44
- for one until the file holds one to copy: an empty map of those offers
45
- nothing and says why below itself. Every other container can be given its
46
- first element, because the class names the type of one or its declared
47
- type says what an element is.
42
+ * One entry of the Jira column maps is a map of its own, and a new one is
43
+ the empty map. A field of it is a tuple of Jira attribute paths, which
44
+ the editor cannot make, so there is no pattern for one until the map
45
+ holds one to copy: an empty column map offers nothing and says why below
46
+ itself, and writing its first field is the wizard's. Every other
47
+ container, an issue-type map included, can be given its first element,
48
+ because the class names the type of one or its declared type says what
49
+ an element is.
48
50
  * The levels keep a row in a configuration that leaves them out, because a
49
- member the class omits is still a member. What that row offers is an
50
- empty list, which is not what leaving the levels out means and is
51
- refused as such: the row's other control puts the member back to holding
52
- nothing, which is the built-in levels. Writing the levels the first time
53
- is the wizard's.
51
+ member the class omits is still a member. Choosing a list as its type
52
+ gives an empty list, which cannot be given a first level, because a
53
+ level is not a class the editor can make, and which is not what leaving
54
+ the levels out means and is refused as such. Choosing ``None`` puts the
55
+ member back to holding nothing, which is the built-in levels. Writing
56
+ the levels the first time is done using the wizard.
54
57
  * A person is keyed by their own name in lower case, so renaming one means
55
58
  adding an entry under the new key and removing the old one; editing the
56
59
  name alone leaves a configuration the class refuses.
@@ -119,7 +119,8 @@ def io_preset_class(filename: str
119
119
 
120
120
 
121
121
  def read_io_preset(filename: str, auto_ch_hook: ConfigAutoChangeHook,
122
- stderr_file: TextIO = sys.stderr
122
+ stderr_file: TextIO = sys.stderr, *,
123
+ ok_to_use_defaults: bool = False
123
124
  ) -> InputFormatConfig | OutputFormatConfig:
124
125
  """Read a stand-alone preset file, auto-detecting its direction.
125
126
 
@@ -133,6 +134,9 @@ def read_io_preset(filename: str, auto_ch_hook: ConfigAutoChangeHook,
133
134
  auto_ch_hook: Hook notified when an old file needed
134
135
  backward-compatible normalization while reading.
135
136
  stderr_file: Stream used for user-facing diagnostics.
137
+ ok_to_use_defaults: Whether the file may lack values, which then
138
+ keep their defaults. Running commands read strictly; an editor
139
+ may not.
136
140
 
137
141
  Returns:
138
142
  The input or output preset read from the file.
@@ -143,7 +147,8 @@ def read_io_preset(filename: str, auto_ch_hook: ConfigAutoChangeHook,
143
147
  """
144
148
  return io_preset_class(filename)(from_json_filename=filename,
145
149
  auto_ch_hook=auto_ch_hook,
146
- stderr_file=stderr_file)
150
+ stderr_file=stderr_file,
151
+ ok_to_use_defaults=ok_to_use_defaults)
147
152
 
148
153
 
149
154
  def safe_write_config(config: Config, output: str,
@@ -46,11 +46,14 @@ class DefaultStoryPointLevel(Config):
46
46
  """Return the story points, as the number growth works on."""
47
47
  return self.story_points
48
48
 
49
+ # Config.__init__ fixes these six arguments.
50
+ # pylint: disable-next=too-many-arguments
49
51
  def __init__(self, from_json_data_text: Optional[str] = None,
50
52
  from_json_filename: Optional[PathOrStr] = None,
51
53
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
52
54
  stderr_file: TextIO = sys.stderr, *,
53
- member_name: Optional[str] = None) -> None:
55
+ member_name: Optional[str] = None,
56
+ ok_to_use_defaults: bool = False) -> None:
54
57
  """Create the default of one level, or read it from JSON.
55
58
 
56
59
  Args:
@@ -62,6 +65,8 @@ class DefaultStoryPointLevel(Config):
62
65
  member_name: Path for reaching this object from the top level,
63
66
  so that a diagnostic names the whole path. None for an
64
67
  object that is a member of nothing.
68
+ ok_to_use_defaults: Whether the JSON source may lack values,
69
+ which then keep the defaults assigned here.
65
70
 
66
71
  Attributes:
67
72
  level: The backlog item level this default is for.
@@ -69,10 +74,14 @@ class DefaultStoryPointLevel(Config):
69
74
  """
70
75
  self.level: int = 0
71
76
  self.story_points: float = 1.0
77
+ # Every config class forwards these arguments alike.
78
+ # pylint: disable=duplicate-code
72
79
  super().__init__(from_json_data_text=from_json_data_text,
73
80
  from_json_filename=from_json_filename,
74
81
  auto_ch_hook=auto_ch_hook, stderr_file=stderr_file,
75
- member_name=member_name)
82
+ member_name=member_name,
83
+ ok_to_use_defaults=ok_to_use_defaults)
84
+ # pylint: enable=duplicate-code
76
85
 
77
86
  @override
78
87
  def get_validation_plan(self, stderr_file: TextIO) -> ValidationPlan:
@@ -104,11 +113,14 @@ class DefaultStoryPoints(LevelDefaults[DefaultStoryPointLevel]):
104
113
  'to work out a factor from')
105
114
  """Why filling in levels is refused when too few levels are given."""
106
115
 
116
+ # Config.__init__ fixes these six arguments.
117
+ # pylint: disable-next=too-many-arguments
107
118
  def __init__(self, from_json_data_text: Optional[str] = None,
108
119
  from_json_filename: Optional[PathOrStr] = None,
109
120
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
110
121
  stderr_file: TextIO = sys.stderr, *,
111
- member_name: Optional[str] = None) -> None:
122
+ member_name: Optional[str] = None,
123
+ ok_to_use_defaults: bool = False) -> None:
112
124
  """Create defaults that guess nothing, or read them from JSON.
113
125
 
114
126
  Args:
@@ -120,6 +132,8 @@ class DefaultStoryPoints(LevelDefaults[DefaultStoryPointLevel]):
120
132
  member_name: Path for reaching this object from the top level,
121
133
  so that a diagnostic names the whole path. None for an
122
134
  object that is a member of nothing.
135
+ ok_to_use_defaults: Whether the JSON source may lack values,
136
+ which then keep the defaults assigned here.
123
137
 
124
138
  Attributes:
125
139
  levels: The story points given for a level, sorted by level
@@ -136,10 +150,14 @@ class DefaultStoryPoints(LevelDefaults[DefaultStoryPointLevel]):
136
150
  self.interpolate = False
137
151
  self.extrapolate = False
138
152
  self.levels = []
153
+ # Every config class forwards these arguments alike.
154
+ # pylint: disable=duplicate-code
139
155
  super().__init__(from_json_data_text=from_json_data_text,
140
156
  from_json_filename=from_json_filename,
141
157
  auto_ch_hook=auto_ch_hook, stderr_file=stderr_file,
142
- member_name=member_name)
158
+ member_name=member_name,
159
+ ok_to_use_defaults=ok_to_use_defaults)
160
+ # pylint: enable=duplicate-code
143
161
 
144
162
  def get_default_story_points(self, level: int) -> Optional[float]:
145
163
  """Return the story points a backlog item of one level counts as.
@@ -213,18 +213,6 @@ def _tio_default(file_access: FileAccess, format_name: Optional[str] = None,
213
213
  stderr_file=stderr_file, member_name=member_name)
214
214
 
215
215
 
216
- def _tio_from_json(file_access: FileAccess, from_json_data_text: Optional[str],
217
- from_json_filename: Optional[PathOrStr],
218
- stderr_file: TextIO,
219
- member_name: Optional[str]) -> TioJsonConfig:
220
- """Return a TableIO config read from JSON for a file access mode."""
221
- return TioJsonConfig(capabilities=_capabilities(file_access, stderr_file),
222
- file_access=file_access,
223
- from_json_data_text=from_json_data_text,
224
- from_json_filename=from_json_filename,
225
- stderr_file=stderr_file, member_name=member_name)
226
-
227
-
228
216
  class _FormatConfig(Config):
229
217
  """Shared behavior for one input or output TableIO endpoint config.
230
218
 
@@ -238,34 +226,54 @@ class _FormatConfig(Config):
238
226
  _MAP_NAMES: ClassVar[tuple[str, ...]]
239
227
  _UNCHECKED_EXTRA: ClassVar[tuple[str, ...]] = ()
240
228
 
229
+ # Config.__init__ fixes these six arguments.
230
+ # pylint: disable-next=too-many-arguments
241
231
  def __init__(self, from_json_data_text: Optional[str] = None,
242
232
  from_json_filename: Optional[PathOrStr] = None,
243
233
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
244
234
  stderr_file: TextIO = sys.stderr, *,
245
- member_name: Optional[str] = None) -> None:
235
+ member_name: Optional[str] = None,
236
+ ok_to_use_defaults: bool = False) -> None:
246
237
  """Create default settings or read them from a JSON source.
247
238
 
248
239
  The default TableIO endpoint is created under the path of the
249
240
  ``tableio`` member of this endpoint, so that a TableIO diagnostic
250
- names which preset it is about even before any file is read.
241
+ names which preset it is about even before any file is read. With
242
+ ``ok_to_use_defaults`` true the JSON source may lack values, which
243
+ then keep the defaults assigned before reading.
251
244
  """
252
245
  self.tableio: TioJsonConfig = _tio_default(
253
246
  self._FILE_ACCESS, stderr_file=stderr_file,
254
247
  member_name=member_path(member_name, 'tableio'))
255
248
  self._unchecked_dicts = list(self._MAP_NAMES) + \
256
249
  list(self._UNCHECKED_EXTRA)
250
+ # Every config class forwards these arguments alike.
251
+ # pylint: disable=duplicate-code
257
252
  Config.__init__(self, from_json_data_text=from_json_data_text,
258
253
  from_json_filename=from_json_filename,
259
254
  auto_ch_hook=auto_ch_hook, stderr_file=stderr_file,
260
- member_name=member_name)
255
+ member_name=member_name,
256
+ ok_to_use_defaults=ok_to_use_defaults)
257
+ # pylint: enable=duplicate-code
261
258
 
262
259
  def _tio_factory(self, *, from_json_data_text: Optional[str] = None,
263
260
  from_json_filename: Optional[PathOrStr] = None,
264
261
  stderr_file: TextIO = sys.stderr,
265
- member_name: Optional[str] = None) -> TioJsonConfig:
266
- """Construct the nested TableIO config from JSON when reading."""
267
- return _tio_from_json(self._FILE_ACCESS, from_json_data_text,
268
- from_json_filename, stderr_file, member_name)
262
+ member_name: Optional[str] = None,
263
+ ok_to_use_defaults: bool = False) -> TioJsonConfig:
264
+ """Construct the nested TableIO config from JSON when reading.
265
+
266
+ With ``ok_to_use_defaults`` true the JSON source may leave members
267
+ out, and they then get the defaults TableIO recommends for the
268
+ format and implementation that the source selects.
269
+ """
270
+ access = self._FILE_ACCESS
271
+ return TioJsonConfig(capabilities=_capabilities(access, stderr_file),
272
+ file_access=access,
273
+ from_json_data_text=from_json_data_text,
274
+ from_json_filename=from_json_filename,
275
+ stderr_file=stderr_file, member_name=member_name,
276
+ ok_to_use_defaults=ok_to_use_defaults)
269
277
 
270
278
  def _map_validator(self) -> MemberValidator:
271
279
  """Return the validator applied to each column-name map member."""
@@ -351,11 +359,14 @@ class InputFormatConfig(_FormatConfig):
351
359
  release_to_internal: dict[str, Optional[str]]
352
360
  status_input_map: dict[str, Status]
353
361
 
362
+ # Config.__init__ fixes these six arguments.
363
+ # pylint: disable-next=too-many-arguments
354
364
  def __init__(self, from_json_data_text: Optional[str] = None,
355
365
  from_json_filename: Optional[PathOrStr] = None,
356
366
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
357
367
  stderr_file: TextIO = sys.stderr, *,
358
- member_name: Optional[str] = None) -> None:
368
+ member_name: Optional[str] = None,
369
+ ok_to_use_defaults: bool = False) -> None:
359
370
  """Create the input map defaults, then run the shared constructor."""
360
371
  self.backlog_to_internal = {}
361
372
  self.release_to_internal = {}
@@ -364,7 +375,8 @@ class InputFormatConfig(_FormatConfig):
364
375
  from_json_filename=from_json_filename,
365
376
  auto_ch_hook=auto_ch_hook,
366
377
  stderr_file=stderr_file,
367
- member_name=member_name)
378
+ member_name=member_name,
379
+ ok_to_use_defaults=ok_to_use_defaults)
368
380
 
369
381
  @override
370
382
  def _get_read_old_config(self) -> ReadOldConfiguration:
@@ -411,11 +423,14 @@ class OutputFormatConfig(_FormatConfig):
411
423
  level_display: LevelDisplay
412
424
  omit_none_column: bool
413
425
 
426
+ # Config.__init__ fixes these six arguments.
427
+ # pylint: disable-next=too-many-arguments
414
428
  def __init__(self, from_json_data_text: Optional[str] = None,
415
429
  from_json_filename: Optional[PathOrStr] = None,
416
430
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
417
431
  stderr_file: TextIO = sys.stderr, *,
418
- member_name: Optional[str] = None) -> None:
432
+ member_name: Optional[str] = None,
433
+ ok_to_use_defaults: bool = False) -> None:
419
434
  """Create the output defaults, then run the shared constructor."""
420
435
  self.backlog_to_external = {}
421
436
  self.release_to_external = {}
@@ -425,7 +440,8 @@ class OutputFormatConfig(_FormatConfig):
425
440
  from_json_filename=from_json_filename,
426
441
  auto_ch_hook=auto_ch_hook,
427
442
  stderr_file=stderr_file,
428
- member_name=member_name)
443
+ member_name=member_name,
444
+ ok_to_use_defaults=ok_to_use_defaults)
429
445
 
430
446
  @override
431
447
  def parse_converters(self) -> dict[str, ParseConverter]:
@@ -504,7 +520,8 @@ class GuiDisplayConfig(Config):
504
520
  def __init__(self, from_json_data_text: Optional[str] = None,
505
521
  from_json_filename: Optional[PathOrStr] = None,
506
522
  stderr_file: TextIO = sys.stderr, *,
507
- member_name: Optional[str] = None) -> None:
523
+ member_name: Optional[str] = None,
524
+ ok_to_use_defaults: bool = False) -> None:
508
525
  """Create the display defaults, then read them from JSON."""
509
526
  self.backlog_to_external = {}
510
527
  self.release_to_external = {}
@@ -513,7 +530,8 @@ class GuiDisplayConfig(Config):
513
530
  self._unchecked_dicts = ['backlog_to_external', 'release_to_external']
514
531
  Config.__init__(self, from_json_data_text=from_json_data_text,
515
532
  from_json_filename=from_json_filename,
516
- stderr_file=stderr_file, member_name=member_name)
533
+ stderr_file=stderr_file, member_name=member_name,
534
+ ok_to_use_defaults=ok_to_use_defaults)
517
535
 
518
536
  @override
519
537
  def parse_converters(self) -> dict[str, ParseConverter]:
@@ -433,11 +433,14 @@ class JiraConnectConfig(Config):
433
433
  token_file_path: Optional[str]
434
434
  stored_token: Optional[str]
435
435
 
436
+ # Config.__init__ fixes these six arguments.
437
+ # pylint: disable-next=too-many-arguments
436
438
  def __init__(self, from_json_data_text: Optional[str] = None,
437
439
  from_json_filename: Optional[PathOrStr] = None,
438
440
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
439
441
  stderr_file: TextIO = sys.stderr, *,
440
- member_name: Optional[str] = None) -> None:
442
+ member_name: Optional[str] = None,
443
+ ok_to_use_defaults: bool = False) -> None:
441
444
  """Create connection defaults, then read them from JSON."""
442
445
  self.jira_type = JiraType.CLOUD
443
446
  self.base_url = ''
@@ -446,10 +449,14 @@ class JiraConnectConfig(Config):
446
449
  self.token_file_path = None
447
450
  self.stored_token = None
448
451
  self._cached_token: Optional[str] = None
452
+ # Every config class forwards these arguments alike.
453
+ # pylint: disable=duplicate-code
449
454
  Config.__init__(self, from_json_data_text=from_json_data_text,
450
455
  from_json_filename=from_json_filename,
451
456
  auto_ch_hook=auto_ch_hook, stderr_file=stderr_file,
452
- member_name=member_name)
457
+ member_name=member_name,
458
+ ok_to_use_defaults=ok_to_use_defaults)
459
+ # pylint: enable=duplicate-code
453
460
 
454
461
  @override
455
462
  def _omit_none_from_json(self) -> list[str]:
@@ -615,11 +622,14 @@ class JiraPreset(Config):
615
622
  def_project: str
616
623
  def_filter: str
617
624
 
625
+ # Config.__init__ fixes these six arguments.
626
+ # pylint: disable-next=too-many-arguments
618
627
  def __init__(self, from_json_data_text: Optional[str] = None,
619
628
  from_json_filename: Optional[PathOrStr] = None,
620
629
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
621
630
  stderr_file: TextIO = sys.stderr, *,
622
- member_name: Optional[str] = None) -> None:
631
+ member_name: Optional[str] = None,
632
+ ok_to_use_defaults: bool = False) -> None:
623
633
  """Create preset defaults, then read them from JSON."""
624
634
  self.connection_name = ''
625
635
  self.backlog_column_map_name = ''
@@ -628,10 +638,14 @@ class JiraPreset(Config):
628
638
  self.issue_type_map_name = ''
629
639
  self.def_project = ''
630
640
  self.def_filter = ''
641
+ # Every config class forwards these arguments alike.
642
+ # pylint: disable=duplicate-code
631
643
  Config.__init__(self, from_json_data_text=from_json_data_text,
632
644
  from_json_filename=from_json_filename,
633
645
  auto_ch_hook=auto_ch_hook, stderr_file=stderr_file,
634
- member_name=member_name)
646
+ member_name=member_name,
647
+ ok_to_use_defaults=ok_to_use_defaults)
648
+ # pylint: enable=duplicate-code
635
649
 
636
650
  @override
637
651
  def _get_read_old_config(self) -> ReadOldConfiguration:
@@ -712,11 +726,14 @@ class JiraIOConfig(Config):
712
726
  ``presets`` section.
713
727
  """
714
728
 
729
+ # Config.__init__ fixes these six arguments.
730
+ # pylint: disable-next=too-many-arguments
715
731
  def __init__(self, from_json_data_text: Optional[str] = None,
716
732
  from_json_filename: Optional[PathOrStr] = None,
717
733
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
718
734
  stderr_file: TextIO = sys.stderr, *,
719
- member_name: Optional[str] = None) -> None:
735
+ member_name: Optional[str] = None,
736
+ ok_to_use_defaults: bool = False) -> None:
720
737
  """Create empty defaults, then read the jira configuration."""
721
738
  self.connections: dict[str, JiraConnectConfig] = {}
722
739
  self.backlog_column_maps: dict[str, JiraColumnMap] = {}
@@ -725,10 +742,14 @@ class JiraIOConfig(Config):
725
742
  self.presets: dict[str, JiraPreset] = {}
726
743
  self._unchecked_dicts = ['backlog_column_maps', 'release_column_maps',
727
744
  'issue_type_maps']
745
+ # Every config class forwards these arguments alike.
746
+ # pylint: disable=duplicate-code
728
747
  Config.__init__(self, from_json_data_text=from_json_data_text,
729
748
  from_json_filename=from_json_filename,
730
749
  auto_ch_hook=auto_ch_hook, stderr_file=stderr_file,
731
- member_name=member_name)
750
+ member_name=member_name,
751
+ ok_to_use_defaults=ok_to_use_defaults)
752
+ # pylint: enable=duplicate-code
732
753
 
733
754
  @override
734
755
  def _get_read_old_config(self) -> ReadOldConfiguration:
@@ -198,11 +198,14 @@ class LevelDefaults(Config, Generic[_L]):
198
198
  extrapolate: bool
199
199
  _value_for_level: dict[int, Optional[float]]
200
200
 
201
+ # Config.__init__ fixes these six arguments.
202
+ # pylint: disable-next=too-many-arguments
201
203
  def __init__(self, from_json_data_text: Optional[str] = None,
202
204
  from_json_filename: Optional[PathOrStr] = None,
203
205
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
204
206
  stderr_file: TextIO = sys.stderr, *,
205
- member_name: Optional[str] = None) -> None:
207
+ member_name: Optional[str] = None,
208
+ ok_to_use_defaults: bool = False) -> None:
206
209
  """Create the empty level lookup, then read the configuration.
207
210
 
208
211
  Args:
@@ -214,12 +217,18 @@ class LevelDefaults(Config, Generic[_L]):
214
217
  member_name: Path for reaching this object from the top level,
215
218
  so that a diagnostic names the whole path. None for an
216
219
  object that is a member of nothing.
220
+ ok_to_use_defaults: Whether the JSON source may lack values,
221
+ which then keep the defaults the derived class assigned.
217
222
  """
218
223
  self._value_for_level = {}
224
+ # Every config class forwards these arguments alike.
225
+ # pylint: disable=duplicate-code
219
226
  super().__init__(from_json_data_text=from_json_data_text,
220
227
  from_json_filename=from_json_filename,
221
228
  auto_ch_hook=auto_ch_hook, stderr_file=stderr_file,
222
- member_name=member_name)
229
+ member_name=member_name,
230
+ ok_to_use_defaults=ok_to_use_defaults)
231
+ # pylint: enable=duplicate-code
223
232
 
224
233
  def _missing_members(self) -> dict[ConfigPath, object]:
225
234
  """Return the empty guess an older file leaves out.
@@ -89,11 +89,14 @@ def _fraction_validator() -> MemberValidator:
89
89
  class DefaultRemainingTimeLevel(Config):
90
90
  """The default remaining time of a backlog item at one level."""
91
91
 
92
+ # Config.__init__ fixes these six arguments.
93
+ # pylint: disable-next=too-many-arguments
92
94
  def __init__(self, from_json_data_text: Optional[str] = None,
93
95
  from_json_filename: Optional[PathOrStr] = None,
94
96
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
95
97
  stderr_file: TextIO = sys.stderr, *,
96
- member_name: Optional[str] = None) -> None:
98
+ member_name: Optional[str] = None,
99
+ ok_to_use_defaults: bool = False) -> None:
97
100
  """Create the default of one level, or read it from JSON.
98
101
 
99
102
  Args:
@@ -105,6 +108,8 @@ class DefaultRemainingTimeLevel(Config):
105
108
  member_name: Path for reaching this object from the top level,
106
109
  so that a diagnostic names the whole path. None for an
107
110
  object that is a member of nothing.
111
+ ok_to_use_defaults: Whether the JSON source may lack values,
112
+ which then keep the defaults assigned here.
108
113
 
109
114
  Attributes:
110
115
  level: The backlog item level this default is for.
@@ -120,10 +125,14 @@ class DefaultRemainingTimeLevel(Config):
120
125
  """
121
126
  self.level: int = 0
122
127
  self.remaining_time: timedelta = timedelta(hours=1, minutes=30)
128
+ # Every config class forwards these arguments alike.
129
+ # pylint: disable=duplicate-code
123
130
  super().__init__(from_json_data_text=from_json_data_text,
124
131
  from_json_filename=from_json_filename,
125
132
  auto_ch_hook=auto_ch_hook, stderr_file=stderr_file,
126
- member_name=member_name)
133
+ member_name=member_name,
134
+ ok_to_use_defaults=ok_to_use_defaults)
135
+ # pylint: enable=duplicate-code
127
136
 
128
137
  def as_float(self) -> float:
129
138
  """Return the remaining time in seconds, for growth to work on."""
@@ -166,11 +175,14 @@ class RemainingTimeConfig(LevelDefaults[DefaultRemainingTimeLevel]):
166
175
  'each to work out a factor from')
167
176
  """Why filling in levels is refused when too few levels are given."""
168
177
 
178
+ # Config.__init__ fixes these six arguments.
179
+ # pylint: disable-next=too-many-arguments
169
180
  def __init__(self, from_json_data_text: Optional[str] = None,
170
181
  from_json_filename: Optional[PathOrStr] = None,
171
182
  auto_ch_hook: Optional[ConfigAutoChangeHook] = None,
172
183
  stderr_file: TextIO = sys.stderr, *,
173
- member_name: Optional[str] = None) -> None:
184
+ member_name: Optional[str] = None,
185
+ ok_to_use_defaults: bool = False) -> None:
174
186
  """Create the remaining time configuration, or read it from JSON.
175
187
 
176
188
  Args:
@@ -182,6 +194,8 @@ class RemainingTimeConfig(LevelDefaults[DefaultRemainingTimeLevel]):
182
194
  member_name: Path for reaching this object from the top level,
183
195
  so that a diagnostic names the whole path. None for an
184
196
  object that is a member of nothing.
197
+ ok_to_use_defaults: Whether the JSON source may lack values,
198
+ which then keep the defaults assigned here.
185
199
 
186
200
  Attributes:
187
201
  enable_remaining_time: Whether remaining time estimates are
@@ -219,10 +233,14 @@ class RemainingTimeConfig(LevelDefaults[DefaultRemainingTimeLevel]):
219
233
  self.interpolate = False
220
234
  self.extrapolate = False
221
235
  self.default_focus_factor: float = 0.3
236
+ # Every config class forwards these arguments alike.
237
+ # pylint: disable=duplicate-code
222
238
  super().__init__(from_json_data_text=from_json_data_text,
223
239
  from_json_filename=from_json_filename,
224
240
  auto_ch_hook=auto_ch_hook, stderr_file=stderr_file,
225
- member_name=member_name)
241
+ member_name=member_name,
242
+ ok_to_use_defaults=ok_to_use_defaults)
243
+ # pylint: enable=duplicate-code
226
244
 
227
245
  @override
228
246
  def _missing_members(self) -> dict[ConfigPath, object]:
@@ -1,8 +0,0 @@
1
- config-as-json>=1.7
2
- cryptography>=50.0.2
3
- jira[cli,opt]>=3.10.5
4
- tableio>=1.2
5
- tableio-cfg-json>=1.5
6
- wizard-ui-bridge[textual]>=1.4
7
- versionreporter>=0.4
8
- edit-cfg-json>=0.4.0
File without changes
File without changes