relm 3.0.2__tar.gz → 4.0.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.
- {relm-3.0.2 → relm-4.0.0}/PKG-INFO +1 -1
- {relm-3.0.2 → relm-4.0.0}/pyproject.toml +1 -1
- {relm-3.0.2 → relm-4.0.0}/src/relm/__init__.py +1 -1
- {relm-3.0.2 → relm-4.0.0}/src/relm.egg-info/PKG-INFO +1 -1
- {relm-3.0.2 → relm-4.0.0}/tests/test_core.py +1 -1
- {relm-3.0.2 → relm-4.0.0}/tests/test_custom_commit_message.py +1 -1
- {relm-3.0.2 → relm-4.0.0}/tests/test_main.py +21 -21
- {relm-3.0.2 → relm-4.0.0}/tests/test_release.py +11 -11
- {relm-3.0.2 → relm-4.0.0}/tests/test_verify.py +1 -1
- {relm-3.0.2 → relm-4.0.0}/tests/test_verify_command.py +1 -1
- {relm-3.0.2 → relm-4.0.0}/README.md +0 -0
- {relm-3.0.2 → relm-4.0.0}/setup.cfg +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/banner.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/changelog.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/clean.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/commands/__init__.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/commands/base.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/commands/clean_command.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/commands/create_command.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/commands/gc_command.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/commands/install_command.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/commands/list_command.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/commands/release_command.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/commands/run_command.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/commands/status_command.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/commands/verify_command.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/config.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/core.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/gc.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/git_ops.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/install.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/main.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/release.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/runner.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/verify.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm/versioning.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm.egg-info/SOURCES.txt +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm.egg-info/dependency_links.txt +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm.egg-info/entry_points.txt +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm.egg-info/requires.txt +0 -0
- {relm-3.0.2 → relm-4.0.0}/src/relm.egg-info/top_level.txt +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_banner.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_changed_since.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_changelog.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_clean.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_config.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_create_command.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_dependency_sorting.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_execution_order.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_gc.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_git_ops.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_install.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_runner.py +0 -0
- {relm-3.0.2 → relm-4.0.0}/tests/test_versioning.py +0 -0
|
@@ -32,7 +32,7 @@ class TestCustomCommitMessage(unittest.TestCase):
|
|
|
32
32
|
# Setup mocks for a successful release flow
|
|
33
33
|
mock_is_clean.return_value = True
|
|
34
34
|
mock_tag_exists.side_effect = [True, False] # Already tagged? Yes. New tag exists? No.
|
|
35
|
-
mocked_new_version = "
|
|
35
|
+
mocked_new_version = "4.0.0" # This will be the mocked new version
|
|
36
36
|
mock_bump.return_value = mocked_new_version
|
|
37
37
|
mock_update_file.return_value = True
|
|
38
38
|
mock_update_tests.return_value = []
|
|
@@ -13,8 +13,8 @@ class TestMain(unittest.TestCase):
|
|
|
13
13
|
@patch("relm.main.console")
|
|
14
14
|
def test_list_projects(self, mock_console, mock_find_projects):
|
|
15
15
|
mock_find_projects.return_value = [
|
|
16
|
-
Project("proj1", "
|
|
17
|
-
Project("proj2", "
|
|
16
|
+
Project("proj1", "4.0.0", Path("path/to/proj1"), "desc1"),
|
|
17
|
+
Project("proj2", "4.0.0", Path("path/to/proj2"), None)
|
|
18
18
|
]
|
|
19
19
|
|
|
20
20
|
list_projects(Path("."))
|
|
@@ -54,7 +54,7 @@ class TestMain(unittest.TestCase):
|
|
|
54
54
|
message="release: bump version to {version}",
|
|
55
55
|
func=release_execute
|
|
56
56
|
)
|
|
57
|
-
project = Project("proj1", "
|
|
57
|
+
project = Project("proj1", "4.0.0", Path("."), "desc")
|
|
58
58
|
mock_find_projects.return_value = [project]
|
|
59
59
|
mock_perform_release.return_value = True
|
|
60
60
|
|
|
@@ -102,8 +102,8 @@ class TestMain(unittest.TestCase):
|
|
|
102
102
|
yes=True,
|
|
103
103
|
func=release_execute
|
|
104
104
|
)
|
|
105
|
-
p1 = Project("proj1", "
|
|
106
|
-
p2 = Project("proj2", "
|
|
105
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
106
|
+
p2 = Project("proj2", "4.0.0", Path("."), "desc")
|
|
107
107
|
mock_find_projects.return_value = [p1, p2]
|
|
108
108
|
mock_perform_release.side_effect = [True, False] # One released, one skipped
|
|
109
109
|
|
|
@@ -130,7 +130,7 @@ class TestMain(unittest.TestCase):
|
|
|
130
130
|
yes=True,
|
|
131
131
|
func=release_execute
|
|
132
132
|
)
|
|
133
|
-
p1 = Project("proj1", "
|
|
133
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
134
134
|
mock_find_projects.return_value = [p1]
|
|
135
135
|
mock_perform_release.side_effect = Exception("Boom")
|
|
136
136
|
|
|
@@ -152,8 +152,8 @@ class TestMain(unittest.TestCase):
|
|
|
152
152
|
fail_fast=False,
|
|
153
153
|
func=run_execute
|
|
154
154
|
)
|
|
155
|
-
p1 = Project("proj1", "
|
|
156
|
-
p2 = Project("proj2", "
|
|
155
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
156
|
+
p2 = Project("proj2", "4.0.0", Path("."), "desc")
|
|
157
157
|
mock_find_projects.return_value = [p1, p2]
|
|
158
158
|
mock_run_cmd.side_effect = [True, False]
|
|
159
159
|
|
|
@@ -178,8 +178,8 @@ class TestMain(unittest.TestCase):
|
|
|
178
178
|
fail_fast=True,
|
|
179
179
|
func=run_execute
|
|
180
180
|
)
|
|
181
|
-
p1 = Project("proj1", "
|
|
182
|
-
p2 = Project("proj2", "
|
|
181
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
182
|
+
p2 = Project("proj2", "4.0.0", Path("."), "desc")
|
|
183
183
|
mock_find_projects.return_value = [p1, p2]
|
|
184
184
|
mock_run_cmd.side_effect = [False, True] # First fails
|
|
185
185
|
|
|
@@ -202,7 +202,7 @@ class TestMain(unittest.TestCase):
|
|
|
202
202
|
fail_fast=False,
|
|
203
203
|
func=run_execute
|
|
204
204
|
)
|
|
205
|
-
p1 = Project("proj1", "
|
|
205
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
206
206
|
mock_find_projects.return_value = [p1]
|
|
207
207
|
mock_run_cmd.return_value = True
|
|
208
208
|
|
|
@@ -246,8 +246,8 @@ class TestMain(unittest.TestCase):
|
|
|
246
246
|
no_editable=False,
|
|
247
247
|
func=install_execute
|
|
248
248
|
)
|
|
249
|
-
p1 = Project("proj1", "
|
|
250
|
-
p2 = Project("proj2", "
|
|
249
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
250
|
+
p2 = Project("proj2", "4.0.0", Path("."), "desc")
|
|
251
251
|
mock_find_projects.return_value = [p1, p2]
|
|
252
252
|
mock_install.side_effect = [True, False]
|
|
253
253
|
|
|
@@ -269,7 +269,7 @@ class TestMain(unittest.TestCase):
|
|
|
269
269
|
no_editable=False,
|
|
270
270
|
func=install_execute
|
|
271
271
|
)
|
|
272
|
-
p1 = Project("proj1", "
|
|
272
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
273
273
|
mock_find_projects.return_value = [p1]
|
|
274
274
|
mock_install.return_value = True
|
|
275
275
|
|
|
@@ -310,7 +310,7 @@ class TestMain(unittest.TestCase):
|
|
|
310
310
|
project_name="all",
|
|
311
311
|
func=status_execute
|
|
312
312
|
)
|
|
313
|
-
p1 = Project("proj1", "
|
|
313
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
314
314
|
mock_find_projects.return_value = [p1]
|
|
315
315
|
mock_get_branch.return_value = "main"
|
|
316
316
|
mock_is_clean.return_value = True
|
|
@@ -334,7 +334,7 @@ class TestMain(unittest.TestCase):
|
|
|
334
334
|
project_name="proj1",
|
|
335
335
|
func=status_execute
|
|
336
336
|
)
|
|
337
|
-
p1 = Project("proj1", "
|
|
337
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
338
338
|
mock_find_projects.return_value = [p1]
|
|
339
339
|
mock_get_branch.return_value = "main"
|
|
340
340
|
mock_is_clean.return_value = False
|
|
@@ -412,8 +412,8 @@ class TestMain(unittest.TestCase):
|
|
|
412
412
|
project_name="all",
|
|
413
413
|
func=verify_execute
|
|
414
414
|
)
|
|
415
|
-
p1 = Project("proj1", "
|
|
416
|
-
p2 = Project("proj2", "
|
|
415
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
416
|
+
p2 = Project("proj2", "4.0.0", Path("."), "desc")
|
|
417
417
|
mock_find_projects.return_value = [p1, p2]
|
|
418
418
|
|
|
419
419
|
mock_verify.side_effect = [(True, "Verified"), (False, "Not found")]
|
|
@@ -444,8 +444,8 @@ class TestMain(unittest.TestCase):
|
|
|
444
444
|
project_name="all",
|
|
445
445
|
func=clean_execute
|
|
446
446
|
)
|
|
447
|
-
p1 = Project("proj1", "
|
|
448
|
-
p2 = Project("proj2", "
|
|
447
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
448
|
+
p2 = Project("proj2", "4.0.0", Path("."), "desc")
|
|
449
449
|
mock_find_projects.return_value = [p1, p2]
|
|
450
450
|
|
|
451
451
|
mock_clean_project.side_effect = [[Path("dist")], []] # p1 cleaned, p2 nothing
|
|
@@ -468,7 +468,7 @@ class TestMain(unittest.TestCase):
|
|
|
468
468
|
project_name="proj1",
|
|
469
469
|
func=clean_execute
|
|
470
470
|
)
|
|
471
|
-
p1 = Project("proj1", "
|
|
471
|
+
p1 = Project("proj1", "4.0.0", Path("."), "desc")
|
|
472
472
|
mock_find_projects.return_value = [p1]
|
|
473
473
|
|
|
474
474
|
mock_clean_project.return_value = [Path("dist")]
|
|
@@ -11,7 +11,7 @@ class TestRelease(unittest.TestCase):
|
|
|
11
11
|
def setUp(self):
|
|
12
12
|
self.project = Project(
|
|
13
13
|
name="test-project",
|
|
14
|
-
version="
|
|
14
|
+
version="4.0.0",
|
|
15
15
|
path=Path("/tmp/test_project"),
|
|
16
16
|
description="Test project"
|
|
17
17
|
)
|
|
@@ -89,7 +89,7 @@ class TestRelease(unittest.TestCase):
|
|
|
89
89
|
mock_is_clean, mock_tag_exists, mock_fetch):
|
|
90
90
|
mock_is_clean.return_value = True
|
|
91
91
|
mock_tag_exists.side_effect = [True, False] # First check: already tagged? Yes (so bump). Second check: new tag exists? No.
|
|
92
|
-
mock_bump.return_value = "
|
|
92
|
+
mock_bump.return_value = "4.0.0"
|
|
93
93
|
mock_update_file.return_value = True
|
|
94
94
|
mock_update_tests.return_value = []
|
|
95
95
|
mock_run_tests.return_value = True
|
|
@@ -97,7 +97,7 @@ class TestRelease(unittest.TestCase):
|
|
|
97
97
|
result = perform_release(self.project, "patch", yes_mode=True)
|
|
98
98
|
self.assertTrue(result)
|
|
99
99
|
|
|
100
|
-
mock_bump.assert_called_with("
|
|
100
|
+
mock_bump.assert_called_with("4.0.0", "patch")
|
|
101
101
|
mock_commit.assert_called()
|
|
102
102
|
mock_tag.assert_called()
|
|
103
103
|
mock_push.assert_called()
|
|
@@ -132,7 +132,7 @@ class TestRelease(unittest.TestCase):
|
|
|
132
132
|
def test_perform_release_tests_fail(self, mock_console, mock_revert, mock_run_tests, mock_update_file, mock_bump, mock_is_clean, mock_tag_exists, mock_fetch):
|
|
133
133
|
mock_is_clean.return_value = True
|
|
134
134
|
mock_tag_exists.return_value = True
|
|
135
|
-
mock_bump.return_value = "
|
|
135
|
+
mock_bump.return_value = "4.0.0"
|
|
136
136
|
mock_update_file.return_value = True
|
|
137
137
|
mock_run_tests.return_value = False
|
|
138
138
|
|
|
@@ -149,7 +149,7 @@ class TestRelease(unittest.TestCase):
|
|
|
149
149
|
def test_perform_release_no_files_updated(self, mock_console, mock_update_file, mock_bump, mock_is_clean, mock_tag_exists, mock_fetch):
|
|
150
150
|
mock_is_clean.return_value = True
|
|
151
151
|
mock_tag_exists.return_value = True
|
|
152
|
-
mock_bump.return_value = "
|
|
152
|
+
mock_bump.return_value = "4.0.0"
|
|
153
153
|
mock_update_file.return_value = False # No files updated
|
|
154
154
|
|
|
155
155
|
result = perform_release(self.project, "patch", yes_mode=True)
|
|
@@ -190,7 +190,7 @@ class TestRelease(unittest.TestCase):
|
|
|
190
190
|
def test_perform_release_cancel(self, mock_console, mock_confirm, mock_bump, mock_is_clean, mock_tag_exists, mock_fetch):
|
|
191
191
|
mock_is_clean.return_value = True
|
|
192
192
|
mock_tag_exists.return_value = True
|
|
193
|
-
mock_bump.return_value = "
|
|
193
|
+
mock_bump.return_value = "4.0.0"
|
|
194
194
|
mock_confirm.return_value = False # Cancel
|
|
195
195
|
|
|
196
196
|
result = perform_release(self.project, "patch", yes_mode=False)
|
|
@@ -209,7 +209,7 @@ class TestRelease(unittest.TestCase):
|
|
|
209
209
|
def test_perform_release_commit_fail(self, mock_console, mock_commit, mock_add, mock_run_tests, mock_update_file, mock_bump, mock_is_clean, mock_tag_exists, mock_fetch):
|
|
210
210
|
mock_is_clean.return_value = True
|
|
211
211
|
mock_tag_exists.side_effect = [True, False]
|
|
212
|
-
mock_bump.return_value = "
|
|
212
|
+
mock_bump.return_value = "4.0.0"
|
|
213
213
|
mock_update_file.return_value = True
|
|
214
214
|
mock_run_tests.return_value = True
|
|
215
215
|
mock_commit.side_effect = Exception("Commit failed")
|
|
@@ -231,7 +231,7 @@ class TestRelease(unittest.TestCase):
|
|
|
231
231
|
def test_perform_release_tag_fail(self, mock_console, mock_tag, mock_commit, mock_add, mock_run_tests, mock_update_file, mock_bump, mock_is_clean, mock_tag_exists, mock_fetch):
|
|
232
232
|
mock_is_clean.return_value = True
|
|
233
233
|
mock_tag_exists.side_effect = [True, False]
|
|
234
|
-
mock_bump.return_value = "
|
|
234
|
+
mock_bump.return_value = "4.0.0"
|
|
235
235
|
mock_update_file.return_value = True
|
|
236
236
|
mock_run_tests.return_value = True
|
|
237
237
|
mock_tag.side_effect = Exception("Tag failed")
|
|
@@ -254,7 +254,7 @@ class TestRelease(unittest.TestCase):
|
|
|
254
254
|
def test_perform_release_push_fail(self, mock_console, mock_push, mock_tag, mock_commit, mock_add, mock_run_tests, mock_update_file, mock_bump, mock_is_clean, mock_tag_exists, mock_fetch):
|
|
255
255
|
mock_is_clean.return_value = True
|
|
256
256
|
mock_tag_exists.side_effect = [True, False]
|
|
257
|
-
mock_bump.return_value = "
|
|
257
|
+
mock_bump.return_value = "4.0.0"
|
|
258
258
|
mock_update_file.return_value = True
|
|
259
259
|
mock_run_tests.return_value = True
|
|
260
260
|
mock_push.side_effect = Exception("Push failed")
|
|
@@ -281,7 +281,7 @@ class TestRelease(unittest.TestCase):
|
|
|
281
281
|
mock_is_clean, mock_tag_exists, mock_fetch, mock_path_exists):
|
|
282
282
|
mock_is_clean.return_value = True
|
|
283
283
|
mock_tag_exists.side_effect = [True, False]
|
|
284
|
-
mock_bump.return_value = "
|
|
284
|
+
mock_bump.return_value = "4.0.0"
|
|
285
285
|
mock_update_file.return_value = True
|
|
286
286
|
mock_update_tests.return_value = []
|
|
287
287
|
mock_run_tests.return_value = True
|
|
@@ -293,7 +293,7 @@ class TestRelease(unittest.TestCase):
|
|
|
293
293
|
|
|
294
294
|
# Check that update_file_content was called for the correct __init__.py path
|
|
295
295
|
init_path = self.project.path / "test_project/__init__.py"
|
|
296
|
-
mock_update_file.assert_any_call(init_path, "
|
|
296
|
+
mock_update_file.assert_any_call(init_path, "4.0.0", "4.0.0")
|
|
297
297
|
|
|
298
298
|
|
|
299
299
|
if __name__ == "__main__":
|
|
@@ -15,7 +15,7 @@ class TestVerifyCommand(unittest.TestCase):
|
|
|
15
15
|
self.root_path = Path("/tmp/test_root").resolve()
|
|
16
16
|
|
|
17
17
|
self.project1 = Project(name="proj1", version="1.0.0", path=self.root_path / "proj1", description="")
|
|
18
|
-
self.project2 = Project(name="proj2", version="
|
|
18
|
+
self.project2 = Project(name="proj2", version="4.0.0", path=self.root_path / "proj2", description="")
|
|
19
19
|
|
|
20
20
|
@patch("relm.commands.verify_command.find_projects")
|
|
21
21
|
@patch("relm.commands.verify_command.verify_project_release")
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|