Skip to content

Commit 5792de2

Browse files
committed
Merge branch 'main' into next
2 parents 735a490 + 4189469 commit 5792de2

File tree

14 files changed

+104
-40
lines changed

14 files changed

+104
-40
lines changed

.github/workflows/pushMain.yml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,26 @@
11
---
2-
#---------------------------------------------------------
3-
# - Create a semantical release
4-
# - Merge main into next, alpha, beta, and next-major
5-
#---------------------------------------------------------
2+
###############################################################################
3+
# Workflow: Push to main
4+
#
5+
# Purpose:
6+
# - Automates semantic release creation on pushes to the main branch.
7+
# - Merges main into next, alpha, beta, and next-major branches to keep them up to date.
8+
#
9+
# Triggers:
10+
# - On push to the main branch
11+
# - Manual dispatch
12+
#
13+
# Key Steps:
14+
# 1. Checkout repository code
15+
# 2. Merge main into next, next-major, alpha, and beta branches using a custom action
16+
# 3. Run semantic-release to publish new versions and changelogs
17+
# 4. Push updates to the appropriate major version branch if a new release is published
18+
#
19+
# Notes:
20+
# - Uses a custom merge-branch action for branch synchronization
21+
# - Requires PAT (Personal Access Token) secret for authentication
22+
# - Integrates with cycjimmy/semantic-release-action for automated releases
23+
###############################################################################
624
name: Push to main
725

826
on:

.github/workflows/semanticVersionBump.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
11
---
2-
#------------------------------------------------------------------------------
3-
# Lawrence McDaniel - https://lawrencemcdaniel.com
4-
# Version Bump Workflow for Python package openai_utils
2+
###############################################################################
3+
# Workflow: Semantic Version Bump (next)
54
#
6-
# Calculate the version of the 'next' branch based on semantic-release rules.
7-
# Compares the existing value of __version__.py to the calculated value.
8-
# If they are different, it will update __version__.py and push the changes
9-
# to the main branch.
10-
#------------------------------------------------------------------------------
5+
# Purpose:
6+
# - Calculates the next semantic version for the Python package (openai_utils)
7+
# based on semantic-release rules, comparing the current __version__.py value
8+
# to the calculated value.
9+
# - If a version bump is needed, updates __version__.py and pushes the change
10+
# to the main branch.
11+
#
12+
# Triggers:
13+
# - On push to the main branch
14+
# - Manual dispatch
15+
#
16+
# Key Steps:
17+
# 1. Checkout repository code
18+
# 2. Set up Python and Node.js environments
19+
# 3. Get current and next semantic version values
20+
# 4. Compare versions and update __version__.py if needed
21+
# 5. Commit and push the updated version file to the repository
22+
#
23+
# Notes:
24+
# - Uses semantic-release (dry-run) to determine the next version
25+
# - Requires PAT (Personal Access Token) secret for authentication
26+
# - Only updates __version__.py if a version bump is detected
27+
###############################################################################
1128
name: Semantic Version Bump (next)
1229

1330
on:

.github/workflows/testsPython.yml

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,47 @@
1+
###############################################################################
2+
# Workflow: Python Unit Tests
3+
#
4+
# Purpose:
5+
# Runs Python unit tests automatically on pull requests and pushes to main/next.
6+
#
7+
# Triggers:
8+
# - On push to main or next branches (Python files only)
9+
# - On pull requests affecting Python files
10+
# - Manual dispatch
11+
#
12+
# Key Steps:
13+
# 1. Checkout repository code
14+
# 2. Set up Python environment using a custom action
15+
# 3. Run unit tests and report results
16+
#
17+
# Notes:
18+
# - secrets are set in https://github.com/smarter-sh/smarter/settings/secrets/actions
19+
# - Integrates with Codecov for coverage reporting
20+
###############################################################################
121
name: Python Unit Tests
222

