backlogops-cli 0.9__tar.gz → 1.0__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.
- {backlogops_cli-0.9 → backlogops_cli-1.0}/PKG-INFO +5 -5
- {backlogops_cli-0.9 → backlogops_cli-1.0}/README_pypi.md +2 -2
- {backlogops_cli-0.9 → backlogops_cli-1.0}/backlogops_cli.egg-info/PKG-INFO +5 -5
- {backlogops_cli-0.9 → backlogops_cli-1.0}/backlogops_cli.egg-info/requires.txt +2 -2
- {backlogops_cli-0.9 → backlogops_cli-1.0}/setup.py +3 -3
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/config_edit.py +50 -27
- {backlogops_cli-0.9 → backlogops_cli-1.0}/LICENSE.txt +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/backlogops_cli.egg-info/SOURCES.txt +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/backlogops_cli.egg-info/dependency_links.txt +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/backlogops_cli.egg-info/top_level.txt +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/pyproject.toml +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/setup.cfg +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/__init__.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/__main__.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/_command_io.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/_migrate_warn.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/_wizard_io.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/add_releases_to_jira.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/add_to_jira.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/adjust_release_content.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/bloc_version_reporter.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/config_wizard.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/convert.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/demo_backlog.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/encrypt_token_file.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/estimate_ready_date.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/extract_keys.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/jira_fields.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/list.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/migrate_cfg.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/order_by_deps.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/order_by_keys.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/order_by_release.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/order_releases.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/order_releases_in_jira.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/plan_release_dates.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/preset_wizard.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/py.typed +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/rank_in_jira.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/read_jira.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/rename_releases_in_jira.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/update_backlog_in_jira.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/update_releases_in_jira.py +0 -0
- {backlogops_cli-0.9 → backlogops_cli-1.0}/src/backlogops_cli/version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: backlogops-cli
|
|
3
|
-
Version: 0
|
|
3
|
+
Version: 1.0
|
|
4
4
|
Summary: Command line interface for backlog operations.
|
|
5
5
|
Author: Tom Björkholm
|
|
6
6
|
Author-email: Tom Björkholm <klausuler_linnet0q@icloud.com>
|
|
@@ -24,9 +24,9 @@ Requires-Python: >=3.12
|
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
25
|
License-File: LICENSE.txt
|
|
26
26
|
Requires-Dist: argcomplete>=3.7.2
|
|
27
|
-
Requires-Dist: backlogops>=0
|
|
27
|
+
Requires-Dist: backlogops>=1.0
|
|
28
28
|
Requires-Dist: wizard-ui-bridge[textual]>=1.3
|
|
29
|
-
Requires-Dist: edit-cfg-json-textual==0.0.
|
|
29
|
+
Requires-Dist: edit-cfg-json-textual==0.0.4
|
|
30
30
|
Requires-Dist: versionreporter>=0.4
|
|
31
31
|
Dynamic: author
|
|
32
32
|
Dynamic: license-file
|
|
@@ -322,10 +322,10 @@ backlogops_cli serves 2 purposes:
|
|
|
322
322
|
|
|
323
323
|
## Test summary
|
|
324
324
|
|
|
325
|
-
- Test result:
|
|
325
|
+
- Test result: 2234 passed, 1 deselected in 45s
|
|
326
326
|
- No flake8 warnings.
|
|
327
327
|
- No mypy errors found.
|
|
328
328
|
- No pylint warnings.
|
|
329
329
|
- No python layout warnings.
|
|
330
|
-
- Built version(s): 0
|
|
330
|
+
- Built version(s): 1.0
|
|
331
331
|
- Build and test using Python 3.14.7
|
|
@@ -287,10 +287,10 @@ backlogops_cli serves 2 purposes:
|
|
|
287
287
|
|
|
288
288
|
## Test summary
|
|
289
289
|
|
|
290
|
-
- Test result:
|
|
290
|
+
- Test result: 2234 passed, 1 deselected in 45s
|
|
291
291
|
- No flake8 warnings.
|
|
292
292
|
- No mypy errors found.
|
|
293
293
|
- No pylint warnings.
|
|
294
294
|
- No python layout warnings.
|
|
295
|
-
- Built version(s): 0
|
|
295
|
+
- Built version(s): 1.0
|
|
296
296
|
- Build and test using Python 3.14.7
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: backlogops-cli
|
|
3
|
-
Version: 0
|
|
3
|
+
Version: 1.0
|
|
4
4
|
Summary: Command line interface for backlog operations.
|
|
5
5
|
Author: Tom Björkholm
|
|
6
6
|
Author-email: Tom Björkholm <klausuler_linnet0q@icloud.com>
|
|
@@ -24,9 +24,9 @@ Requires-Python: >=3.12
|
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
25
|
License-File: LICENSE.txt
|
|
26
26
|
Requires-Dist: argcomplete>=3.7.2
|
|
27
|
-
Requires-Dist: backlogops>=0
|
|
27
|
+
Requires-Dist: backlogops>=1.0
|
|
28
28
|
Requires-Dist: wizard-ui-bridge[textual]>=1.3
|
|
29
|
-
Requires-Dist: edit-cfg-json-textual==0.0.
|
|
29
|
+
Requires-Dist: edit-cfg-json-textual==0.0.4
|
|
30
30
|
Requires-Dist: versionreporter>=0.4
|
|
31
31
|
Dynamic: author
|
|
32
32
|
Dynamic: license-file
|
|
@@ -322,10 +322,10 @@ backlogops_cli serves 2 purposes:
|
|
|
322
322
|
|
|
323
323
|
## Test summary
|
|
324
324
|
|
|
325
|
-
- Test result:
|
|
325
|
+
- Test result: 2234 passed, 1 deselected in 45s
|
|
326
326
|
- No flake8 warnings.
|
|
327
327
|
- No mypy errors found.
|
|
328
328
|
- No pylint warnings.
|
|
329
329
|
- No python layout warnings.
|
|
330
|
-
- Built version(s): 0
|
|
330
|
+
- Built version(s): 1.0
|
|
331
331
|
- Build and test using Python 3.14.7
|
|
@@ -5,7 +5,7 @@ from setuptools import setup
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name='backlogops-cli',
|
|
8
|
-
version='0
|
|
8
|
+
version='1.0',
|
|
9
9
|
description='Command line interface for backlog operations.',
|
|
10
10
|
author='Tom Björkholm',
|
|
11
11
|
author_email='klausuler_linnet0q@icloud.com',
|
|
@@ -15,9 +15,9 @@ setup(
|
|
|
15
15
|
package_data={'backlogops_cli': ['src/py.typed']},
|
|
16
16
|
install_requires=[
|
|
17
17
|
'argcomplete >= 3.7.2',
|
|
18
|
-
'backlogops >= 0
|
|
18
|
+
'backlogops >= 1.0',
|
|
19
19
|
'wizard-ui-bridge[textual] >= 1.3',
|
|
20
|
-
'edit-cfg-json-textual == 0.0.
|
|
20
|
+
'edit-cfg-json-textual == 0.0.4',
|
|
21
21
|
'versionreporter >= 0.4'
|
|
22
22
|
]
|
|
23
23
|
)
|
|
@@ -5,6 +5,8 @@ The whole configuration is shown at once, folded where it is deep, so a
|
|
|
5
5
|
single value can be changed without walking through every question the
|
|
6
6
|
wizard asks. The editor is the one of ``edit-cfg-json-textual``, so it needs
|
|
7
7
|
a terminal; where the input is redirected, the wizard command is the way in.
|
|
8
|
+
One call runs the whole session: ``edit`` reads the file, shows it until the
|
|
9
|
+
user is done, and answers with the configuration that was saved.
|
|
8
10
|
|
|
9
11
|
``-i`` says which file to edit and ``-k``/``--kind`` what kind of file it
|
|
10
12
|
is: the backlog-ops configuration, or a stand-alone input or output preset.
|
|
@@ -23,16 +25,16 @@ import argparse
|
|
|
23
25
|
import sys
|
|
24
26
|
from pathlib import Path
|
|
25
27
|
from typing import Optional
|
|
28
|
+
from config_as_json import Config
|
|
26
29
|
from config_as_json.file_extension import fix_file_extension
|
|
27
|
-
from edit_cfg_json import
|
|
28
|
-
from edit_cfg_json_textual import
|
|
29
|
-
from backlogops import
|
|
30
|
-
CONFIG_EXTENSION, default_edit_config, edit_model_for)
|
|
30
|
+
from edit_cfg_json import ConfigLoadError, default_config
|
|
31
|
+
from edit_cfg_json_textual import edit
|
|
32
|
+
from backlogops import CONFIG_EXTENSION, EDIT_SETTINGS, descriptions_for
|
|
31
33
|
from backlogops_cli._command_io import add_kind_arg, kind_class, parsed_args
|
|
32
34
|
|
|
33
35
|
DESCRIPTION = 'Edit a configuration file in a full-screen editor'
|
|
34
36
|
|
|
35
|
-
EDIT_ERRORS = (ValueError, TypeError, KeyError, OSError)
|
|
37
|
+
EDIT_ERRORS = (ConfigLoadError, ValueError, TypeError, KeyError, OSError)
|
|
36
38
|
"""Errors raised when the file to edit cannot be opened."""
|
|
37
39
|
|
|
38
40
|
|
|
@@ -64,36 +66,54 @@ def _input_file(parsed: argparse.Namespace) -> str:
|
|
|
64
66
|
return path
|
|
65
67
|
|
|
66
68
|
|
|
67
|
-
def
|
|
68
|
-
"""Return the
|
|
69
|
+
def _out_file(output: Optional[str], in_file: str) -> str:
|
|
70
|
+
"""Return the file a save writes, naming it as the editor will.
|
|
69
71
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
72
|
+
Without ``-o`` that is the file that was read. A destination named on
|
|
73
|
+
the command line is one this run chose, so it is given the
|
|
74
|
+
configuration extension when it has none, which is what the editor
|
|
75
|
+
would do with it; naming it here as well is what lets this command say
|
|
76
|
+
afterwards which file was written.
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
output: The ``-o`` value, or None when there is none.
|
|
80
|
+
in_file: The file that is being edited.
|
|
81
|
+
|
|
82
|
+
Returns:
|
|
83
|
+
The file that a save of this session writes.
|
|
73
84
|
"""
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
if output is None:
|
|
86
|
+
return in_file
|
|
87
|
+
return output if Path(output).suffix else output + CONFIG_EXTENSION
|
|
77
88
|
|
|
78
89
|
|
|
79
|
-
def
|
|
80
|
-
|
|
90
|
+
def _edited(parsed: argparse.Namespace, in_file: str,
|
|
91
|
+
out_file: str) -> Optional[Config]:
|
|
92
|
+
"""Run one editing session and return the configuration it saved.
|
|
81
93
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
Args:
|
|
95
|
+
parsed: The parsed command line, naming the kind of file to edit.
|
|
96
|
+
in_file: The configuration file the editor reads.
|
|
97
|
+
out_file: The configuration file a save writes.
|
|
98
|
+
|
|
99
|
+
Returns:
|
|
100
|
+
What the session saved, or None when it saved nothing.
|
|
101
|
+
|
|
102
|
+
Raises:
|
|
103
|
+
ConfigLoadError: The input file cannot be opened for editing.
|
|
86
104
|
"""
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
print(model.save_message)
|
|
91
|
-
return 0
|
|
105
|
+
config = default_config(kind_class(parsed))
|
|
106
|
+
return edit(config, descriptions=descriptions_for(config), in_file=in_file,
|
|
107
|
+
out_file=out_file, settings=EDIT_SETTINGS)
|
|
92
108
|
|
|
93
109
|
|
|
94
110
|
def main(args: Optional[list[str]] = None) -> int:
|
|
95
111
|
"""Open the configuration file in the editor and report what was saved.
|
|
96
112
|
|
|
113
|
+
Closing an editor is not a failure, so a session that saved nothing
|
|
114
|
+
still succeeds; it says so, because a user who meant to save would
|
|
115
|
+
otherwise be told nothing at all.
|
|
116
|
+
|
|
97
117
|
Args:
|
|
98
118
|
args: Optional replacement for ``sys.argv[1:]``, mainly for tests.
|
|
99
119
|
|
|
@@ -103,12 +123,15 @@ def main(args: Optional[list[str]] = None) -> int:
|
|
|
103
123
|
"""
|
|
104
124
|
parsed = parsed_args(build_parser(), args)
|
|
105
125
|
try:
|
|
106
|
-
|
|
126
|
+
in_file = _input_file(parsed)
|
|
127
|
+
out_file = _out_file(parsed.output, in_file)
|
|
128
|
+
saved = _edited(parsed, in_file, out_file)
|
|
107
129
|
except EDIT_ERRORS as error:
|
|
108
130
|
print(f'Could not open the configuration: {error}', file=sys.stderr)
|
|
109
131
|
return 1
|
|
110
|
-
|
|
111
|
-
|
|
132
|
+
print('Closed without saving.' if saved is None
|
|
133
|
+
else f'Saved to {out_file}')
|
|
134
|
+
return 0
|
|
112
135
|
|
|
113
136
|
|
|
114
137
|
if __name__ == '__main__': # pragma: no cover
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|