-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
814a904
commit 44784f4
Showing
8 changed files
with
135 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[bumpversion] | ||
current_version = 0.1.0 | ||
commit = True | ||
tag = True | ||
|
||
[bumpversion:file:version.py] | ||
search = __version__ = "{current_version}" | ||
replace = __version__ = "{new_version}" | ||
|
||
[bumpversion:file:setup.py] | ||
search = version="{current_version}" | ||
replace = version="{new_version}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Bump version | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
bump-version: | ||
if: "!startsWith(github.event.head_commit.message, 'bump:')" | ||
runs-on: ubuntu-latest | ||
name: "Bump version and create changelog with commitizen" | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
token: "${{ secrets.GITHUB_TOKEN }}" | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install commitizen | ||
run: pip install commitizen | ||
|
||
- name: Bump version | ||
id: cz | ||
run: | | ||
if git log -1 --pretty=%B | grep -qE '^(feat|fix|BREAKING CHANGE):|#(minor|major)'; then | ||
cz bump --yes | ||
else | ||
cz bump --increment PATCH --yes | ||
fi | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Push changes | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: ${{ github.ref }} | ||
tags: true | ||
|
||
- name: Print Version | ||
run: echo "Bumped to version ${{ steps.cz.outputs.version }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,4 @@ | ||
import sys | ||
|
||
from PyQt5.QtWidgets import QApplication | ||
|
||
from codeaide.logic.chat_handler import ChatHandler | ||
from codeaide.ui.chat_window import ChatWindow | ||
from codeaide.utils import api_utils | ||
|
||
|
||
def main(): | ||
chat_handler = ChatHandler() | ||
|
||
if len(sys.argv) > 1 and sys.argv[1] == "test": | ||
success, message = chat_handler.check_api_connection() | ||
success, message = api_utils.test_api_connection() | ||
if success: | ||
print("Connection successful!") | ||
print("Claude says:", message) | ||
else: | ||
print("Connection failed.") | ||
print("Error:", message) | ||
else: | ||
app = QApplication(sys.argv) | ||
chat_window = ChatWindow(chat_handler) | ||
chat_window.show() | ||
sys.exit(app.exec_()) | ||
|
||
from codeaide.__main__ import main | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import sys | ||
|
||
from PyQt5.QtWidgets import QApplication | ||
|
||
from codeaide.logic.chat_handler import ChatHandler | ||
from codeaide.ui.chat_window import ChatWindow | ||
from codeaide.utils import api_utils | ||
|
||
|
||
def main(): | ||
chat_handler = ChatHandler() | ||
|
||
if len(sys.argv) > 1 and sys.argv[1] == "test": | ||
success, message = chat_handler.check_api_connection() | ||
success, message = api_utils.test_api_connection() | ||
if success: | ||
print("Connection successful!") | ||
print("Claude says:", message) | ||
else: | ||
print("Connection failed.") | ||
print("Error:", message) | ||
else: | ||
app = QApplication(sys.argv) | ||
chat_window = ChatWindow(chat_handler) | ||
chat_window.show() | ||
sys.exit(app.exec_()) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ black | |
isort | ||
pre-commit | ||
pyqt5 | ||
bump2version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from setuptools import setup, find_packages | ||
from version import __version__ | ||
|
||
# Read requirements from requirements.txt | ||
with open("requirements.txt") as f: | ||
requirements = f.read().splitlines() | ||
|
||
setup( | ||
name="codeaide", | ||
version=__version__, | ||
packages=find_packages(), | ||
install_requires=requirements, | ||
entry_points={ | ||
"console_scripts": [ | ||
"codeaide=codeaide.__main__:main", | ||
], | ||
}, | ||
author="Doug Ollerenshaw", | ||
author_email="[email protected]", | ||
description="A chat application leveraging large language models (LLMs) for code generation and execution", | ||
long_description=open("README.md").read(), | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/dougollerenshaw/CodeAIde", | ||
classifiers=[ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
], | ||
python_requires=">=3.8", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# version.py | ||
__version__ = "0.1.0" |