Skip to content

Commit 0660a8b

Browse files
authored
Merge pull request #52 from A-Baji/dev
3.0.6
2 parents 2977f6e + 359969a commit 0660a8b

File tree

11 files changed

+36
-43
lines changed

11 files changed

+36
-43
lines changed

.coveragerc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[run]
2-
omit =
3-
*/tests/*
4-
51
[report]
62
exclude_lines =
73
if __name__ == "__main__":

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) convention.
44

5+
## [3.0.6] - 07-10-2024
6+
7+
### Changed
8+
9+
- Moved tests back out of the package
10+
511
## [3.0.5] - 07-9-2024
612

713
### Added
@@ -120,6 +126,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and
120126

121127
- switched to `pathlib` for file path parsing
122128

129+
[3.0.6]: https://github.com/A-Baji/discordAI-modelizer/compare/3.0.5...3.0.6
123130
[3.0.5]: https://github.com/A-Baji/discordAI-modelizer/compare/3.0.4...3.0.5
124131
[3.0.4]: https://github.com/A-Baji/discordAI-modelizer/compare/3.0.3...3.0.4
125132
[3.0.3]: https://github.com/A-Baji/discordAI-modelizer/compare/3.0.2...3.0.3

discordai_modelizer/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.0.5"
1+
__version__ = "3.0.6"

docker-compose-test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ services:
1818
env_file: .env.test
1919
volumes:
2020
- ./discordai_modelizer:/usr/local/lib/python${PY_VER}/site-packages/discordai_modelizer
21-
- ./discordai_modelizer/tests:/main/tests
21+
- ./tests:/main/tests
2222
- .coveragerc:/main/.coveragerc
2323
command:
2424
- sh
2525
- -c
2626
- |
2727
pip install pytest pytest-cov pytest-console-scripts --root-user-action ignore
28-
pytest --cov-report term-missing --cov=discordai --cov-config=.coveragerc tests
28+
pytest --cov-report term-missing --cov=discordai_modelizer --cov-config=.coveragerc tests
2929
# tail -f /dev/null
File renamed without changes.
File renamed without changes.
File renamed without changes.

discordai_modelizer/tests/test_command_line.py renamed to tests/test_command_line.py

Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,17 @@ def test_cli_help(script_runner):
2727
assert "-V, --version show program's version number and exit" in cli.stdout
2828

2929

30-
@mark.parametrize("command", ["discordai_modelizer"])
31-
def test_cli_model_list(script_runner, command):
32-
cli = script_runner.run([command, "model", "list"])
30+
def test_cli_model_list(script_runner):
31+
cli = script_runner.run(["discordai_modelizer", "model", "list"])
3332
assert cli.success
3433
for o in expected_values.list_module_expected:
3534
assert o in loads(cli.stdout)
3635

3736

38-
@mark.parametrize("command", ["discordai_modelizer"])
39-
def test_cli_training(script_runner, command, default_file_output):
37+
def test_cli_training(script_runner, default_file_output):
4038
cli = script_runner.run(
4139
[
42-
command,
40+
"discordai_modelizer",
4341
"model",
4442
"create",
4543
"-c",
@@ -56,90 +54,82 @@ def test_cli_training(script_runner, command, default_file_output):
5654
assert "INFO: Starting OpenAI fine-tune job..." in cli.stdout
5755

5856

59-
@mark.parametrize("command", ["discordai_modelizer"])
60-
def test_cli_model_list_full(script_runner, command):
61-
cli = script_runner.run([command, "model", "list", "--full"])
57+
def test_cli_model_list_full(script_runner):
58+
cli = script_runner.run(["discordai_modelizer", "model", "list", "--full"])
6259
assert cli.success
6360
for o in expected_values.list_module_expected_full:
6461
assert o in loads(cli.stdout)
6562

6663

67-
@mark.parametrize("command", ["discordai_modelizer"])
68-
def test_cli_delete_model(script_runner, command):
69-
cli = script_runner.run([command, "model", "delete", "-m", "whisper-1"])
64+
def test_cli_delete_model(script_runner):
65+
cli = script_runner.run(
66+
["discordai_modelizer", "model", "delete", "-m", "whisper-1"]
67+
)
7068
assert (
7169
"Are you sure you want to delete this model? This action is not reversable. Y/N: "
7270
in cli.stdout
7371
)
7472

7573

76-
@mark.parametrize("command", ["discordai_modelizer"])
77-
def test_cli_job_list(script_runner, command):
78-
cli = script_runner.run([command, "job", "list"])
74+
def test_cli_job_list(script_runner):
75+
cli = script_runner.run(["discordai_modelizer", "job", "list"])
7976
assert cli.success
8077
assert dumps(expected_values.list_job_expected, indent=4) in cli.stdout
8178

8279

83-
@mark.parametrize("command", ["discordai_modelizer"])
84-
def test_job_list_full(script_runner, command):
85-
cli = script_runner.run([command, "job", "list", "--full"])
80+
def test_job_list_full(script_runner):
81+
cli = script_runner.run(["discordai_modelizer", "job", "list", "--full"])
8682
assert cli.success
8783
assert dumps(expected_values.list_job_expected_full, indent=4) in cli.stdout
8884

8985

90-
@mark.parametrize("command", ["discordai_modelizer"])
91-
def test_job_info(script_runner, command):
86+
def test_job_info(script_runner):
9287
cli = script_runner.run(
93-
[command, "job", "info", "-j", "ftjob-i2IyeV2xbLCSrYq45kTKSdwE"]
88+
["discordai_modelizer", "job", "info", "-j", "ftjob-i2IyeV2xbLCSrYq45kTKSdwE"]
9489
)
9590
assert cli.success
9691
assert dumps(expected_values.job_info_expected, indent=4) in cli.stdout
9792

9893

99-
@mark.parametrize("command", ["discordai_modelizer"])
100-
def test_job_events(script_runner, command):
94+
def test_job_events(script_runner):
10195
cli = script_runner.run(
102-
[command, "job", "events", "-j", "ftjob-i2IyeV2xbLCSrYq45kTKSdwE"]
96+
["discordai_modelizer", "job", "events", "-j", "ftjob-i2IyeV2xbLCSrYq45kTKSdwE"]
10397
)
10498
assert cli.success
10599
assert dumps(expected_values.job_events_expected, indent=4) in cli.stdout
106100

107101

108-
@mark.parametrize("command", ["discordai_modelizer"])
109-
def test_job_cancel(script_runner, command):
102+
def test_job_cancel(script_runner):
110103
cli = script_runner.run(
111-
[command, "job", "cancel", "-j", "ftjob-i2IyeV2xbLCSrYq45kTKSdwE"]
104+
["discordai_modelizer", "job", "cancel", "-j", "ftjob-i2IyeV2xbLCSrYq45kTKSdwE"]
112105
)
113106
assert cli.success
114107
assert dumps(expected_values.job_cancel_expected, indent=4) in cli.stdout
115108

116109

117-
@mark.parametrize("command", ["discordai_modelizer"])
118-
def test_job_cancel(script_runner, command):
110+
def test_job_cancel(script_runner):
119111
cli = script_runner.run(
120-
[command, "job", "cancel", "-j", "ftjob-i2IyeV2xbLCSrYq45kTKSdwE"]
112+
["discordai_modelizer", "job", "cancel", "-j", "ftjob-i2IyeV2xbLCSrYq45kTKSdwE"]
121113
)
122114
assert cli.success
123115
assert dumps(expected_values.job_cancel_expected, indent=4) in cli.stdout
124116

125117

126-
@mark.parametrize("command", ["discordai_modelizer"])
127-
def test_cli_model_bad_args(script_runner, command):
118+
def test_cli_model_bad_args(script_runner):
128119
cli = script_runner.run(
129120
[
130-
command,
121+
"discordai_modelizer",
131122
"model",
132123
]
133124
)
134125
assert not cli.success
135126
assert "Must choose a command from `list`, `create`, or `delete`" in cli.stderr
136127

137128

138-
@mark.parametrize("command", ["discordai_modelizer"])
139-
def test_cli_job_bad_args(script_runner, command):
129+
def test_cli_job_bad_args(script_runner):
140130
cli = script_runner.run(
141131
[
142-
command,
132+
"discordai_modelizer",
143133
"job",
144134
]
145135
)
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)