Skip to content

Commit

Permalink
Changed the module name from esbmc_ai_lib to esbmc
Browse files Browse the repository at this point in the history
  • Loading branch information
Yiannis128 committed Feb 3, 2024
1 parent 5ffabb4 commit fa85420
Show file tree
Hide file tree
Showing 37 changed files with 585 additions and 482 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:
run: |
pipenv install --deploy --dev
- name: Pylint on esbmc_ai_lib
- name: Pylint on esbmc_ai
run: |
pipenv run pylint esbmc_ai_lib
pipenv run pylint esbmc_ai
test:
name: PyTest
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"name": "Launch ESBMC-AI on Open File",
"type": "python",
"request": "launch",
"module": "esbmc_ai_lib",
"module": "esbmc_ai",
"justMyCode": true,
"cwd": "${workspaceFolder}",
"args": [
Expand All @@ -19,7 +19,7 @@
"name": "Fix Code on Open File",
"type": "python",
"request": "launch",
"module": "esbmc_ai_lib",
"module": "esbmc_ai",
"justMyCode": true,
"cwd": "${workspaceFolder}",
"args": [
Expand All @@ -33,7 +33,7 @@
"name": "Optimize Code on Open File",
"type": "python",
"request": "launch",
"module": "esbmc_ai_lib",
"module": "esbmc_ai",
"justMyCode": true,
"cwd": "${workspaceFolder}",
"args": [
Expand Down
5 changes: 5 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh

echo "Building ESBMC-AI"
python3 -m build

2 changes: 1 addition & 1 deletion esbmc-ai
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env sh

python -m esbmc_ai_lib $@
python -m esbmc_ai $@
7 changes: 0 additions & 7 deletions esbmc_ai.py

This file was deleted.

4 changes: 4 additions & 0 deletions esbmc_ai/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Author: Yiannis Charalambous

__version__: str = "v0.4.0"
__author__: str = "Yiannis Charalambous"
2 changes: 1 addition & 1 deletion esbmc_ai_lib/__init__.py → esbmc_ai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Software Bounded Model Checker. With the power of LLMs, it adds
features such as automatic code fixing and more."""

version: str = "0.4.0"
from esbmc_ai.__about__ import __version__, __author__
32 changes: 21 additions & 11 deletions esbmc_ai_lib/__main__.py → esbmc_ai/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,29 @@
import argparse
from langchain.base_language import BaseLanguageModel

import esbmc_ai_lib.config as config
from esbmc_ai_lib.frontend.solution import (

import esbmc_ai.config as config
from esbmc_ai import __author__, __version__
from esbmc_ai.frontend.solution import (
SourceFile,
get_main_source_file,
set_main_source_file,
get_main_source_file_path,
)

from esbmc_ai_lib.commands import (
from esbmc_ai.commands import (
ChatCommand,
FixCodeCommand,
HelpCommand,
ExitCommand,
)

from esbmc_ai_lib.loading_widget import LoadingWidget, create_loading_widget
from esbmc_ai_lib.user_chat import UserChat
from esbmc_ai_lib.logging import printv, printvv
from esbmc_ai_lib.esbmc_util import esbmc
from esbmc_ai_lib.chat_response import FinishReason, ChatResponse
from esbmc_ai_lib.ai_models import _ai_model_names
from esbmc_ai.loading_widget import LoadingWidget, create_loading_widget
from esbmc_ai.user_chat import UserChat
from esbmc_ai.logging import printv, printvv
from esbmc_ai.esbmc_util import esbmc
from esbmc_ai.chat_response import FinishReason, ChatResponse
from esbmc_ai.ai_models import _ai_model_names


commands: list[ChatCommand] = []
Expand Down Expand Up @@ -197,7 +199,7 @@ def main() -> None:
# argparse.RawDescriptionHelpFormatter allows the ESBMC_HELP to display
# properly.
formatter_class=argparse.RawDescriptionHelpFormatter,
epilog=f"Made by Yiannis Charalambous\n\n{ESBMC_HELP}",
epilog=f"Made by {__author__}\n\n{ESBMC_HELP}",
)

parser.add_argument(
Expand All @@ -211,6 +213,14 @@ def main() -> None:
help="Any arguments after the filename will be passed to ESBMC as parameters.",
)

parser.add_argument(
"-V",
"--version",
action="version",
version="%(prog)s {version}".format(version=__version__),
help="Show version information.",
)

parser.add_argument(
"-v",
"--verbose",
Expand Down Expand Up @@ -249,7 +259,7 @@ def main() -> None:
args = parser.parse_args()

print("ESBMC-AI")
print("Made by Yiannis Charalambous")
print(f"Made by {__author__}")
print()

init_check_health(args.verbose)
Expand Down
2 changes: 1 addition & 1 deletion esbmc_ai_lib/ai_models.py → esbmc_ai/ai_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
)


from esbmc_ai_lib.api_key_collection import APIKeyCollection
from esbmc_ai.api_key_collection import APIKeyCollection


class AIModel(object):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing_extensions import override
from langchain.schema import AIMessage, HumanMessage

from esbmc_ai_lib.chat_response import FinishReason
from esbmc_ai.chat_response import FinishReason

from .chat_command import ChatCommand
from .. import config
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from threading import Thread
from typing import Optional

from esbmc_ai_lib import config
from esbmc_ai import config


class LoadingWidget(object):
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from langchain.base_language import BaseLanguageModel
from langchain.schema import AIMessage, BaseMessage, HumanMessage

from esbmc_ai_lib.config import ChatPromptSettings
from esbmc_ai.config import ChatPromptSettings
from .base_chat_interface import BaseChatInterface, ChatResponse
from .ai_models import AIModel

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from langchain.base_language import BaseLanguageModel
from langchain.schema import BaseMessage

from esbmc_ai_lib.chat_response import ChatResponse, FinishReason
from esbmc_ai_lib.config import DynamicAIModelAgent
from esbmc_ai.chat_response import ChatResponse, FinishReason
from esbmc_ai.config import DynamicAIModelAgent

from .ai_models import AIModel
from .base_chat_interface import BaseChatInterface
Expand Down
2 changes: 1 addition & 1 deletion esbmc_ai_lib/user_chat.py → esbmc_ai/user_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from langchain.memory import ConversationSummaryMemory, ChatMessageHistory
from langchain.schema import BaseMessage, PromptValue, SystemMessage

from esbmc_ai_lib.config import AIAgentConversation, ChatPromptSettings
from esbmc_ai.config import AIAgentConversation, ChatPromptSettings

from .ai_models import AIModel
from .base_chat_interface import BaseChatInterface
Expand Down
Loading

0 comments on commit fa85420

Please sign in to comment.