323
on:
4-
workflow_dispatch:
5-
pull_request:
6-
paths:
7-
- "**.py"
24+
workflow_dispatch: # Allows the workflow to be manually triggered from the GitHub Actions tab
25+
pull_request: #
26+
paths: # Trigger workflow on pull requests, but
27+
- "**.py" # only if Python files are changed
828
push:
9-
branches:
10-
- main
11-
- next
12-
paths:
13-
- "**.py"
29+
branches: #
30+
- main #
31+
- next # Trigger workflow on pushes to main and next
32+
paths: # branches, but only if Python files are changed
33+
- "**.py" #
1434

1535
env:
1636
python-version: "3.13"
1737

1838
jobs:
39+
# Job #1: Run Python unit tests
40+
#
41+
# This job will run on an Ubuntu runner and execute the Python
42+
# tests by using a custom action located in ./.github/actions/tests/python.
1943
python-unit-tests:
20-
runs-on: ubuntu-latest
44+
runs-on: ubuntu-latest # the runner (remote machine) will use Ubuntu OS
2145
steps:
2246
- name: Checkout code
2347
id: checkout
@@ -37,3 +61,19 @@ jobs:
3761
mysql-database: "${{ secrets.MYSQL_DATABASE }}"
3862
mysql-charset: "${{ secrets.MYSQL_CHARSET }}"
3963
codecov-token: "${{ secrets.CODECOV_TOKEN }}"
64+
65+
# Job #2: Notifications (Mini-capstone assignment)
66+
# This job will run after the Python unit tests and
67+
# is scaffolded to facilitate sending notifications based
68+
# on the test results.
69+
notifications:
70+
needs: python-unit-tests
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: Notify on test results
74+
run: |
75+
if [ "${{ needs.python-unit-tests.result }}" == "success" ]; then
76+
echo "success notifications go here"
77+
else
78+
echo "failure notifications go here"
79+
fi

.pre-commit-config.yaml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ repos:
2525
hooks:
2626
- id: isort
2727
args: ["--settings-path=pyproject.toml"]
28-
- repo: local
29-
hooks:
30-
- id: pylint
31-
name: pylint
32-
entry: scripts/run_pylint.sh
33-
language: script
34-
types: [python]
28+
# - repo: local
29+
# hooks:
30+
# - id: pylint
31+
# name: pylint
32+
# entry: scripts/run_pylint.sh
33+
# language: script
34+
# types: [python]
3535
- repo: https://github.com/PyCQA/bandit
3636
rev: 1.9.4
3737
hooks:
@@ -43,7 +43,6 @@ repos:
4343
# See https://pre-commit.com/hooks.html for more hooks
4444
#- id: check-added-large-files
4545
- id: fix-byte-order-marker
46-
- id: fix-encoding-pragma
4746
- id: check-case-conflict
4847
- id: check-json
4948
- id: check-merge-conflict

app/agent.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from .logging_config import get_logger, setup_logging
99
from .prompt import completion
1010

11-
1211
setup_logging()
1312
logger = get_logger(__name__)
1413

app/database.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
MYSQL_USER,
1818
)
1919

20-
2120
setup_logging()
2221
logger = get_logger(__name__)
2322

app/prompt.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from app.stackademy import stackademy_app
2626
from app.utils import color_text, dump_json_colored
2727

28-
2928
setup_logging()
3029
logger = get_logger(__name__)
3130

app/settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from app.const import ToolChoice
1010
from app.exceptions import ConfigurationException
1111

12-
1312
load_dotenv()
1413
SET_ME_PLEASE = "SET-ME-PLEASE"
1514

app/stackademy.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from app.logging_config import get_logger, setup_logging
1414
from app.utils import color_text
1515

16-
1716
setup_logging()
1817
logger = get_logger(__name__)
1918

app/tests/const.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import sys
88
from pathlib import Path
99

10-
1110
HERE = os.path.abspath(os.path.dirname(__file__))
1211
PROJECT_ROOT = str(Path(HERE).parent.parent)
1312
PYTHON_ROOT = str(Path(PROJECT_ROOT).parent)

0 commit comments

Comments
 (0)