Skip to content

Commit 78a4093

Browse files
committed
refactor - kamangir/bolt#746
1 parent 7c28a00 commit 78a4093

16 files changed

+29
-32
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ to use on [AWS SageMaker](https://aws.amazon.com/sagemaker/) replace `<plugin-na
2020

2121
[![pylint](https://github.com/kamangir/openai-commands/actions/workflows/pylint.yml/badge.svg)](https://github.com/kamangir/openai-commands/actions/workflows/pylint.yml) [![pytest](https://github.com/kamangir/openai-commands/actions/workflows/pytest.yml/badge.svg)](https://github.com/kamangir/openai-commands/actions/workflows/pytest.yml) [![bashtest](https://github.com/kamangir/openai-commands/actions/workflows/bashtest.yml/badge.svg)](https://github.com/kamangir/openai-commands/actions/workflows/bashtest.yml) [![PyPI version](https://img.shields.io/pypi/v/openai-commands.svg)](https://pypi.org/project/openai-commands/)
2222

23-
built by 🪄 [`blue_options-4.49.1-abcli-blue-objects-attempt-2-b-2024-09-07-99677`](https://github.com/kamangir/awesome-bash-cli), based on [`openai_commands-3.162.1`](https://github.com/kamangir/openai-commands).
23+
built by 🪄 [`blue_options-4.49.1-abcli-blue-objects-attempt-2-b-2024-09-07-99677`](https://github.com/kamangir/awesome-bash-cli), based on [`openai_commands-3.163.1`](https://github.com/kamangir/openai-commands).

openai_commands/DALLE/__main__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
from blueness import module
55
from blueness.argparse.generic import sys_exit
66
from blue_options.options import Options
7-
from blue_objects import file
8-
from abcli.modules import objects
7+
from blue_objects import file, objects
98

109
from articraft import html
1110
from openai_commands import NAME, VERSION

openai_commands/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
DESCRIPTION = f"{ICON} a command interface to the OpenAI API."
66

7-
VERSION = "3.162.1"
7+
VERSION = "3.163.1"
88

99
REPO_NAME = "openai-commands"
1010

openai_commands/completion/functions/generic.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import random
33

44
from blue_options.host import is_jupyter
5-
from blue_objects import file
6-
from abcli.modules import objects
5+
from blue_objects import file, objects
76

87
from openai_commands.completion.api import complete_prompt
98
from openai_commands.logger import logger

openai_commands/completion/prompts/bash.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from blue_objects import file
2-
from abcli.modules import objects
1+
from blue_objects import file, objects
32

43

54
class bash_prompt:

openai_commands/images/__main__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44

55
from blueness.argparse.generic import sys_exit
66
from blue_options import string
7-
from blue_objects import file
8-
from abcli.modules import objects
7+
from blue_objects import file, objects
98

109
from openai_commands import NAME, VERSION
1110
from openai_commands.images.api import OpenAIImageGenerator

openai_commands/literature_review/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ literature review at scale on [AWS Batch](https://aws.amazon.com/batch/) through
4949
| | |
5050
| --- | --- |
5151
| [aws_batch](https://github.com/kamangir/notebooks-and-scripts/tree/main/notebooks_and_scripts/workflow/runners/aws_batch.py) | [local](https://github.com/kamangir/notebooks-and-scripts/tree/main/notebooks_and_scripts/workflow/runners/local.py) |
52-
| [![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/AMR-v7-test-litrev-multiple-aws_batch-study-type-screening-result/workflow.gif?raw=true&random=Mem24SR5ee0G6GMg)](https://kamangir-public.s3.ca-central-1.amazonaws.com/AMR-v7-test-litrev-multiple-aws_batch-study-type-screening-result/workflow.gif?raw=true&random=Mem24SR5ee0G6GMg) | [![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/AMR-v7-test-litrev-multiple-local-study-type-screening-result/workflow.gif?raw=true&random=D8rBuHWXTtVdUMA9)](https://kamangir-public.s3.ca-central-1.amazonaws.com/AMR-v7-test-litrev-multiple-local-study-type-screening-result/workflow.gif?raw=true&random=D8rBuHWXTtVdUMA9) |
52+
| [![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/AMR-v7-test-litrev-multiple-aws_batch-study-type-screening-result/workflow.gif?raw=true&random=CsFYkA3f7O6pUQHw)](https://kamangir-public.s3.ca-central-1.amazonaws.com/AMR-v7-test-litrev-multiple-aws_batch-study-type-screening-result/workflow.gif?raw=true&random=CsFYkA3f7O6pUQHw) | [![image](https://kamangir-public.s3.ca-central-1.amazonaws.com/AMR-v7-test-litrev-multiple-local-study-type-screening-result/workflow.gif?raw=true&random=CW9KQdO9zbcMlNDF)](https://kamangir-public.s3.ca-central-1.amazonaws.com/AMR-v7-test-litrev-multiple-local-study-type-screening-result/workflow.gif?raw=true&random=CW9KQdO9zbcMlNDF) |
5353

5454
---
5555

openai_commands/literature_review/combination.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import pandas as pd
33

44
from blueness import module
5-
from blue_objects import file
6-
from abcli.modules import objects
5+
from blue_objects import file, objects
76

87
from openai_commands import NAME
98
from openai_commands.logger import logger

openai_commands/literature_review/functions.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
from tqdm import tqdm
55

66
from blueness import module
7-
from blue_objects import file
8-
from abcli.modules import objects
7+
from blue_objects import file, objects
98

109
from openai_commands import NAME
1110
from openai_commands.completion.api import complete_prompt

openai_commands/tests/test_ai_function_bash.py

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import pytest
2-
from abcli.modules.objects import select
3-
from abcli.plugins.testing import download_object
2+
3+
from blue_objects import objects
4+
45
from openai_commands import env
56
from openai_commands.completion.functions.bash import ai_function_bash
67
from openai_commands.completion.prompts.bash import bash_prompt
78

89

10+
@pytest.skip(reason="select() is obsolete.")
911
@pytest.mark.parametrize(
1012
[
1113
"object_name",
@@ -15,9 +17,10 @@
1517
],
1618
)
1719
def test_ai_function_bash(object_name):
18-
assert download_object(object_name)
20+
assert objects.download(object_name)
1921

20-
select(object_name)
22+
# select(object_name)
23+
assert False
2124

2225
prompt = bash_prompt("ingest vancouver.")
2326

openai_commands/tests/test_bash_prompt.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import pytest
2+
3+
from blue_objects import objects
4+
25
from openai_commands.completion.prompts.bash import bash_prompt
3-
from abcli.modules import objects
46

57

68
@pytest.mark.parametrize(

openai_commands/tests/test_gpt.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
import pytest
33
from typing import List
44

5-
from blue_objects import file
6-
from abcli.modules import objects
5+
from blue_objects import file, objects
76

87
from openai_commands.gpt.chat import chat_with_openai, interact_with_openai, list_models
98

openai_commands/tests/test_images.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22

33
from blue_options import string
4-
from abcli.modules import objects
4+
from blue_objects import objects
55

66
from openai_commands.images.api import OpenAIImageGenerator
77

openai_commands/tests/test_literature_review.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import pytest
22

3-
from blue_objects import file
4-
from abcli.modules import objects
5-
from abcli.plugins.testing import download_object
3+
from blue_objects import file, objects
64

75
from openai_commands import env
86
from openai_commands.literature_review.functions import (
@@ -27,7 +25,7 @@ def test_generate_prompt(
2725
object_name: str,
2826
question: str,
2927
):
30-
assert download_object(object_name)
28+
assert objects.download(object_name)
3129

3230
success, question_dict = file.load_yaml(
3331
objects.path_of(
@@ -70,7 +68,7 @@ def test_literature_review(
7068
):
7169
output_object_name = objects.unique_object("test")
7270

73-
assert download_object(input_object_name)
71+
assert objects.download(input_object_name)
7472

7573
assert review_literature(
7674
input_object_name=input_object_name,

openai_commands/tests/test_vision.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import pytest
2+
23
from blue_options.options import Options
3-
from abcli.plugins.testing import download_object
4+
from blue_objects import objects
5+
46
from openai_commands import env
57
from openai_commands.vision.completion import complete_object
68

@@ -15,7 +17,7 @@
1517
],
1618
)
1719
def test_vision_complete(object_name):
18-
assert download_object(object_name)
20+
assert objects.download(object_name)
1921

2022
assert isinstance(
2123
complete_object(

openai_commands/vision/completion.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
from blue_objects.env import ABCLI_PUBLIC_PREFIX
99
from blue_options.options import Options
1010
from blue_options import string
11-
from blue_objects import file
12-
from abcli.modules import objects
11+
from blue_objects import file, objects
1312

1413
from openai_commands import env, NAME
1514
from openai_commands.logger import logger

0 commit comments

Comments
 (0)